A follow-up on this in case it's useful to anyone else:
I figured it out. My mistake was assuming that there is an instrument list
per STAFF. This is not the case. Instead there is an instrument list per
PART. A part might have multiple staves. The logic only outputs the MIDI
program changes once per part, i.e. for the "top" staff in each part.
On Tue, Jan 26, 2016 at 6:03 PM, Ien Cheng <i...@alum.mit.edu> wrote:
> Hi there -
>
> I'm trying to understand the logic in how ExportMidi::write
> (mscore/exportmidi.cpp:213) handles multiple instruments.
>
> From what I can tell, the basic logic goes like this: for each staff (loop
> at line 232), go through the instruments used in that staff (loop at line
> 246), and write the info for that instrument to the MIDI file (lines
> 255-280). All this makes sense to me.
>
> What is confusing me is the logic that only writes the instrument info for
> the first staff, i.e. the *if (staff->isTop()) *logic at line 254. Why
> would only the instruments for the first staff be written out? Or am I
> misunderstanding something?
>
> Thanks!
>
> --Ien
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Mscore-developer mailing list
Mscore-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mscore-developer