Audio Designer Flange effect not working- solved

bmillier

Well-known member
I am using Version Teensy 1.29

In my tests (using audio shield and a guitar signal) , the flange effect does not produce the correct "sweeping comb-filter" effect that it should. I have traced the problem to the following lines in effect_flange.cpp
in AudioEffectFlange.begin routine:

line 80 delay_rate_incr = delay_rate / (2147483648.0 * AUDIO_SAMPLE_RATE_EXACT)

and similarly in AudioEffectFlange.voices routine:

line 105 delay_rate_incr = delay_rate / (2147483648.0 * AUDIO_SAMPLE_RATE_EXACT)

delay_rate_incr is an int type. For any normal values of delay_rate in Hz ( i.e 0.5 Hz, as in example Sketch) , this will evaluate to
a tiny fraction which will evaluate to 0 for an integer type. So, BOTH of these lines should both be replaced with

delay_rate_incr =(delay_rate * 2147483648.0)/ AUDIO_SAMPLE_RATE_EXACT;

After modifying this file, the flange effect tested out properly for me.
I only started using Teensy/Audio board a few weeks ago, and am not sure the right way to report this to Paul ( a github notification perhaps??)
Overall I think the Audio Designer/ library is excellent.
 
Thanks a lot Frank. In the past I did most of my programming on my own and didn't need to use github. Now that I am getting more involved in "crowd-sourced" software/libraries, I'll have to learn to do more with github than just download other peoples libraries.
From the large amount of work you do with Teensy, that I see in the forum, I am guessing that there are more than 24 hours/day in Germany.
 
@bmillier: thanks for finding and fixing that bug. And @Frank B: thanks for doing the PR for it.

Pete
 
@pete. You're welcome. The flange effect works great, quite like the plug-in that I have in my PC DAW software. I think I will take a look at the chorus effect as it seems pretty "flat" . I believe it needs a small amount of random delay modulation to sound right, which may or may not be in there now.
Thanks for your coding effort on the audio library.
 
actually it would be nice to have a modulation input in addition to the audio signal both on the chorus and the flanger. Where you could connect a low frequency signal into. That way the effects can be really interesting and you can easy edit the width and tone of them. Don't know if this is easy. Will try to look at it..

...and it would also be REALLY nice to have a modulation input on the delay. Where the input (0-1) could set the delaytime between two limits. This is a buildingblock for a lot of cool effects like detune, reverb and pitchshifting. probalby harder to make then the modulationinput on the chorus and flanger.
 
Last edited:
Back
Top