There are plenty here who know more than I do, but here's my understanding:
the doc says that, for file-driven performance, the instrument defaults to MIDI channel + 1. Obviously there is no MIDI channel 0, so instr 1 is only being triggered by the score, not the MIDI file. Maybe you need to have instr 2 call instr 18 and 19, if you want MIDI channel 1 to trigger two instruments?
-Chuckk
I'm trying to play two instruments with data from one midi file but I
can't manage it. Should the following csd not do the trick or am I just
having a bad day??
<CsoundSynthesizer>
<CsOptions>
-odevaudio -F bach.mid -m0d
</CsOptions>
<CsInstruments>
sr = 44100
kr = 44100
ksmps = 1
nchnls = 1
instr 1
kcps init 0
kvelocity init 0
midinoteoncps kcps, kvelocity
a1 oscili 1000, kcps, 1
out a1
endin
instr 2
kcps init 0
kvelocity init 0
midinoteoncps kcps, kvelocity
a1 oscili 1000, kcps*2, 1
out a1
endin
</CsInstruments>
<CsScore>
f1 0 1024 10 1
i1 0 100
i2 0 100
</CsScore>
</CsoundSynthesizer>