;==================================================================================================
; "Incantation"
; by Darren Nelsen
; An experiment in acoustically viable synthesized instruments.
; http://www.curiomusic.com
; Copyright 2008
; Licensed to the public under http://creativecommons.org/licenses/by-nc-sa/3.0/
;==================================================================================================
sr = 44100
ksmps= 1
nchnls = 2
ga_rvb init 0
instr Flute
itab_sign chnget "com.curiomusic.global.sign"
if (itab_sign == 0) then
itab_sign ftgen 0, 0, 65536, 10, 1
chnset itab_sign, "com.curiomusic.global.sign"
endif
itab_flute_amp_env chnget "com.curiomusic.instr.flute.amp.env"
if (itab_flute_amp_env == 0) then
itab_flute_amp_env ftgen 0, 0, 513, 7, 1, 260, 1, 253, 0
chnset itab_flute_amp_env, "com.curiomusic.instr.flute.amp.env"
endif
aflute1 init 0
idur = p3
iamp = p4
ifqc = cpspch(p5)
ipress = p6
ibreath = p7
ifeedbk1 = p8
ifeedbk2 = p9
iwetamt = p10
; panning
ipan = p11
kpan2 = ipan*3.14159265*.5
kpanl = cos(kpan2)
kpanr = sin(kpan2)
; FLOW SETUP
kenv1 linseg 0, .06, 1.1*ipress, .2, ipress, p3-.16, ipress, .02, 0
kenv2 linseg 0, .01, 1, p3-.02, 1, .01, 0
kenvibr linseg 0, .5, 0, .5, 1, p3-1, 1 ; VIBRATO ENVELOPE
; THE VALUES MUST BE APPROXIMATELY -1 TO 1 OR THE CUBIC WILL BLOW UP
aflow1 rand kenv1
kvibr oscil .1*kenvibr, .134, itab_sign
; ibreath CAN BE USED TO ADJUST THE NOISE LEVEL
asum1 = ibreath*aflow1 + kenv1 + kvibr
asum2 = asum1 + aflute1*ifeedbk1
afqc = 1/ifqc - asum1/20000 -9/sr + ifqc/12000000
; EMBOUCHURE DELAY SHOULD BE 1/2 THE BORE DELAY
; ax delay asum2, (1/ifqc-10/sr)/2
atemp1 delayr 1/ifqc/2
ax deltapi afqc/2 ; - asum1/ifqc/10 + 1/1000
delayw asum2
apoly = ax - ax*ax*ax
asum3 = apoly + aflute1*ifeedbk2
avalue tone asum3, 2000
; BORE, THE BORE LENGTH DETERMINES PITCH. SHORTER IS HIGHER PITCH
atemp2 delayr 1/ifqc
aflute1 deltapi afqc
delayw avalue
amix = avalue*iamp*kenv2
kvol oscili 1, 1/idur, itab_flute_amp_env
aout = amix*kvol
outs aout*kpanl, aout*kpanr
ga_rvb = ga_rvb + aout * iwetamt
endin
instr Gong
ilen = p3
iamp = p4
ifrq = cpspch(p5)
itab_sign chnget "com.curiomusic.global.sign"
if (itab_sign == 0) then
itab_sign ftgen 0, 0, 65536, 10, 1
chnset itab_sign, "com.curiomusic.global.sign"
endif
itab_gong_amp_env chnget "com.curiomusic.instr.gong.amp.env"
if (itab_gong_amp_env == 0) then
itab_gong_amp_env ftgen 0, 0, 512, 5, 128, 512, 0.01
chnset itab_gong_amp_env, "com.curiomusic.instr.gong.amp.env"
endif
ifrq1 = 1.0000 * ifrq
ifrq2 = 1.1541 * ifrq
ifrq3 = 1.6041 * ifrq
ifrq4 = 1.5208 * ifrq
ifrq5 = 1.4166 * ifrq
ifrq6 = 2.7916 * ifrq
ifrq7 = 3.3833 * ifrq
iamp1 = 1.0000 * iamp
iamp2 = 0.8333 * iamp
iamp3 = 0.6667 * iamp
iamp4 = 1.0000 * iamp
iamp5 = 0.3333 * iamp
iamp6 = 0.3333 * iamp
iamp7 = 0.3333 * iamp
aenv1 oscili iamp1, 1/ilen, itab_gong_amp_env
aenv2 oscili iamp2, 1/ilen, itab_gong_amp_env
aenv3 oscili iamp3, 1/ilen, itab_gong_amp_env
aenv4 oscili iamp4, 1/ilen, itab_gong_amp_env
aenv5 oscili iamp5, 1/ilen, itab_gong_amp_env
aenv6 oscili iamp6, 1/ilen, itab_gong_amp_env
aenv7 oscili iamp7, 1/ilen, itab_gong_amp_env
asig1 oscili aenv1, ifrq1, itab_sign
asig2 oscili aenv2, ifrq2, itab_sign
asig3 oscili aenv3, ifrq3, itab_sign
asig4 oscili aenv4, ifrq4, itab_sign
asig5 oscili aenv5, ifrq5, itab_sign
asig6 oscili aenv6, ifrq6, itab_sign
asig7 oscili aenv7, ifrq7, itab_sign
amix = asig1 + asig2 + asig3 + asig4 + asig5 + asig6 + asig7
outs amix, amix
endin
instr +Reverb ; stereo diffusion reverb
irevtime = p4
adelayline delayr 0.2
amtap1 deltap 0.0430
amtap2 deltap 0.0320
amtap3 deltap 0.1458
amtap4 deltap 0.1423
amtap5 deltap 0.0103
amtap6 deltap 0.0239
amtap7 deltap 0.0446
amtap8 deltap 0.1035
amtap9 deltap 0.1067
amtap10 deltap 0.0087
amtap11 deltap 0.0837
amtap12 deltap 0.1676
delayw ga_rvb
adiffleft = amtap1+amtap2+amtap3+amtap4+amtap5+amtap6
adiffright = amtap7+amtap8+amtap9+amtap10+amtap11+amtap12
arevleft reverb adiffleft,irevtime
arevright reverb adiffright,irevtime
outs arevleft/6, arevright/6
ga_rvb = 0
endin
;a 0 0 30
;essentially in 6/8 for 10 measures
;========================================
; parameter1 p2 p3 p4 p5
; instrument st dur amp pch
;intro
i "Gong" 0 6 6000 5.09
i "Gong" + . . .
;a
i "Gong" + . . .
i "Gong" + . . .
i "Gong" + . . .
i "Gong" + . . .
i "Gong" + . . .
i "Gong" + . . .
i "Gong" + . . .
i "Gong" + . . .
;========================================
;============================================================
; SLIDE FLUTE
; parameter1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11
; instrument START DUR AMP PITCH PRESS BRTH FDBK1 FDBK2 fxlvl pan
i "Flute" 7 5 3335 7.02 .9 .036 .4 .4 .4 .5
;
i "Flute" ^+6 2 . 7.02 .95 . . .
i "Flute" + 3 . 7.03 .97 . . .
;
i "Flute" ^+4 2 . 7.02 .98 . . .
i "Flute" + 3 . 7.00 .99 . . .
;
i "Flute" ^+4 5 . 7.02 1.0 . . .
;a2
i "Flute" 31 5 . 7.02 .9 . . .
;
i "Flute" ^+6 2 . 7.05 .95 . . .
i "Flute" + 3 . 7.03 .97 . . .
;
i "Flute" ^+4 2 . 7.02 .98 . . .
i "Flute" + 3 . 7.00 .99 . . .
;
i "Flute" ^+4 7 . 7.02 1.0 . . .
;============================================================
i "Flute" 32 5 1375 7.09 .9 .091 . . .4 .8
;
i "Flute" ^+5 2 . 7.10 .96 . . . . .8
i "Flute" + 3 . 7.08 .97 . . . . .8
;
i "Flute" ^+3 3 . 7.07 .98 . . . . .8
i "Flute" + 3.75 . 7.05 .98 . . . . .8
;
i "Flute" 49.01 7.8 . 7.07 .99 . . . . .8
;i "Flute" 51 4 600 9.012 .99 .038 . . .4 .2
;========================================
; stereo diffusion reverb
; parameter1 p2 p3 p4
; Instrument ST DUR RT60
;-------------------------------------
i "Reverb" 0 60 1.3
;========================================
e
Version: 3
Render: File
Ask: No
Functions: ioObject
Listing: ioObject
WindowBounds: 360 44 1903 1185
CurrentView: orc
IOViewEdit: Off
Options: -b128 -A -o/Users/darren/Music/Projects/12x60/04 Incantation/Incantation.aif -l -m135 -R --midi-velocity-amp=4 --midi-key-cps=5
ioView background {60108, 65535, 63132}
ioText {20, 44} {130, 218} label 0.000000 0.001000 "" center "Lucida Grande" 10 {0, 0, 0} {65535, 65535, 65535} nobackground border Transposition Level
ioListing {636, 38} {655, 733}
ioGraph {163, 38} {471, 733}
ioSlider {69, 68} {34, 184} 20.000000 2000.000000 873.776001 pitch
ioButton {11, 272} {146, 54} event 1.000000 "" "Click for new note" "/" i1 0 10 10000 300
ioSlider {205, 786} {34, 138} 0.080000 0.560000 0.438272 kjet
ioSlider {346, 784} {34, 138} 0.000000 0.500000 0.000000 kngain
ioText {184, 927} {54, 26} display 0.438320 0.001000 "kjet" left "Lucida Grande" 10 {0, 0, 0} {65535, 65535, 65535} nobackground noborder
ioText {161, 779} {40, 30} label 0.000000 0.001000 "" left "Lucida Grande" 10 {0, 0, 0} {65535, 65535, 65535} nobackground noborder kjet
ioText {289, 785} {55, 25} label 0.000000 0.001000 "" left "Lucida Grande" 10 {0, 0, 0} {65535, 65535, 65535} nobackground noborder kngain
ioText {288, 924} {88, 34} display 0.000000 0.001000 "kngain" left "Lucida Grande" 10 {0, 0, 0} {65535, 65535, 65535} nobackground noborder
ioText {452, 787} {45, 24} label 0.000000 0.001000 "" left "Lucida Grande" 10 {0, 0, 0} {65535, 65535, 65535} nobackground noborder kvibf
ioText {430, 947} {73, 29} display 1.216800 0.001000 "kvibf" left "Lucida Grande" 10 {0, 0, 0} {65535, 65535, 65535} nobackground noborder
ioSlider {500, 777} {34, 169} 0.000000 12.000000 1.216800 kvibf
ioSlider {645, 787} {34, 154} 0.000000 100.000000 0.810000 kvamp
ioText {588, 785} {55, 37} label 0.000000 0.001000 "" left "Lucida Grande" 10 {0, 0, 0} {65535, 65535, 65535} nobackground noborder kvamp
ioText {591, 902} {52, 28} display 0.810000 0.001000 "kvamp" left "Lucida Grande" 10 {0, 0, 0} {65535, 65535, 65535} nobackground noborder