| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
-o dac -d |
| 4 |
</CsOptions> |
| 5 |
<CsInstruments> |
| 6 |
sr = 44100 |
| 7 |
nchnls = 1 |
| 8 |
ksmps = 32 |
| 9 |
0dbfs = 1 |
| 10 |
|
| 11 |
instr 1 |
| 12 |
|
| 13 |
;will fail because of wrong code |
| 14 |
ires compilestr {{ |
| 15 |
instr 2 |
| 16 |
a1 oscilb p4, p5, 0 |
| 17 |
out a1 |
| 18 |
endin |
| 19 |
}} |
| 20 |
print ires ; returns -1 because not successfull |
| 21 |
|
| 22 |
;will compile ... |
| 23 |
ires compilestr {{ |
| 24 |
instr 2 |
| 25 |
a1 oscils p4, p5, 0 |
| 26 |
out a1 |
| 27 |
endin |
| 28 |
}} |
| 29 |
print ires ; ... and returns 0 |
| 30 |
|
| 31 |
;call the new instrument |
| 32 |
;(note that the overall performance is extended) |
| 33 |
scoreline_i "i 2 0 3 .2 415" |
| 34 |
|
| 35 |
endin |
| 36 |
|
| 37 |
</CsInstruments> |
| 38 |
<CsScore> |
| 39 |
i1 0 1 |
| 40 |
</CsScore> |
| 41 |
</CsoundSynthesizer> |
| 42 |
;example by joachim heintz |