Old 01-08-2014, 08:30 PM   #1
m00dawg
Human being with feelings
 
Join Date: Dec 2009
Location: Texas
Posts: 9
Question MIDI Export Does Not Include Channels?

I am having trouble exporting out MIDI tracks in Reaper with channel information. When I go to Export Project MIDI, select Entire Project, Consolidate All MIDI items, select Multitrack MIDI file and Embed tempo map. The problem is that it looks like the output is running everything over channel 0 (all channels?) rather than keeping with the channels I had setup in Reaper. I'm using the dr_midi.pl script (found here: http://interglacial.com/pub/dr_midi.html) to dump out the MIDI info, but I also tested this on my MidiBox MIDIO128 (the intended destination for these MIDI files).

I guess long story short, is there any way to preserve the channel information for the MIDI export?
m00dawg is offline   Reply With Quote
Old 01-09-2014, 02:03 AM   #2
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 18,060
Default

I have not used that script (as I'm a bit wary of downloads) but I did exactly the same as you described, with 3 MIDI clips.

On reloading into a new project tab in Reaper the MIDI channels were retained (also retained in other hosts).

Perhaps your could attach a small problem project so that we can see what's (not) happening?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 01-09-2014, 02:04 AM   #3
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,492
Default

That sounds like it's saving to MIDI format 0 instead of MIDI format 1.
EvilDragon is online now   Reply With Quote
Old 01-11-2014, 08:32 PM   #4
m00dawg
Human being with feelings
 
Join Date: Dec 2009
Location: Texas
Posts: 9
Post

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, 72 views)
m00dawg is offline   Reply With Quote
Old 01-12-2014, 02:04 AM   #5
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 18,060
Default

There is some odd MIDI in that project. The Note Properties window cannot be displayed for some 'notes' and Reaper does not show those in the Event List. The notes that are shown are all on channel 01.

The JS FX midi_logger or ReaControlMIDI's logger or insertpizhere's MIDI Monitor will all display the MIDI messages.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 01-12-2014, 09:36 AM   #6
m00dawg
Human being with feelings
 
Join Date: Dec 2009
Location: Texas
Posts: 9
Question

Quote:
Originally Posted by DarkStar View Post
There is some odd MIDI in that project. The Note Properties window cannot be displayed for some 'notes' and Reaper does not show those in the Event List. The notes that are shown are all on channel 01.
Hmm, for the test case I just used Reaper's MIDI editor and painted the notes and then went into the IO section for each track and changed the output channel under the MIDI Hardware Output. Seems like that is where things are going south, though. I noticed when re-opening the test case, my channel data was gone, I assume because my MIDI configuration was changing.

I have never been able to find it, but it sounds like I'm not putting in channel data within the MIDI track/data itself and so Reaper is just exporting whatever the default is for that when it comes time to export the MIDI data to a file?

Quote:
Originally Posted by DarkStar View Post
The JS FX midi_logger or ReaControlMIDI's logger or insertpizhere's MIDI Monitor will all display the MIDI messages.
[/quote]

It took a bit of finagling, but I was able to see what Reaper is doing using the MIDI Patchbay and MIDI Monitor utilities under OS X. The MIDI exported version shows channel 1 is being used for all tracks, which is different from what dr_midi.pl was showing. That would still have produced the same result that I was getting with my MIDIO128 I think.


So I guess, long story short, it sounds like I need to somehow embed channel data into the MIDI for the tracks I'm trying to export to a MIDI file for things to work?
m00dawg is offline   Reply With Quote
Old 01-12-2014, 09:45 AM   #7
m00dawg
Human being with feelings
 
Join Date: Dec 2009
Location: Texas
Posts: 9
Talking

AHA! Finally found it! I'm not sure how I didn't see it before, but the step I was missing was to go into the MIDI editor, select all notes, right click, and then simply go to Note Channel and change it. Doing that and then doing a MIDI export does indeed appear to preserve channel data. Also of note, dr_midi.pl starts counting channels at 0, so it's output ended up matching what I was seeing (I assume channel 0 meant all channels, but it really meant the first channel, normally channel 1).

So I think my problem is solved! Thanks for the help everyone!
m00dawg is offline   Reply With Quote
Old 11-12-2017, 06:15 AM   #8
dj.tuBIG/MaliceX
Human being with feelings
 
Join Date: Nov 2008
Posts: 24
Default

This is a relevant issue for me, as I've just gone through the effort in attempting to use REAPER as a "General MIDI" sequencing tool.

Currently means of setting up a ROMpler VSTi and mapping tracks to go to the relevant channels is all well good and all. But once you start using convenience features such as Send/Receive MIDI channel remapping at the receiver end, be prepared to get sad when you export to MIDI.

I would think that if a TRACK (and its subtracks if a folder) had its MIDI Hardware Output option set to a specific channel instead of "Send to original channels", then the MIDI exporter should respect these settings as it is mapping MIDI information on that relevant track. Instead, it ignores that and uses the channel data as-is from the MIDI items. Depending on workflow and size of the project, this can get tedious and time-consuming if after completing a MIDI sequence you find channel information is gone and now you have to do some extra post-processing.

I've put on a quick example here: https://www.dropbox.com/s/nnwdjffiso..._Test.zip?dl=0

obviously the -nothappy.mid file is the exported result. Kind of a bother that the user intuitiveness of basic functions such as program change and track-level mapping (as opposed to item-level) is more tedious and seeing the MIDI exporter ignores convenience features such as channel remapping, this is effectively meaning double-work for the user to post-process before exporting. Dedicated MIDI sequencers don't have this issue by design.
dj.tuBIG/MaliceX is offline   Reply With Quote
Old 11-12-2017, 10:52 AM   #9
slipstick
Human being with feelings
 
Join Date: Apr 2016
Location: UK, near Europe
Posts: 876
Default

It seems to me that exporting MIDI output channel data would only make sense if you expected that the resulting file would only ever be played by people with exactly the same output hardware. It seems to make more sense to use the tracks's MIDI channel data.

Just for my interest why do you need to set it up so that the output channel is different to the track channel? There may be all sorts of good reasons but it's not something I've ever needed to do.

Steve
slipstick is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:06 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.