Formant auto-wah
By:
Dan
filters
Tags:
This is an auto-wah that uses three different filters in parallel to mimic vowel sounds.
To adjust the vowel sounds, you find frequency ranges here:
Arduino Code
Knob and button functions

Attack speed
Resonance
Depth
Bypass
(unused)
Formant auto-wah
Copy / paste this code into the Arduino IDE, download and run this effect
.
#include <dreammakerfx.h> // Distortion creates a bunch of high harmonics that make the effect perceptible fx_destructor destructo(0.1, 6, SMOOTH_CLIP); // One envelope tracker for each filter so we can control attack / decay independently if we want to fx_envelope_tracker envy1(20, 500, false); fx_envelope_tracker envy2(40, 500, false); fx_envelope_tracker envy3(40, 500, false); // Three filters that will be controlled by our envelope trackers fx_biquad_filter filt_1(300.0, 3.0, BIQUAD_TYPE_BPF, BIQUAD_ORDER_6); fx_biquad_filter filt_2(500.0, 10.0, BIQUAD_TYPE_BPF, BIQUAD_ORDER_6); fx_biquad_filter filt_3(500.0, 10.0, BIQUAD_TYPE_BPF, BIQUAD_ORDER_6); // Output gain adjustmemt fx_gain out_gain(1.5); // Envelope tracker input gain to affect depth of effect fx_gain env_gain(2.0); // Mixer to mix our 3 filters together fx_mixer_3 mix_3; void setup() { // put your setup code here, to run once: pedal.init(false); // Route instrument in through gain and then to each envelope tracker pedal.route_audio(pedal.instr_in, env_gain.input); pedal.route_audio(env_gain.output, envy1.input); pedal.route_audio(env_gain.output, envy2.input); pedal.route_audio(env_gain.output, envy3.input); // Route instrument through distortion, filters, mixer and gain pedal.route_audio(pedal.instr_in, destructo.input); pedal.route_audio(destructo.output, filt_1.input); pedal.route_audio(destructo.output, filt_2.input); pedal.route_audio(destructo.output, filt_3.input); pedal.route_audio(filt_1.output, mix_3.input_1); pedal.route_audio(filt_2.output, mix_3.input_2); pedal.route_audio(filt_3.output, mix_3.input_3); pedal.route_audio(mix_3.output, out_gain.input); pedal.route_audio(out_gain.output, pedal.amp_out); // Scale envelope to line up with vocal sounds for "boot" and "car" // First parameter of route control is scale and the second is offet pedal.route_control(envy1.envelope, filt_1.freq, 360.0, 300.0); pedal.route_control(envy2.envelope, filt_2.freq, 1000.0, 870.0); pedal.route_control(envy3.envelope, filt_3.freq, 400.0, 2000.0); // Add a bypass button pedal.add_bypass_button(FOOTSWITCH_LEFT); // Run it! pedal.run(); } void loop() { // put your main code here, to run repeatedly: // Left pot changes the resonance of the filter if (pedal.pot_left.has_changed()) { filt_1.set_q(1 + pedal.pot_left.val*4.0); filt_2.set_q(1 + pedal.pot_left.val*6.0); filt_2.set_q(1 + pedal.pot_left.val*1.0); // As filter resonance increases, total energy drops // So scale up gain too when we crank up resonance out_gain.set_gain(1.0 + 4.0*(pedal.pot_left.val)); } // Center pot sets attack speed if (pedal.pot_center.has_changed()) { envy1.set_attack_speed_ms(20 + pedal.pot_center.val*1000.0); envy2.set_attack_speed_ms(20 + pedal.pot_center.val*1000.0); envy3.set_attack_speed_ms(20 + pedal.pot_center.val*1000.0); } // Right pot sets depth of effect if (pedal.pot_right.has_changed()) { env_gain.set_gain(0.1 + pedal.pot_right.val*4); } // Run pedal service to take care of stuff pedal.service(); }