Flanger
A digital flanger implementation. Uses a novel zero excursion, controlled bandwidth modulation function, which should make the modulation less repetitive and noticable.
This effect is similar in character to a phaser (see section \ref{lfoPhaser}). The main difference is that a phaser sounds more regular and stable.
delay_tbl);
]]>
1.0f) {
p_ph -= 1.0f;
}
law = f_sin_sq(3.1415926f*p_ph)*prev_law_peak +
f_sin_sq(3.1415926f*n_ph)*next_law_peak;
dp = (float)(delay_pos - d_base) - (delay_depth * law);
// Get the integer part
dp_idx = f_round(dp - 0.5f);
// Get the fractional part
dp_frac = dp - dp_idx;
// Accumulate into output buffer
out = cube_interp(dp_frac, delay_tbl[(dp_idx-1) & (delay_size-1)], delay_tbl[dp_idx & (delay_size-1)], delay_tbl[(dp_idx+1) & (delay_size-1)], delay_tbl[(dp_idx+2) & (delay_size-1)]);
// Store new delayed value
delay_tbl[delay_pos] = flush_to_zero(input[pos] + (fb * out));
// Sometimes the delay can pick up NaN values, I'm not sure why
// and this is easier than fixing it
if (isnan(delay_tbl[delay_pos])) {
delay_tbl[delay_pos] = 0.0f;
}
out = f_clamp(delay_tbl[delay_pos] * 0.707f, -1.0, 1.0);
buffer_write(output[pos], out);
frac += step;
delay_pos = (delay_pos + 1) & (delay_size-1);
count++;
}
plugin_data->count = count;
plugin_data->prev_law_peak = prev_law_peak;
plugin_data->next_law_peak = next_law_peak;
plugin_data->prev_law_pos = prev_law_pos;
plugin_data->next_law_pos = next_law_pos;
plugin_data->delay_pos = delay_pos;
plugin_data->old_d_base = new_d_base;
]]>
Delay base (ms)
This is the offset from the input time that the detune delay moves around.
10 is probably a good starting value.
Max slowdown (ms)
This is the maximum delay that will be applied to the delayed signal, relative to the dry signal.
LFO frequency (Hz)
This is the core frequency that the 'LFO' will move at. The LFO isn't actually an oscillator, but it does vary periodically.
Feedback
Feedback applied from the output to the input, increases the depth of the effect, but makes it sound less like a real flanger.
Input
Output