Online IDE for a graphical programming environment to use the Teensy 3.x audio libraries. Loads of audio effects like flange, filter, envelopes, plus synthesized instruments of a few kinds.
Export and place into your code.http://www.pjrc.com/teensy/gui/
With just three blocks, I have 12 bit ADC, Flanger, and 12 bit DAC. See the notes on how to control each effect by simply clicking on the element after you've placed it. The ADC has a schematic for simple circuitry to properly bias the input. Maximum input is 0.6V peak, so a volume control is a good idea. A buffer amp should be included, but a guitar may not require amplification.
The Teensy input should be biased to 0.6V, with a maximum of 1.2Vpp signal. I think I'd include an Op Amp with LEDs that blink when the signal exceeds 1Vpp.
// GUItool: begin automatically generated code
AudioInputAnalog adc1; //xy=151,95
AudioEffectFlange flange1; //xy=471,186
AudioOutputAnalog dac1; //xy=793,261
AudioConnection patchCord1(adc1, flange1);
AudioConnection patchCord2(flange1, dac1);
// GUItool: end automatically generated code
Here is what it says about controlling and using the FLANGE block:
Originally, flanging was produced by playing the same signal on two synchronized reel-to-reel tape recorders and making one of the reels slow down and speed up by pressing on the flange of the reel (hence the name). This is a type of comb filtering, and produces a harmonically-related series of peaks and notches in the audio spectrum.
This flanger uses a delay line, combining the original voice with only one sample from the delay line, but the position of that sample varies sinusoidally.
The effect can be represented as:
result = sample(0) + sample(dt + depth*sin(2*PI*Fe))
The value of the sine function is always a number from -1 to +1 and so the result of depth*(sin(Fe)) is always a number from -depth to +depth. Thus, the delayed sample will be selected from the range (dt-depth) to (dt+depth). This selection will vary at whatever rate is specified as the frequency of the effect, Fe. Typically a low frequency (a few Hertz) is used.
In 0 Signal Input
Out 0 Flanged Output
begin(delayBuffer, length, offset, depth, delayRate);
Create a flanger by specifying the address of the delayline, the total number of samples in the delay line (often done as an integer multiple of AUDIO_BLOCK_SAMPLES), the offset (how far back the flanged sample is from the original voice), the modulation depth (larger values give a greater variation) and the modulation frequency, in Hertz.
voices(offset, depth, delayRate);
Alters the parameters in a running flanger (previously started with begin).
File > Examples > Audio > Effects > Flange
The longer the length of the delay buffer, the more memory blocks are used.
Try these settings:
#define FLANGE_DELAY_LENGTH (2*AUDIO_BLOCK_SAMPLES)
int s_idx = 2*FLANGE_DELAY_LENGTH/4;
int s_depth = FLANGE_DELAY_LENGTH/4;
double s_freq = 3;
The flange effect can also produce a chorus-like effect if a longer delay line is used with a slower modulation rate, for example try:
#define FLANGE_DELAY_LENGTH (12*AUDIO_BLOCK_SAMPLES)
int s_idx = 3*FLANGE_DELAY_LENGTH/4;
int s_depth = FLANGE_DELAY_LENGTH/8;
double s_freq = .0625;