| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
-o dac |
| 4 |
</CsOptions> |
| 5 |
<CsInstruments> |
| 6 |
sr = 44100 |
| 7 |
ksmps = 441 |
| 8 |
nchnls = 2 |
| 9 |
0dbfs = 1 |
| 10 |
instr 1 |
| 11 |
iAmp = p4 ;amplitude taken from the 4th parameter of the score line |
| 12 |
iFreq = p5 ;frequency taken from the 5th parameter |
| 13 |
; --- move from 0 to 1 in the duration of this instrument call (p3) |
| 14 |
kPan line 0, p3, 1 |
| 15 |
aNote poscil iAmp, iFreq ;create an audio signal |
| 16 |
aL, aR pan2 aNote, kPan ;let the signal move from left to right |
| 17 |
outs aL, aR ;write it to the output |
| 18 |
endin |
| 19 |
</CsInstruments> |
| 20 |
<CsScore> |
| 21 |
i 1 0 3 0.2 443 |
| 22 |
</CsScore> |
| 23 |
</CsoundSynthesizer> |
| 24 |
;example by joachim heintz |