examples/midichn.csd
raw| 1 | <CsoundSynthesizer> |
| 2 | <CsOptions> |
| 3 | ; Select audio/midi flags here according to platform |
| 4 | -odac -M0 -+rtmidi=virtual ;;; midi file input |
| 5 | </CsOptions> |
| 6 | <CsInstruments> |
| 7 | |
| 8 | sr = 44100 |
| 9 | ksmps = 32 |
| 10 | nchnls = 2 |
| 11 | 0dbfs = 1 |
| 12 | |
| 13 | instr 1 |
| 14 | ;change channel on virtual midi keyboard |
| 15 | i1 midichn |
| 16 | print i1 |
| 17 | |
| 18 | endin |
| 19 | </CsInstruments> |
| 20 | <CsScore> |
| 21 | f 0 20 ;runs for 20 seconds |
| 22 | |
| 23 | e |
| 24 | </CsScore> |
| 25 | </CsoundSynthesizer> |