Faust Gate
-
I'm trying to use the Gate library here, what's the mistake here?
import("stdfaust.lib"); thresh = hslider("Threshold [dB]", -40, -80, 0, 0.1) : ba.db2linear; att = hslider("Attack [ms]", 10, 0, 100, 1) : si.smoo; rel = hslider("Release [ms]", 100, 10, 500, 1) : si.smoo; hold = hslider("Hold [ms]", 10, 0, 100, 1) : si.smoo; process = _,_ : gate_stereo(thresh,att,hold,rel) : _,_;
-
@resonant what error are you getting?
you might want to try
process = _,_ : ef.gate_stereo(thresh,att,hold,rel) : _,_;
-
@Lindon said in Faust Gate:
@resonant what error are you getting?
you might want to try
process = _,_ : ef.gate_stereo(thresh,att,hold,rel) : _,_;
thanks
-
Am I the only one experiencing Standard Faust Gate does not work?
import("stdfaust.lib"); thresh = hslider("Threshold [dB]", -40, -80, 0, 0.1) : ba.db2linear; att = hslider("Attack [ms]", 10, 0, 100, 1) : si.smoo; hold = hslider("Hold [ms]", 10, 0, 100, 1) : si.smoo; rel = hslider("Release [ms]", 100, 10, 500, 1) : si.smoo; process = _,_ : ef.gate_stereo(thresh,att,hold,rel) : _,_;
-
@resonant I haven't tried your script yet, but if you want, I'll leave you my gate in Faust in the meantime. It's still under development, but maybe it could help you put a temporary "patch" on it.
//----------------------------------------------- // High-Gain Guitar Noise Gate (Zuul-inspired) // Designed for metal and djent applications //----------------------------------------------- declare name "Zuul-like Gate"; declare version "0.1"; declare description "High-gain guitar noise gate with sidechain input"; import("stdfaust.lib"); // UI section with all requested parameters //----------------------------------------------- threshold_db = hslider("threshold[unit:dB]", -40, -80, 0, 0.1) : si.smoo; attack_ms = hslider("attack[unit:ms]", 0.1, 0.01, 10, 0.01) : si.smoo; hold_ms = hslider("hold[unit:ms]", 50, 0, 500, 1) : si.smoo; release_ms = hslider("release[unit:ms]", 100, 10, 1000, 1) : si.smoo; hysteresis_db = hslider("hysteresis[unit:dB][tooltip:Amount below threshold before gate closes]", 6, 0, 12, 0.1) : si.smoo; key_switch = checkbox("key_input [tooltip:Use right channel as sidechain when ON]") : si.smoo; // Simple hysteresis implementation hysteresis(lower, upper, x) = y letrec { 'y = (x > upper) | (y & (x > lower)); }; // Process section - main function implementation //----------------------------------------------- process(audio_left, audio_right) = audio_left * gate_env, audio_right * gate_env with { // Convert time parameters to seconds attack = attack_ms * 0.001; release = release_ms * 0.001; hold_time = hold_ms * 0.001; // Threshold conversion from dB to linear scale threshold = ba.db2linear(threshold_db); lower_threshold = ba.db2linear(threshold_db - hysteresis_db); // Select between main input (audio_left) and sidechain input (audio_right) // When key_switch is off, use audio_left for detection // When key_switch is on, use audio_right as sidechain input detection_input = select2(key_switch, audio_left, audio_right); // Envelope detection for detection input env = abs(detection_input) : si.smooth(ba.tau2pole(0.001)); // Gate triggering with hysteresis gate = hysteresis(lower_threshold, threshold, env); // Hold circuit using peakholder hold_samples = int(hold_time * ma.SR); gate_with_hold = gate : ba.peakholder(hold_samples); // Create envelope for smooth transitions gate_env = gate_with_hold : en.asr(attack, 1.0, release); };
-
-
@resonant said in Faust Gate:
Is there a possibility to add modulation to this like below?
From FAUST documentation: https://faustdoc.grame.fr/manual/syntax/index.html#faust-syntax
"Thevbargraph
primitive implements a vertical bargraph (typically a meter displaying the level of a signal)."I'm not absolutely sure, I would try with a FAUST
vbargraph
primitive to "visualize the effect" and then connect it to a scriptnode node; like in:
https://forum.hise.audio/topic/10619/gain-reduction-meter-on-a-faust-compressor?_=1754048833174 -
Thank you for the explanation. I don't mean a graphic, but a modulation like the one in the image below. Not separate Right and Left, but a single one (like the scriptnode gate, comp...etc.).