| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; amend device number accordingly |
| 4 |
-Q999 |
| 5 |
</CsOptions> |
| 6 |
<CsInstruments> |
| 7 |
ksmps = 32 ;no audio so sr and nchnls irrelevant |
| 8 |
|
| 9 |
instr 1 |
| 10 |
; arguments for midiout are read from p-fields |
| 11 |
istatus init p4 |
| 12 |
ichan init p5 |
| 13 |
idata1 init p6 |
| 14 |
idata2 init p7 |
| 15 |
midiout istatus, ichan, idata1, idata2; send raw midi data |
| 16 |
turnoff ; turn instrument off to prevent reiterations of midiout |
| 17 |
endin |
| 18 |
|
| 19 |
</CsInstruments> |
| 20 |
<CsScore> |
| 21 |
;p1 p2 p3 p4 p5 p6 p7 |
| 22 |
i 1 0 0.01 144 1 60 100 ; note on |
| 23 |
i 1 2 0.01 144 1 60 0 ; note off (using velocity zero) |
| 24 |
|
| 25 |
i 1 3 0.01 144 1 60 100 ; note on |
| 26 |
i 1 5 0.01 128 1 60 100 ; note off (using 'note off' status byte) |
| 27 |
</CsScore> |
| 28 |
</CsoundSynthesizer> |
| 29 |
;example by Iain McCurdy |