CC-BY-SA www.triceratupuz.altervista.org triceratupuz@libero.it -iadc -odac -m3 -d Organoise II
filter in Global time


Delays
in time amp modulation freq/mix
feedback output
feedback output
feedback output


Freezers dir del
fr vo
re di
mf ma
fr vo
re di
mf ma
fr vo
re di
mf ma


Reverb A Reverb B
Dly Dly
Freez Freez
in Hp in Hp
Room Room
LP LP
D-W D-W
Vol Vol






sr = 48000 ksmps = 256 nchnls = 2 0dbfs = 1 zakinit 5, 1; a, k opcode AtanLimit, a, a ain xin aout = 2 * taninv(ain) / 3.1415927 xout aout endop ;transfer function for distortion gidistfunction ftgen 0,0, 257, 9, .5,1,270 ;pan movement function gipanfunction ftgen 0,0, 1024 * 2 * 2 * 2 * 2, 10, 1, 0.5, 0.3, 0.25, 0.2 ;pan movement function gisine ftgen 0,0, 1024 * 2 * 2 * 2 * 2, 10, 1 instr 1;controllers ainl, ainr ins kmaxf init 9000 kfilton_ chnget "filton" kfilton init 0 if kfilton_ != 0 then kfilton = kfilton_ - 0.1 endif kmaxf_ chnget "filtf" kmaxf init 100 if kmaxf_ != 0 then kmaxf = kmaxf_ * 7000 endif if kfilton > 0 then krms rms ainl + ainr ainna butlp ainl + ainr, 50 + krms * kmaxf ainnb butbp ainl + ainr, 50 + krms * kmaxf, krms * kmaxf * 0 ainn = ainna + ainnb else ainn = ainl + ainr endif alimit AtanLimit ainn * 2 zawm alimit * 1.1, 0 gkgtime init 0.01 kgtime_ chnget "gtime" if kgtime_ != 0 then gkgtime = kgtime_ endif gkgtimep port gkgtime, 0.02;read from channel ;schedule other instruments ;event_i "i", 2, 0, -1 event_i "i", 5.1, 0, -1, 1 event_i "i", 5.2, 0, -1, 2 event_i "i", 5.3, 0, -1, 3 event_i "i", 8, 0, -1 event_i "i", 100, 0, -1 kstatus_feed1_ chnget "feed_1" kstatus_feed1 init 0 if kstatus_feed1_ != 0 then kstatus_feed1 = kstatus_feed1_ - 0.1 endif ktrig1 changed kstatus_feed1 if ktrig1 == 1 && kstatus_feed1 == 1 then schedkwhen ktrig1, -1, -1, 9.01, 0, -1, 1 elseif ktrig1 == 1 && kstatus_feed1 == 0 then schedkwhen ktrig1, -1, -1, -9.01, 0, -1 endif kstatus_feed2_ chnget "feed_2" kstatus_feed2 init 0 if kstatus_feed2_ != 0 then kstatus_feed2 = kstatus_feed2_ - 0.1 endif ktrig2 changed kstatus_feed2 if ktrig2 == 1 && kstatus_feed2 == 1 then schedkwhen ktrig2, -1, -1, 9.02, 0, -1, 2 elseif ktrig2 == 1 && kstatus_feed2 == 0 then schedkwhen ktrig2, -1, -1, -9.02, 0, -1 endif kstatus_feed3_ chnget "feed_3" kstatus_feed3 init 0 if kstatus_feed3_ != 0 then kstatus_feed3 = kstatus_feed3_ - 0.1 endif ktrig3 changed kstatus_feed3 if ktrig3 == 1 && kstatus_feed3 == 1 then schedkwhen ktrig3, -1, -1, 9.03, 0, -1, 3 elseif ktrig3 == 1 && kstatus_feed3 == 0 then schedkwhen ktrig3, -1, -1, -9.03, 0, -1 endif endin instr 5;Distorted delay ain zar 0 Schanndly sprintf "time%d", p4 ktime init 0.01 ktime_ chnget Schanndly if ktime_ != 0 then ktime = ktime_ endif ktimep portk ktime, gkgtimep;read from channel Schanndlyin sprintf "in_d_%d", p4 kinput init 0 kinput_ chnget Schanndlyin if kinput_ != 0 then kinput = kinput_ - 0.1 endif kinputp portk kinput, gkgtimep Schanndlyfeed sprintf "feed_d_%d", p4 kfeed init 0 kfeed_ chnget Schanndlyfeed if kfeed_ != 0 then kfeed = kfeed_ - 0.1 endif kfeedp portk kfeed, gkgtimep Schanndlyout sprintf "out_d_%d", p4 kout init 0 kout_ chnget Schanndlyout if kout_ != 0 then kout = kout_ - 0.1 endif koutp portk kout, gkgtimep kdist init 0.05; distortion amount Schannrmf sprintf "rmf%d", p4 krmf init 0 krmf_ chnget Schannrmf if krmf_ != 0 then krmf = krmf_ - 0.01 endif krmfp portk krmf, gkgtimep krmfp init 0.01 Schannrmm sprintf "rmm%d", p4 krmm init 0 krmm_ chnget Schannrmm if krmm_ != 0 then krmm = krmm_ - 0.01 endif krmmp portk krmm, gkgtimep adump delayr 5 afeed deltap ktimep ;gain control kgaindist rms afeed * 1.02 kinG port 1 - kgaindist, 0.11; distortion gain - less signal more distortion ;feedback distortion abdist distort afeed * (kinG + 0.01), kdist, gidistfunction abdistlp butlp abdist, 7500 ;ring modulation amodul oscil 0.5, krmfp, gisine arm = (0.5 + amodul) * abdistlp ;feedback limiter afeed limit abdistlp * krmmp + arm * (1 - krmmp), -1 * kgaindist, kgaindist delayw ain * kinputp + afeed * kfeedp kpan oscil kinG * 0.5, 2 / ktime, gipanfunction alh, arh pan2 afeed * koutp, 0.5 + kpan;delete original signal zawm alh, 1 zawm arh, 2 endin instr 8 aind zar 0;direct ainL zar 1;delay Left ainR zar 2;delay right kin_di_ chnget "freezindir" kin_di init 1 if kin_di_ != 0 then kin_di = kin_di_ - 0.1 endif kin_de_ chnget "freezindel" kin_de init 1 if kin_de_ != 0 then kin_de = kin_de_ - 0.1 endif ain = kin_di * aind + kin_de * (ainL + ainR) ifft = 1024 gfin pvsanal ain, ifft, ifft / 2, ifft, 0 endin instr 9;time freezer ifreez init 0.05 iattenv init i(gkgtimep) irelenv init i(gkgtimep) ktrig line 0, 0.05, 1 freez pvsfreeze gfin, ktrig, ktrig afrrr pvsynth freez kenvelope linsegr 0, ifreez, 0, iattenv, 1, irelenv, 0 Schan_f sprintf "f_lpfreq_%d", p4 k_lpf init 1.00 k_lpf_ chnget Schan_f if k_lpf_ != 0 then k_lpf = k_lpf_ endif k_lpfp portk k_lpf * k_lpf * 10000, gkgtimep Schan_r sprintf "f_lpres_%d", p4 k_lpr init 0.01 k_lpr_ chnget Schan_r if k_lpr_ != 0 then k_lpr = k_lpr_ endif k_lprp portk k_lpr, gkgtimep Schan_d sprintf "f_lpdis_%d", p4 k_lpd init 0.01 k_lpd_ chnget Schan_d if k_lpd_ != 0 then k_lpd = k_lpd_ endif k_lpdp portk k_lpd, gkgtimep Schan_v sprintf "f_lpvol_%d", p4 k_lpv init 1.00 k_lpv_ chnget Schan_v if k_lpv_ != 0 then k_lpv = k_lpv_ endif k_lpvp portk k_lpv, gkgtimep afrrrf lpf18 afrrr, k_lpfp, k_lprp, k_lpdp Schan_vcoa sprintf "vco_a_%d", p4 k_vcoa init 0.001 k_vcoa_ chnget Schan_vcoa if k_vcoa_ != 0 then k_vcoa = k_vcoa_ endif k_vcoap portk k_vcoa, gkgtimep Schan_vcof sprintf "vco_f_%d", p4 k_vcof init 0.001 k_vcof_ chnget Schan_vcof if k_vcof_ != 0 then k_vcof = k_vcof_ * 0.5 endif k_vcofp portk k_vcof * k_vcof * 880, gkgtimep aam vco2 1, k_vcofp, 4, 0.5 aamA = abs(aam) aout = (afrrrf * (1 - k_vcoap) + afrrrf * aamA * k_vcoap) * k_lpvp * 3 * kenvelope zawm aout, 3 zawm aout, 4 endin instr 100;output ; in dly k_indly init 0.5 k_indly_ chnget "indly" if k_indly_ != 0 then k_indly = k_indly_ - 0.01 endif k_indlyp portk k_indly, gkgtimep ; in dly2 k_indly2 init 0 k_indly2_ chnget "indly2" if k_indly2_ != 0 then k_indly2 = k_indly2_ - 0.01 endif k_indly2p portk k_indly2, gkgtimep ; in freez k_infreez init 0 k_infreez_ chnget "infreez" if k_infreez_ != 0 then k_infreez = k_infreez_ - 0.01 endif k_infreezp portk k_infreez, gkgtimep ; in freez2 k_infreez2 init 0.5 k_infreez2_ chnget "infreez2" if k_infreez2_ != 0 then k_infreez2 = k_infreez2_ - 0.01 endif k_infreez2p portk k_infreez2, gkgtimep ; in hp k_inhp init 0.01 k_inhp_ chnget "inhp" if k_inhp_ != 0 then k_inhp = k_inhp_ endif k_inhpp portk k_inhp * 2000, gkgtimep ; in hp2 k_inhp2 init 0.01 k_inhp2_ chnget "inhp2" if k_inhp2_ != 0 then k_inhp2 = k_inhp2_ endif k_inhp2p portk k_inhp2 * 2000, gkgtimep ;Room k_rRoom init 0.5 k_rRoom_ chnget "rRoom" if k_rRoom_ != 0 then k_rRoom = k_rRoom_ - 0.01 endif k_rRoomp portk k_rRoom, gkgtimep ;Room 2 k_rRoom2 init 0.5 k_rRoom2_ chnget "rRoom2" if k_rRoom2_ != 0 then k_rRoom2 = k_rRoom2_ -- 0.01 endif k_rRoom2p portk k_rRoom2, gkgtimep ;Damping k_rLp init 0.5 k_rLp_ chnget "rLp" if k_rLp_ != 0 then k_rLp = k_rLp_ endif k_rLpp portk k_rLp * k_rLp * 18000, gkgtimep ;Damping 2 k_rLp2 init 0.5 k_rLp2_ chnget "rLp2" if k_rLp2_ != 0 then k_rLp2 = k_rLp2_ endif k_rLp2p portk k_rLp2 * k_rLp2 * 18000, gkgtimep ;Dry Wet k_drywet init 0.5 k_drywet_ chnget "drywet" if k_drywet_ != 0 then k_drywet = k_drywet_ - 0.01 endif k_drywetp portk k_drywet, gkgtimep ;Dry Wet 2 k_drywet2 init 0.5 k_drywet2_ chnget "drywet2" if k_drywet2_ != 0 then k_drywet2 = k_drywet2_ - 0.01 endif k_drywet2p portk k_drywet2, gkgtimep ;Output Volume k_voOut init 0.7 k_voOut_ chnget "voOut" if k_voOut_ != 0 then k_voOut = k_voOut_ - 0.01 endif k_voOutp portk k_voOut, gkgtimep ;Output Volume 2 k_voOut2 init 0.7 k_voOut2_ chnget "voOut2" if k_voOut2_ != 0 then k_voOut2 = k_voOut2_ - 0.01 endif k_voOut2p portk k_voOut2, gkgtimep adlyL zar 1 adlyR zar 2 afeeL zar 3 afeeR zar 4 alin buthp adlyL * k_indlyp + afeeL * k_infreezp, k_inhpp arin buthp adlyR * k_indlyp + afeeR * k_infreezp, k_inhpp alin2 buthp adlyL * k_indly2p + afeeL * k_infreez2p, k_inhp2p arin2 buthp adlyR * k_indly2p + afeeR * k_infreez2p, k_inhp2p aleft, aright reverbsc alin, arin, k_rRoomp, k_rLpp aleft2, aright2 reverbsc alin2, arin2, k_rRoom2p, k_rLp2p alll = k_drywetp * aleft + (1 - k_drywetp) * alin arrr = k_drywetp * aright + (1 - k_drywetp) * arin alll2 = k_drywet2p * aleft2 + (1 - k_drywet2p) * alin2 arrr2 = k_drywet2p * aright2 + (1 - k_drywet2p) * arin2 aleftl AtanLimit (alll * k_voOutp + alll2 * k_voOut2p) * 6 arightl AtanLimit (arrr * k_voOutp + arrr2 * k_voOut2p) * 6 outs aleftl, arightl ; record output ;fout "/mnt/sdcard/organoise_II.wav", 14, aleftl, arightl; or 16 fout "/storage/extSdCard/organoise_II.wav", 14, aleftl, arightl; or 16 ;clean z space zacl 0, 4 endin i 1 0 360000