| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
-n ; no sound |
| 4 |
</CsOptions> |
| 5 |
<CsInstruments> |
| 6 |
|
| 7 |
sr = 48000 ; one possible Jack setting |
| 8 |
ksmps = 128 |
| 9 |
nchnls = 2 |
| 10 |
|
| 11 |
; by Menno Knevel - 2023 |
| 12 |
|
| 13 |
JackoInit "default", "csound6" ; Csound as a Jack client |
| 14 |
JackoMidiOutConnect "midioutMAUDIO", "M-Audio-Delta-1010:midi/capture_1" ; create 1 Midi port |
| 15 |
JackoMidiOutConnect "midioutEDIROL", "UM-3:midi/capture_1" ; create 2nd Midi port |
| 16 |
|
| 17 |
instr 1 ; send notes to the M-Audio Midi port |
| 18 |
|
| 19 |
irandom random 30, 80 |
| 20 |
JackoNoteOut "midioutMAUDIO", 1-1, irandom, 100 ; channel range 0-15 |
| 21 |
endin |
| 22 |
|
| 23 |
instr 2 ; send notes to Edirol Midi port |
| 24 |
|
| 25 |
irandom random 30, 80 |
| 26 |
JackoNoteOut "midioutEDIROL", 1-1, irandom, 100 |
| 27 |
endin |
| 28 |
|
| 29 |
</CsInstruments> |
| 30 |
<CsScore> |
| 31 |
s |
| 32 |
i1 1 .1 |
| 33 |
i1 2 1 |
| 34 |
i1 4 2 |
| 35 |
s |
| 36 |
i2 1 .1 |
| 37 |
i2 2 1 |
| 38 |
i2 4 2 |
| 39 |
e |
| 40 |
</CsScore> |
| 41 |
</CsoundSynthesizer> |