| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac ;;;RT audio out |
| 5 |
;-iadc ;;;uncomment -iadc if RT audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o cross2.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
; after example from Kevin Conder |
| 11 |
sr = 44100 |
| 12 |
ksmps = 32 |
| 13 |
nchnls = 2 |
| 14 |
0dbfs = 1 |
| 15 |
|
| 16 |
instr 1 ;play audio file |
| 17 |
|
| 18 |
aout soundin "fox.wav" |
| 19 |
outs aout, aout |
| 20 |
endin |
| 21 |
|
| 22 |
instr 2 ;cross-synthesize |
| 23 |
|
| 24 |
icps = p4 |
| 25 |
ifn = p5 ; Use the "ahhc.aiff" sound and "eeec.aiff" |
| 26 |
ain1 oscil 0.6, p4, ifn |
| 27 |
ain2 soundin "fox.wav" ; Use the "fox.wav" as modulator |
| 28 |
|
| 29 |
isize = 4096 |
| 30 |
ioverlap = 2 |
| 31 |
iwin = 3 |
| 32 |
kbias init 1 |
| 33 |
|
| 34 |
aout cross2 ain1, ain2, isize, ioverlap, iwin, kbias |
| 35 |
outs aout, aout |
| 36 |
endin |
| 37 |
|
| 38 |
</CsInstruments> |
| 39 |
<CsScore> |
| 40 |
;audio files |
| 41 |
f 1 0 128 1 "ahhc.aiff" 0 4 0 |
| 42 |
f 2 0 128 1 "eeec.aiff" 0 4 0 |
| 43 |
|
| 44 |
f 3 0 2048 20 2 ;windowing function |
| 45 |
|
| 46 |
i 1 0 3 |
| 47 |
|
| 48 |
i 2 3 3 50 1 ;"eeec.aiff" |
| 49 |
i 2 + 3 50 2 ;"ahhc.aiff" |
| 50 |
i 2 + 3 100 1 ;"eeec.aiff" |
| 51 |
i 2 + 3 100 2 ;"ahhc.aiff" |
| 52 |
i 2 + 3 250 1 ;"eeec.aiff" |
| 53 |
i 2 + 3 250 2 ;"ahhc.aiff" |
| 54 |
i 2 + 3 20 1 ;"eeec.aiff" |
| 55 |
i 2 + 3 20 2 ;"ahhc.aiff" |
| 56 |
e |
| 57 |
|
| 58 |
</CsScore> |
| 59 |
</CsoundSynthesizer> |