#include "/twist/transform_api.udo" #include "/frequency_tools.udo" instr twst_tf_freqshift1 $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kshift = twst_param:k("shift") if (ileft == 1 && iright == 1) then aL, aR freqshift1 aL, aR, kshift elseif (ileft == 1) then aL freqshift1 aL, kshift elseif (iright == 1) then aR freqshift1 aR, kshift endif outs aL, aR endin instr twst_tf_freqshift2 $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kshift = twst_param:k("shift") if (ileft == 1 && iright == 1) then aL, aR freqshift2 aL, aR, kshift elseif (ileft == 1) then aL freqshift2 aL, kshift elseif (iright == 1) then aR freqshift2 aR, kshift endif outs aL, aR endin instr twst_tf_ringmod $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kfreq = twst_param:k("frequency") if (ileft == 1 && iright == 1) then aL, aR ringmod1 aL, aR, kfreq elseif (ileft == 1) then aL ringmod1 aL, kfreq elseif (iright == 1) then aR ringmod1 aR, kfreq endif outs aL, aR endin instr twst_tf_exciter $TWST_TRANSFORM aL, aR, ileft, iright twst_getinput kfreqlow = twst_tf_freq_custom("low") kfreqhigh = twst_tf_freq_custom("high") kharmonics = twst_param:k("harmonics") kblend = twst_param:k("blend") if (kfreqhigh < kfreqlow) then kfreqhigh = kfreqlow endif if (ileft == 1) then aL exciter aL, kfreqlow, kfreqhigh, kharmonics, kblend endif if (iright == 1) then aR exciter aR, kfreqlow, kfreqhigh, kharmonics, kblend endif outs aL, aR endin