I’m currently writing a game that makes use of this effect, but since OpenAL-Soft does not have the EFX effect implemented, I’ve been attempting to write it in the engine.
I like the process in Audacity’s Wahwah.cpp, but apparently the float values used are totally different than what I’m expecting. Another problem is that the PCM data I’m trying to give it is a series of shorts (this is Java, by the way) since the files are 16-bit FLAC, so even if the float values were what I thought they were, the types just get messy and things explode (in my ear (ack)).
My question is, what do I need to do to the PCM data to get it to work with the Wahwah effect? Alternatively, what other wahwah algorithm is available that lets me process the shorts as they are?
A “Wahwah” effect is basically a sweeping filter. Typically it’s a low-pass filter with resonance at the filter frequency.
The Audacity Wahwah effect uses a low frequency sine to sweep the filter frequency up and down.
It may be easier to write the effect from scratch rather than adapt the Audacity code.
I ended up experimenting with a few other forms of the effect with no luck, so I returned to Audacity’s version.
It actually seems to do… something with the wah oscillation/resonance, but the resulting audio has a weird effect to it. You can hear the wah’s effect, but I guess it’s just adding it on top of the source data?
You’ll notice at the top of that method that I only pass half of each sample to the channel buffers. This meant that I was editing half of each sample, which caused that bizarre addition-of-resonance effect. Actually passing the whole sample fixes the problem.