| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
; Audio out Audio in No messages |
| 5 |
-odac -iadc -d -M0 -Q1;;;RT audio I/O with MIDI in |
| 6 |
</CsOptions> |
| 7 |
<CsInstruments> |
| 8 |
|
| 9 |
sr = 44100 |
| 10 |
kr = 4410 |
| 11 |
ksmps = 10 |
| 12 |
nchnls = 2 |
| 13 |
|
| 14 |
; Example by Giorgio Zucco 2007 |
| 15 |
|
| 16 |
|
| 17 |
instr 1 ;Triggered by MIDI notes on channel 1 |
| 18 |
|
| 19 |
inote notnum |
| 20 |
ivel veloc |
| 21 |
|
| 22 |
kpitch = 40 |
| 23 |
kfreq = 2 |
| 24 |
|
| 25 |
kdur = .04 |
| 26 |
kpause = .1 |
| 27 |
|
| 28 |
k1 lfo kpitch, kfreq,5 |
| 29 |
|
| 30 |
;plays a stream of notes of kdur duration on MIDI channel 1 |
| 31 |
moscil 1, inote + k1, ivel, kdur, kpause |
| 32 |
|
| 33 |
endin |
| 34 |
|
| 35 |
</CsInstruments> |
| 36 |
<CsScore> |
| 37 |
; Dummy ftable |
| 38 |
f0 60 |
| 39 |
</CsScore> |
| 40 |
</CsoundSynthesizer> |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|