From: Tom Breton (Tehom) <tehom@pa...> - 2013-01-19 18:56:21
(CC-ed to the dev list)
>> It would be helpful if you included a file that this happens with. If
>> it's too big, perhaps just the first few bars, but check that it still
>> the bug. I can't guess what makes this different than MIDI files that
>> work right.
> I hope it is permissible, I am adding the file zipped. I could not
> quickly select all 32 tracks and resize them to a few bars. Try the
> changes to track 5 that I did and see what happens.
Thanks, that file cleared things up a lot.
The basic thing that's going on is that you have 32 full-length tracks
(plus playthru & metronome) trying to play on 16 instruments, and it can't
fit them all in. What's unique about the church organ segment is that, of
the segments that are mapped while we still have channels to give, it's
the first one that plays. That's why it sounds like it became first and
everything else silenced. I think that it ws the one you edited was a
I was curious about how it ever miraculously squeezed into 16 channels, so
I looked at it in RG 11.11. 11.11 can apparently accomplish this miracle,
but only because we are messing up reading MIDI programs in. The top
tracks' instruments seem to have been overwritten by the lower tracks'
instruments, so for instance piccolo plays on harp, flute -> bird sounds,
oboe -> celesta, etc. The order exactly matches the lower tracks' order.
So ISTM when we read MIDI in, we wrap around on something.
For the first problem, I have a workaround right now, which is to select
all (Ctl-A) and split segments on silence (Segment -> Split -> On
silence). That works; I'm listening to it right now. Exports OK too.
But that's just a workaround. So now I'm thinking about how to properly
This problem largely stemmed from MIDI read-in making everything
full-length. InternalSegmentMapper does trim beginnings and ends, but has
no way of knowing that there's (say) 30 bars of silence that another
instrument could play in; split-on-silence gives it that ability again.
We can't stop MIDI read-in making everything full-length; AFAIK it has no
information to tell it how to do otherwise. But we could split-on-silence
during or right after MIDI read-in. If that's too aggressive, we could:
* Only do it if and when we run out of floating channels.
* Do that progressively, so try splitting on 8 bars of silence,
then try 4, etc.
* Make that an option (I know, one more confusing option)
For the second problem, I don't know. In order to not wrap around, we
need someplace for the >16 instruments to go. I don't think putting
instruments onto different devices should be MIDI import's job, so it
should see a single device that can hold as many programs as MIDI reads in
So that implies allowing some sort of MIDI device to have more than 16
instruments. But that creates the problem of where to play them all.
MIDI hardware sometimes uses the trick of providing (say) 64 channels as 4
ports of 16 channels each. So I'm thinking some sort of "gang MIDI"
device that reverses that trick. But no promises that this will come
Tom Breton (Tehom)