You are here

How can I merge MIDI tracks?

I don't usually work like this but need to try and accommodate the work-flow of someone I'm collaborating with. That said, here's my goal:

I've got about 10 MIDI drum tracks (1 instrument per track) that I need to merge into a single track. From there, I'll need to save that single track to a .mid file.

Each track contains a single clip (entire duration of the song). So basically, I figure this should be really easy. According to the docs I've read, I should just be able to select all clips and then merge via the Clip > Merge feature. That doesn't work because "Merge" is only available when a single clip is selected (this seems counter-intuitive?). I've mucked around with various drap-n-drop approaches as well as Track > Export Tracks... nothing is giving me the results I'm expecting. Can someone explain what I'm obviously missing here and provide a walk-through of how this can be done?

Many thanks in advance and happy new year.

rncbc's picture

not exactly what you ask but you have two options here:
1) select all the clips you want to merge and hit Clip > Merge... ;
2) go to Track > Export Tracks > MIDI... and select the MIDI output bus your tracks belong to;
both options ask for the .mid file that will go with the merged MIDI data.

see also View > Options... > MIDI > Capture / Export > File format options.

and happy new year!

I'll make another attempt tonight to see where I may have gone wrong. If I run into confusion again, I'll record my steps and publish a link. Thanks for the follow-up.

OK so I just tried the first approach and continue to fail as "Merge" is grayed out from the Clip menu. Here's a short video showing off my confusion:

While we're here, I'd also be curious to know what exactly track-0 represents on the right hand side in the "Files" panel? Seems like that panel starts counting at 0 while the track list starts counting at 1. Feels like somewhat of a disconnect?

I'll go mess around with the 2nd approach and will report back if I have anything substantial to report. Thanks in advance.

I'm clearly just not getting this at all :/

The resulting export-1.mid file contains all 14 of my original MIDI tracks despite the fact I only selected 4. Of course, they're also not merged into a single track.

Feeling dumber than I did a hour ago... :)

rncbc's picture

as said earlier for option 2)- the MIDI output bus your tracks belong to; however you can also mute the tracks that you don't wish to be exported/merged into the SMF (.mid).

also note that a SMF (Standard MIDI File; *.mid) Format 1 file contents is organized in one to several so called tracks (MTrk headers) but these are not necessarily the same as MIDI tracks you have in the qtractor timeline; for that matter, the first track (Track 0; MTrk #0) is a place holder for whole sequence meta-data (eg. tempo, time-signature, markers, lyrics, etc.) and all the remaining MTrk's (Track 1, 2, etc.) then each hold the actual and respective MIDI channel data, again not necessarily equating channel with track numbers, eg. each MTrk/track holds for one and only merged MIDI channel -- this is a conventional organization scheme that Qtractor follows since ever, based on GM recommendations and formerly followed by old Roland's GS and Yamaha's XG standards.



Thanks for the info about track-0. Makes perfect sense. I still don't think exporting the midi tracks is the way to go about this as it does not result in any consolidation. I kept playing around and here's the approach I've come up with.

1. Create new MIDI track
2. Highlight an existing clip
3. Ctrl-c, Ctrl-v
4. Use mouse to identify where copied clip should be pasted (this also requires zoom and snap to be set sufficiently)
5. Hit Enter
6. Repeat for each clip that needs to be merged.
7. Select the newly created track (this has the effect of selecting all overlapping clips assigned to the track)
8. Use Clip > Merge to write merged clips to a .mid file

Pretty tedious and prone to human error for a few reasons but it works and I finally have a process :)

rncbc's picture

if you have all the MIDI tracks that you want to merge on the very same MIDI channel, then muting all others, option 2) Track > Export Tracks > MIDI... should work exactly as you want: the exported SMF will have only one merged track per channel.


That is unexpected but interesting. I will certainly give it a shot tonight. Thanks for the feedback.

rncbc's picture

wait, exporting to SMF1 will put each(qtractor) track on its own Mtrk, no matter they are on same channel or not, so it's not quite what you intend in first place.

but most probably SMF0 will do what you want:
1. switch View > Options... > MIDI > Capture / Export > File format to "SMF Format 0" (SMF0);
2. mute all tracks that are on any other channel than you don't want to merge/export;
3. go Track > Export Tracks > MIDI... as before (formerly option 2);
4. the exported .mid result file should have only data on the MIDI channel you want; also as a SMF0 the .mid file should have one and only one Mtrk;

Add new comment