From: Tom Breton (Tehom) <tehom@pa...> - 2013-09-09 17:53:06
[I moved this to devel because now it's just technical]
> I myself have utterly no clue off the top of my head how an incoming
> MIDI event gets recorded and turned into a Rosegarden event. I've never
> worked on any of that at all. I can't, therefore, just go glance
> through the code to see if that stuff is there or not.
I was just looking at that, so I'll summarize what we do while it's fresh
in my mind.
Basically, we pass program changes all around but never write them into
segments as Events. That didn't change with floating channels.
First, AlsaDriver translates them from ALSA to MappedEvent. For output,
it translates them back to ALSA. Outside of those few functions, we only
pass around lists of MappedEvents. So a program change is just one thing
in a list of MappedEvents.
Then RosegardenSequencer gets the list. It sends it to various places,
copying it if needed.
For playthru, lists of MappedEvents are sent to ControlBlock, which
doesn't do anything special for program changes. ControlBlock sends them
back out just as if they were from a Segment.
For recording, lists of MappedEvents are sent to
RosegardenDocument::insertRecordedMidi, which does the rest. It figures
out which segment(s) to record to, translates MappedEvents to Events, and
Some of this is before my time so I may be missing some subtleties, but
that's it in a nutshell.
Tom Breton (Tehom)