a1) + a->zm1;
a->zm1 = y * a->a1 + x;
return y;
}
inline static void ap_set_delay(allpass *a, float d)
{
a->a1 = (1.0f - d) / (1.0f + d);
}
inline static void ap_clear(allpass *a)
{
a->a1 = 0.0f;
a->zm1 = 0.0f;
}
typedef struct {
float ga;
float gr;
float env;
} envelope;
inline static float env_run(envelope *e, float in)
{
float env_lvl = e->env;
in = fabs(in);
if (env_lvl < in) {
env_lvl = e->ga * (env_lvl - in) + in;
} else {
env_lvl = e->gr * (env_lvl - in) + in;
}
e->env = env_lvl;
return env_lvl;
}
// Set attack time in samples
inline static void env_set_attack(envelope *e, float a)
{
e->ga = f_exp(-1.0f/a);
}
// Set release time in samples
inline static void env_set_release(envelope *e, float r)
{
e->gr = f_exp(-1.0f/r);
}
]]>
LFO Phaser
ap);
free(plugin_data->lfo_tbl);
]]>
ym1 = ym1;
plugin_data->count = count;
plugin_data->lfo_pos = lfo_pos;
]]>
LFO rate (Hz)
LFO depth
Feedback
Spread (octaves)
Input
Output
4 x 4 pole allpass
ap);
]]>
y0 = y0;
plugin_data->y1 = y1;
plugin_data->y2 = y2;
plugin_data->y3 = y3;
]]>
Frequency 1
Feedback 1
Frequency 2
Feedback 2
Frequency 3
Feedback 3
Frequency 4
Feedback 4
Input
Output
Auto phaser
ap);
free(plugin_data->env);
]]>
ym1 = ym1;
]]>
Attack time (s)
Decay time (s)
Modulation depth
Feedback
Spread (octaves)
Input
Output