Need Help with Audio 'Popping', Not sure if it's the Sample's Fault.

Started by Jazztache, December 13, 2021, 03:07:26

Previous topic - Next topic

Jazztache

Hello! I am having an audio export and playback issue with a large set of modules using the same or similar sample that I have.
I have this Recorder woodwind sample that I am using in my game's music and whilst this isn't super noticeable when other instruments are playing, I have found this annoying problem that I need to fix before I dare to release the OST.
My problem is that this sample (which I can't really switch out for another one, due to needing to update existing music) has a pop every time it plays.

Every time a note is played in OpenMPT with this sample, a very noticeable bit of 'extra percussion' can be heard. >:(
I have tried the trick where you add a fade-in in Audacity and re-export the sample. The popping is still there. Also tried cutting the starting bit of the sample, still pops.
I'm fairly certain it might not be an issue with the sound, since there is still that pop with heavy fade-in. I'm pretty sure this happens when, and only when, OpenMPT plays a new note with the same sample.

I also tried to message around with envelope fade-in on instruments and it still didn't work.
I have attached the raw sample, as well as a stripped-back in-context module where the issue occurs. The issue happens when the music is both exported to WAV, FLAC and OGG, and in the program itself in both Windows 10 x64 and Wine/Kubuntu x64.
If anyone has any ideas or ways of solving this issue please tell me! Thankyou!  :D
-Jazz.

Exhale

I am looking into it, downloaded the zip, instantly played the sample alone in VLC and I hear the pop every time... then I unzipped it and put it into ompt and nothing, imported it into audacity and nothing either... I havent tried the export, but this is pretty baffling...

I will do a little more exploring...

I wonder if it is VLC's fault... I just took the sample, made a test mptm with it and exported it to a sample slot playing c5 and f5 together - I had a theory that if there was something in the sample doing it then the click would happen at two times with the two notes... but nothing in the export to sample showed up which is even more confusing for me since I hear it clear as day when playing the sample in vlc... I did look along the sample to see if I could find any places where the sample looks like it would have a click (I think many of us are used to looking for the step by now) and nothing...

So I am going to try something since I couldnt hear it in the sample when I played it in audacity...

ok I was going to export the mptm you supplied and listen to it in audacity and vlc to see if there is a difference (I will still do this) but also listening to the tune in modplug I wonder if you really intend to just cut the instrument off whenever a new note is played - yeah your new note action is note cut - with an instrument like this I would personally do a fade out, preferably before the new note even happens.

ok I exported your one and one with a sustain and volume fade when encountering a new note and they both sound as they do in ompt - I will attach the note fade and you can try exporting it on your side... neither of them gave me the click I was hearing in vlc, but your one has what could be considered a click every time a new note is encountered...

the sample will be the exact sample you provided.

I hope this solves your problem because yeah this kind of an instrument can have a pop if you dont fade it out - also I would suggest you use == (note off), which is set to ~ or ` on the keyboard layout I use, before every new note on a sample like this because it would make it sound more natural and realistic - a person playing the recorder would have to take breaths some times, and often they do it between notes.
___________________
The turtle moves!

Saga Musix

You almost got it right - the issue is not when the new note starts playing, but when the old note stops playing. The sound of a recorder is almost a pure sine wave, which makes the problem more obvious than with many other samples. The issue is essentially that when OpenMPT cuts the old note, it may stop when the waveform is far away from the zero-crossing, and this introduces a very quick change in the resulting waveform - commonly heard as a "pop". Generally you'd want to fade out the sample very quickly to avoid that, like in Exhale's example solution posted above. However, you can shorten the fadeout even further than in his example so that the new and old note overlap a bit less: To do that, set the New Note Action of that instrument to "Note Fade", and set the Fade Out value of the instrument to 8192. This is a very quick fade-out, but long enough to avoid the pop.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Jazztache

Quote from: Exhale on December 13, 2021, 06:26:46
ok I exported your one and one with a sustain and volume fade when encountering a new note and they both sound as they do in ompt - I will attach the note fade and you can try exporting it on your side... neither of them gave me the click I was hearing in vlc, but your one has what could be considered a click every time a new note is encountered...

I also managed to get the instrument envelopes doing thier thing with note off which is nice, however, even with extremely strict fadeout on the volume, notes tend to bleed over into one another, which makes it seem way louder than it's supposed to be. Are there any other settings (e.g. interpolating between the wave forms) that'll keep the original sound single-note but also mitigate the popping?

Exhale

ok there are two files in here now, one has been set to the way Saga Suggested, and for the other I increased the fidelity with the expand patter button and added note off commands just before every note is hit for about half the tune, personally I think they both work well and neither seem to give you extra volume.
___________________
The turtle moves!

Saga Musix

Quote from: Jazztache on December 13, 2021, 23:47:42
I also managed to get the instrument envelopes doing thier thing with note off which is nice, however, even with extremely strict fadeout on the volume
Just to make sure, did you disable the volume envelope when applying the Fade Out value? Did you try using a higher value than 8192? There shouldn't be any noticable overlap with this method.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Jazztache

Sweet!

Okay, so I basically disabled the volume envelope, kept the new note action to Note Off and set the fade out from 128 to 8193 (technically more than 8192  :P). It sounds almost exactly the same, slightly different sound but otherwise pretty close to the original without the pop. The pop was more noticeable then this slight change anyway, and in some cases it sounds a bit better.

I was gonna go through and update the entire track with expanding the stuff, but this is just about exactly what I need, and I think if I just set it back to Note Cut I can restore the original behavior as a fallback. I think the only way to get it sounding closer to the original would be to set it back to Note Cut, but yeah the popping comes back when you do that.

Thanks everyone!

Saga Musix

» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.