| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; audio output destination is given as a sound file (wav format specified) |
| 4 |
; this method is for deferred time performance, |
| 5 |
; simultaneous real-time audio will not be possible |
| 6 |
-oWriteToDisk1.wav -W |
| 7 |
</CsOptions> |
| 8 |
<CsInstruments> |
| 9 |
sr = 44100 |
| 10 |
ksmps = 32 |
| 11 |
nchnls = 1 |
| 12 |
0dbfs = 1 |
| 13 |
|
| 14 |
instr 1 ; a simple tone generator |
| 15 |
aEnv expon 0.2, p3, 0.001 ; a percussive envelope |
| 16 |
aSig poscil aEnv, cpsmidinn(p4) ; audio oscillator |
| 17 |
out aSig ; send audio to output |
| 18 |
endin |
| 19 |
</CsInstruments> |
| 20 |
|
| 21 |
<CsScore> |
| 22 |
; two chords |
| 23 |
i 1 0 5 60 |
| 24 |
i 1 0.1 5 65 |
| 25 |
i 1 0.2 5 67 |
| 26 |
i 1 0.3 5 71 |
| 27 |
|
| 28 |
i 1 3 5 65 |
| 29 |
i 1 3.1 5 67 |
| 30 |
i 1 3.2 5 73 |
| 31 |
i 1 3.3 5 78 |
| 32 |
</CsScore> |
| 33 |
</CsoundSynthesizer> |
| 34 |
; example written by Iain McCurdy |