Gate
The parameters are copied from the Drawmer DS-201, but I've never used one, so if someone out there has one, please tell me if it behaves differently.
env) {
env = apost_filter;
} else {
env = apost_filter * ENV_TR + env * (1.0f - ENV_TR);
}
if (state == CLOSED) {
if (env >= t_level) {
state = OPENING;
}
} else if (state == OPENING) {
gate += a_rate;
if (gate >= 1.0f) {
gate = 1.0f;
state = OPEN;
hold_count = f_round(hold * fs * 0.001f);
plugin_data->hold_count = hold_count;
}
} else if (state == OPEN) {
if (hold_count <= 0) {
if (env < t_level) {
state = CLOSING;
}
} else {
hold_count--;
}
} else if (state == CLOSING) {
gate -= d_rate;
if (env >= t_level) {
state = OPENING;
} else if (gate <= 0.0f) {
gate = 0.0f;
state = CLOSED;
}
}
if (op == 0) {
buffer_write(output[pos], input[pos] * (cut * (1.0f - gate) + gate));
} else if (op == -1) {
buffer_write(output[pos], post_filter);
} else {
buffer_write(output[pos], input[pos]);
}
}
*(plugin_data->level) = CO_DB(env);
plugin_data->env = env;
plugin_data->gate = gate;
plugin_data->state = state;
plugin_data->hold_count = hold_count;
]]>
LF key filter (Hz)
Controls the cutoff of the low frequency filter (highpass).
HF key filter (Hz)
Controls the cutoff of the high frequency filter (lowpass).
Key level (dB)
Shows the current level of the key.
Threshold (dB)
Controls the level at which the gate will open.
Attack (ms)
Controls the time the gate will take to open fully.
Hold (ms)
Controls the minimum time the gate will stay open for.
Decay (ms)
Controls the time the gate will take to close fully.
Range (dB)
Controls the difference between the gate's open and closed state.
Output select (-1 = key listen, 0 = gate, 1 = bypass)
Controls output monitor. -1 is the output of the key filters (so you can check what is being gated on). 0 is the normal, gated output. 1 is bypass mode.
Input
Output
Stereo Gate
Derived from Steve Harris' gate plugin
env) {
env = apost_filter;
} else {
env = apost_filter * ENV_TR + env * (1.0f - ENV_TR);
}
if (state == CLOSED) {
if (env >= t_level) {
state = OPENING;
}
} else if (state == OPENING) {
gate += a_rate;
if (gate >= 1.0f) {
gate = 1.0f;
state = OPEN;
hold_count = f_round(hold * fs * 0.001f);
plugin_data->hold_count = hold_count;
}
} else if (state == OPEN) {
if (hold_count <= 0) {
if (env < t_level) {
state = CLOSING;
}
} else {
hold_count--;
}
} else if (state == CLOSING) {
gate -= d_rate;
if (env >= t_level) {
state = OPENING;
} else if (gate <= 0.0f) {
gate = 0.0f;
state = CLOSED;
}
}
if (op == 0) {
buffer_write(out1[pos], in1[pos] * (cut * (1.0f - gate) + gate));
buffer_write(out2[pos], in2[pos] * (cut * (1.0f - gate) + gate));
} else if (op == -1) {
buffer_write(out1[pos], post_filter);
buffer_write(out2[pos], post_filter);
} else {
buffer_write(out1[pos], in1[pos]);
buffer_write(out2[pos], in2[pos]);
}
}
*(plugin_data->level) = CO_DB(env);
plugin_data->env = env;
plugin_data->gate = gate;
plugin_data->state = state;
plugin_data->hold_count = hold_count;
]]>
LF key filter (Hz)
Controls the cutoff of the low frequency filter (highpass).
HF key filter (Hz)
Controls the cutoff of the high frequency filter (lowpass).
Key level (dB)
Shows the current level of the key.
Threshold (dB)
Controls the level at which the gate will open.
Attack (ms)
Controls the time the gate will take to open fully.
Hold (ms)
Controls the minimum time the gate will stay open for.
Decay (ms)
Controls the time the gate will take to close fully.
Range (dB)
Controls the difference between the gate's open and closed state.
Output select (-1 = key listen, 0 = gate, 1 = bypass)
Controls output monitor. -1 is the output of the key filters (so you can check what is being gated on). 0 is the normal, gated output. 1 is bypass mode.
Input 1
Input 2
Output 1
Output 2