import("stdfaust.lib"); import("src/util.dsp"); UIGroupOscA(x) = hgroup("Oscillator A", x); UIFreqA = UIGroupOscA(vslider("Frequency", 440.0, 20.0, 10000.0, 1)); UIFoldGain = UIGroupOscA(vslider("Fold", 1.0, 0.0, 5.0, 0.01)); UIMorph = UIGroupOscA(vslider("Morph", 0.5, 0.0, 1.0, 0.001)); UIGroupOscB(x) = hgroup("Oscillator B", x); UIFreqB = UIGroupOscB(vslider("Frequency", 440.0, 20.0, 10000.0, 1)); UIDecay = UIGroupOscB(vslider("Decay", 0.0, 0.0, 1.0, 0.01)); UIMod = vslider("Modulation", 0.0, 0.0, 1.0, 0.001); process = oscA * oscB with { oscB = UIFreqA : phase : *(-UIDecay*10.0) : exp; oscA = UIFreqB : phase : +(oscB*UIMod) : fmod(_,1.0) : knee(UIMorph) : sin(_*2.0*ma.PI) : *(UIFoldGain) : fold; };