View Single Post
Old 01-11-2014, 08:32 PM   #4
m00dawg
Human being with feelings
 
Join Date: Dec 2009
Location: Texas
Posts: 9
Default

Could be, or perhaps MIDIO128 and dr_midi.pl are expecting another format? I did notice importing the MIDI file back into Reaper imports all the tracks, but clicking on I/O for the tracks just shows "send to original channels". Is there another way to verify the original channels?

I've attached a test case which is just 3 tracks with some basically random MIDI data in each. Each channel corresponds to MIDI channel 1, 2, and 3 in the IO section. When I output the MIDI I get the following from the dr_midi.pl script:

Code:
MacDawgPro-2:MIDI Tests tim$ perl ./dr_midi.pl TestCase.mid 
File: TestCase.mid
Format: 1
Tracks: 4
Ticks per quarter note: 960

Track chunk of 31 bytes
000000t:  Meta-event type $03 (Track name) of length 8
	  TestCase
000000t:  Meta-event type $58 (Time signature) of length 4
	  ____
000000t:  Meta-event type $51 (Set tempo) of length 3
	  _? 
000000t:  Meta-event type $2f (End-track event) of length 0
Sigma t = 0

Track chunk of 78 bytes
000000t:  Meta-event type $03 (Track name) of length 19
	  MIDI OUT 1_________
000888t:  Note on ::  Channel 0.  Note 48.  Velocity 96
002073t:  Meta-event type $01 (Text event) of length 15
	  Test Text Event
000000t:  Note on ::  Channel 0.  Note 52.  Velocity 96
119346t:  Note off ::  Channel 0.  Note 52.  Velocity 0
002370t:  Note on ::  Channel 0.  Note 51.  Velocity 96
105427t:  Note off ::  Channel 0.  Note 48.  Velocity 0
000296t:  Note off ::  Channel 0.  Note 51.  Velocity 0
000000t:  Meta-event type $2f (End-track event) of length 0
Sigma t = 230400

Track chunk of 301 bytes
000000t:  Meta-event type $03 (Track name) of length 19
	  MIDI OUT 2_________
