import("stdfaust.lib"); import("src/util.dsp"); UIGroupOscA(x) = vgroup("Oscillator A", x); UIFreqA = UIGroupOscA(hslider("Frequency", 440.0, 20.0, 10000.0, 1)); UIMorphA = UIGroupOscA(hslider("Morph", 0.5, 0.0, 1.0, 0.001)); UIGroupOscB(x) = vgroup("Oscillator B", x); UIFreqB = UIGroupOscB(hslider("Frequency", 440.0, 20.0, 10000.0, 1)); UIMorphB = UIGroupOscB(hslider("Morph", 0.5, 0.0, 1.0, 0.001)); UIFoldGain = hslider("Fold", 1.0, 0.0, 5.0, 0.01); UIMix = hslider("Mix", -1.0, -1.0, 1.0, 0.001); UIMod = hslider("Modulation", 0.0, 0.0, 1.0, 0.001); process = pmoscillators ~ (scaletwo(UIMod) : crossconnect) : \(a, b).(a, a*b, b) : blendthree(UIMix) : *(UIFoldGain) : fold with { pmsinemorph(morph, freq, pmod) = freq : phase + pmod : fmod(_, 1.0) : knee(morph) : sin(_*2.0*ma.PI); pmoscillators = pmsinemorph(UIMorphA, UIFreqA) , pmsinemorph(UIMorphB, UIFreqB); scaletwo(s) = par(i, 2, *(s)); crossconnect = route(2,2,1,2,2,1); };