#include "/twist/transform_api.udo" instr twst_tf_lpf $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kfreq = twst_param:k("frequency") if (ileft == 1) then aL butterlp aL, kfreq endif if (iright == 1) then aR butterlp aR, kfreq endif outs aL, aR endin instr twst_tf_hpf $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kfreq = twst_param:k("frequency") if (ileft == 1) then aL butterhp aL, kfreq endif if (iright == 1) then aR butterhp aR, kfreq endif outs aL, aR endin instr twst_tf_bpf $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kfreq = twst_param:k("frequency") kbw = twst_param:k("bandwidth") if (ileft == 1) then aL butterbp aL, kfreq, kbw endif if (iright == 1) then aR butterbp aR, kfreq, kbw endif outs aL, aR endin instr twst_tf_pareq $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kfreq = twst_param:k("frequency") kgain = twst_param:k("gain") kq = twst_param:k("q") if (ileft == 1) then aL pareq aL, kfreq, kgain, kq endif if (iright == 1) then aR pareq aR, kfreq, kgain, kq endif outs aL, aR endin instr twst_tf_dcblock $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput if (ileft == 1) then aL dcblock2 aL endif if (iright = 1) then aR dcblock2 aR endif outs aL, aR endin /* not in WASM { name: "Non-linear filter", instr: "twst_tf_nlfilter", parameters: [ {name: "Parameter a", channel: "pa", min: 0, max: 1, dfault: 0.3}, {name: "Parameter b", channel: "pb", min: -1, max: 1, dfault: 0.1}, {name: "Parameter d", channel: "pd", min: 0, max: 1, dfault: 0.7}, {name: "Parameter C", channel: "pC", min: 0, max: 1, dfault: 0.12}, {name: "Parameter L", channel: "pL", min: 1, max: 220, dfault: 20}, {preset: "applymode"} ] }, instr twst_tf_nlfilter $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kpa = twst_param:k("pa") kpb = twst_param:k("pb") kpd = twst_param:k("pd") kpC = twst_param:k("pC") kpL = twst_param:k("pL") nfilt if (ileft == 1) then aL nfilt2 aL, kpa, kpb, kpd, kpC, kpL endif if (iright == 1) then aR nfilt2 aR, kpa, kpb, kpd, kpC, kpL endif outs aL, aR endin */ instr twst_tf_mooghpf $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kfreq = twst_param:k("freq") if (ileft == 1) then aL mvchpf aL, kfreq endif if (iright == 1) then aR mvchpf aR, kfreq endif outs aL, aR endin instr twst_tf_mooglpf $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kfreq = twst_param:k("freq") kres = twst_param:k("resonance") kmode = twst_param:k("mode") if (ileft == 1) then if (kmode == 0) then aL mvclpf1 aL, kfreq, kres elseif (kmode == 1) then aL mvclpf2 aL, kfreq, kres elseif (kmode == 2) then aL mvclpf3 aL, kfreq, kres endif endif if (iright == 1) then if (kmode == 0) then aR mvclpf1 aR, kfreq, kres elseif (kmode == 1) then aR mvclpf2 aR, kfreq, kres elseif (kmode == 2) then aR mvclpf3 aR, kfreq, kres endif endif outs aL, aR endin instr twst_tf_waveguide1 $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kfreq = twst_param:k("freq") kcutoff = twst_param:k("cutoff") kfeedback = twst_param:k("feedback") if (ileft == 1) then aL wguide1 aL, kfreq, kcutoff, kfeedback endif if (iright == 1) then aR wguide1 aR, kfreq, kcutoff, kfeedback endif outs aL, aR endin instr twst_tf_tbvcf $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kfreq = twst_param:k("freq") kres = twst_param:k("resonance") kdist = twst_param:k("dist") kasym = twst_param:k("asym") if (ileft == 1) then aL tbvcf aL, kfreq, kres, kdist, kasym endif if (iright == 1) then aR tbvcf aR, kfreq, kres, kdist, kasym endif outs aL, aR endin