000000t:  Note on ::  Channel 0.  Note 48.  Velocity 96
006811t:  Note off ::  Channel 0.  Note 48.  Velocity 0
001777t:  Note on ::  Channel 0.  Note 52.  Velocity 96
008292t:  Note off ::  Channel 0.  Note 52.  Velocity 0
000296t:  Note on ::  Channel 0.  Note 55.  Velocity 96
005923t:  Note off ::  Channel 0.  Note 55.  Velocity 0
000593t:  Note on ::  Channel 0.  Note 59.  Velocity 96
007699t:  Note off ::  Channel 0.  Note 59.  Velocity 0
000296t:  Note on ::  Channel 0.  Note 48.  Velocity 96
006811t:  Note off ::  Channel 0.  Note 48.  Velocity 0
001777t:  Note on ::  Channel 0.  Note 52.  Velocity 96
008292t:  Note off ::  Channel 0.  Note 52.  Velocity 0
000296t:  Note on ::  Channel 0.  Note 55.  Velocity 96
005923t:  Note off ::  Channel 0.  Note 55.  Velocity 0
000592t:  Note on ::  Channel 0.  Note 59.  Velocity 96
007700t:  Note off ::  Channel 0.  Note 59.  Velocity 0
000000t:  Note on ::  Channel 0.  Note 48.  Velocity 96
006811t:  Note off ::  Channel 0.  Note 48.  Velocity 0
001777t:  Note on ::  Channel 0.  Note 52.  Velocity 96
008292t:  Note off ::  Channel 0.  Note 52.  Velocity 0
000296t:  Note on ::  Channel 0.  Note 55.  Velocity 96
005923t:  Note off ::  Channel 0.  Note 55.  Velocity 0
000592t:  Note on ::  Channel 0.  Note 59.  Velocity 96
007700t:  Note off ::  Channel 0.  Note 59.  Velocity 0
000000t:  Note on ::  Channel 0.  Note 48.  Velocity 96
006811t:  Note off ::  Channel 0.  Note 48.  Velocity 0
001777t:  Note on ::  Channel 0.  Note 52.  Velocity 96
008292t:  Note off ::  Channel 0.  Note 52.  Velocity 0
000296t:  Note on ::  Channel 0.  Note 55.  Velocity 96
005923t:  Note off ::  Channel 0.  Note 55.  Velocity 0
000592t:  Note on ::  Channel 0.  Note 59.  Velocity 96
007700t:  Note off ::  Channel 0.  Note 59.  Velocity 0
000000t:  Note on ::  Channel 0.  Note 48.  Velocity 96
006811t:  Note off ::  Channel 0.  Note 48.  Velocity 0
001777t:  Note on ::  Channel 0.  Note 52.  Velocity 96
008292t:  Note off ::  Channel 0.  Note 52.  Velocity 0
000296t:  Note on ::  Channel 0.  Note 55.  Velocity 96
005923t:  Note off ::  Channel 0.  Note 55.  Velocity 0
000592t:  Note on ::  Channel 0.  Note 59.  Velocity 96
007700t:  Note off ::  Channel 0.  Note 59.  Velocity 0
000000t:  Note on ::  Channel 0.  Note 48.  Velocity 96
006811t:  Note off ::  Channel 0.  Note 48.  Velocity 0
001777t:  Note on ::  Channel 0.  Note 52.  Velocity 96
008292t:  Note off ::  Channel 0.  Note 52.  Velocity 0
000296t:  Note on ::  Channel 0.  Note 55.  Velocity 96
005923t:  Note off ::  Channel 0.  Note 55.  Velocity 0
000592t:  Note on ::  Channel 0.  Note 59.  Velocity 96
007700t:  Note off ::  Channel 0.  Note 59.  Velocity 0
000000t:  Note on ::  Channel 0.  Note 48.  Velocity 96
006811t:  Note off ::  Channel 0.  Note 48.  Velocity 0
001777t:  Note on ::  Channel 0.  Note 52.  Velocity 96
008292t:  Note off ::  Channel 0.  Note 52.  Velocity 0
000296t:  Note on ::  Channel 0.  Note 55.  Velocity 96
005923t:  Note off ::  Channel 0.  Note 55.  Velocity 0
000592t:  Note on ::  Channel 0.  Note 59.  Velocity 96
007700t:  Note off ::  Channel 0.  Note 59.  Velocity 0
000000t:  Meta-event type $2f (End-track event) of length 0
Sigma t = 220033

Track chunk of 55 bytes
000000t:  Meta-event type $03 (Track name) of length 19
	  MIDI OUT 3_________
001481t:  Note on ::  Channel 0.  Note 55.  Velocity 96
000000t:  Note on ::  Channel 0.  Note 60.  Velocity 96
001777t:  Note on ::  Channel 0.  Note 48.  Velocity 96
227142t:  Note off ::  Channel 0.  Note 55.  Velocity 0
000000t:  Note off ::  Channel 0.  Note 60.  Velocity 0
000000t:  Note off ::  Channel 0.  Note 48.  Velocity 0
000000t:  Meta-event type $2f (End-track event) of length 0
Sigma t = 230400
End.
That is similar to what I get with the MidiBox MIDIO128 when I try to playback the MIDI - one of my synths ends up playing all tracks when it should only be playing stuff from channel 1.

I'm open to suggestions on better ways to validate MIDI though. dr_midi seems to be closest I've found without actually having to look and decode a hexdump of the MIDI. I was trying to do it external to Reaper just to make sure I can try to isolate any bugs in Reaper, MIDIO128, etc.
Attached Files
File Type: zip MIDI-Export_Test-Case.zip (4.6 KB, 247 views)
m00dawg is offline   Reply With Quote