;Rain.orc - Computer Music Instruments ;Copyright (C) 2001 Jacob T. Joaquin ; ;This program is free software; you can redistribute it and/or ;modify it under the terms of the GNU General Public License ;as published by the Free Software Foundation; either version 2 ;of the License, or (at your option) any later version. ; ;This program is distributed in the hope that it will be useful, ;but WITHOUT ANY WARRANTY; without even the implied warranty of ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;GNU General Public License for more details. ; ;You should have received a copy of the GNU General Public License ;along with this program; if not, write to the Free Software ;Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. sr = 44100 kr = 4410 ksmps = 10 nchnls = 2 giScale = 32768 zakinit 5, 5 ; Sine Wave with Envelope instr 1 iDur = p3 iAmp = p4 iPitch = p5 iAttack = p6 iPan = p7 iRoute = p8 iChannel = p9 iChannel2 = p9+1 aLine linseg 0, iDur * iAttack, iAmp, iDur * (1-iAttack), 0 aOsc0 oscil aLine, iPitch, 1 outs iAmp*aOsc0*giScale*sqrt(iPan), iAmp*aOsc0*giScale*sqrt(1-iPan) zawm sqrt(1-iPan)*aOsc0*iAmp * iRoute, iChannel zawm sqrt(iPan)*aOsc0*iAmp * iRoute, iChannel2 endin ; Inverse Fibonacci Tap Reverb instr 106 iFx = p4 iAmp = p5 iRevTime = p6 iDelMult = p7 iPan = p8 aIn zar iFx aDelayLine delayr iDelMult aTap0 deltapi 1/144 * iDelMult aTap1 deltapi 1/89 * iDelMult aTap2 deltapi 1/55 * iDelMult aTap3 deltapi 1/34 * iDelMult aTap4 deltapi 1/21 * iDelMult aTap5 deltapi 1/13 * iDelMult aTap6 deltapi 1/8 * iDelMult aTap7 deltapi 1/5 * iDelMult aTap8 deltapi 1/3 * iDelMult aTap9 deltapi 1/2 * iDelMult aTap10 deltapi 1/1 * iDelMult aTap11 deltapi 1/1 * iDelMult delayw aIn aRevLeft = (aTap0 + aTap2*.5 + aTap4*.333 + aTap6*.2 + aTap8*.111 + aTap10*.1) * .333 aRevRight = (aTap1 + aTap3*.5 + aTap5*.333 + aTap7*.2 + aTap9*.111 + aTap11*.1) * .333 aRevLeft tone aRevLeft, 1000 aRevRight tone aRevRight, 1000 aRevLeft reverb aRevLeft, iRevTime aRevRight reverb aRevRight, iRevTime outs aRevLeft * giScale * iAmp * iPan, aRevRight * giScale * iAmp * (1-iPan) zacl iFx, iFx endin