Anthony Bennett Posted Friday at 11:37 PM Share Posted Friday at 11:37 PM I regularly need to export MIDI tracks to a file (essentially a MIDI 'stem'), that exactly matches the Start/End point of Audio stems I'm exporting. I use Project Start and End markers by default in my projects. When I export Audio stems, I have the Range option that lets me change from Entire project to a specific Range (defaulting to Start/End markers), and also custom Start/End. I need the same capability on MIDI File Export. Ideally, the same behaviour - a Range option that mimics the behaviour in the Audio Export. Currently, the only way to achieve the desired result is a kludgy workaround of putting a 'dummy' MIDI event at the start point you want to export from. OR Export everything, re-open the exported MIDI file, trim space at start, re-save. Link to comment Share on other sites More sharing options...
David Baay Posted 17 hours ago Share Posted 17 hours ago 16 hours ago, Anthony Bennett said: Currently, the only way to achieve the desired result is a kludgy workaround of putting a 'dummy' MIDI event at the start point you want to export from. OR Export everything, re-open the exported MIDI file, trim space at start, re-save. Just select the time range in the timeline before exporting. If you have Start and End Markers, you can use those to define the selection by various methods. Link to comment Share on other sites More sharing options...
Anthony Bennett Posted 9 hours ago Author Share Posted 9 hours ago 7 hours ago, David Baay said: Just select the time range in the timeline before exporting. If you have Start and End Markers, you can use those to define the selection by various methods. Thanks David. I wish it were that simple and obvious. I find that this does not work, or I have created conditions / 'found' scenarios where it doesn't work Ref - Link to comment Share on other sites More sharing options...
David Baay Posted 8 hours ago Share Posted 8 hours ago On 10/24/2025 at 5:37 PM, Anthony Bennett said: Currently, the only way to achieve the desired result is a kludgy workaround of putting a 'dummy' MIDI event at the start point you want to export from. Okay, I misunderstood what you want. The above is correct, but the limitation is not Sonar; it's the Standard MIDI File format. If you want the file to start before the first note, there has to be some event to define that point. Another option is to insert a tempo 'change' at that point; it can have the same value as the initial tempo. Since the tempo map is included in the SMF file, including that tempo node in the time selection will define the start of the file. Link to comment Share on other sites More sharing options...
sjoens Posted 3 hours ago Share Posted 3 hours ago (edited) You can't export empty space. In Cakewalk you can slip out the ends of MIDI clips beyond 1st and last data points, but this creates empty space. Useful within the DAW but has nothing to do with MIDI data on the track. When exporting a clip, it's mixed down and bounced to the 1st and last data points so a .mid file has no clue where the ends of the original clip inside the DAW were slipped out to since there's nothing tangible to export. The Tempo trick David mentioned adds a data node to the mix, as does the "kludgy" way you're already doing it. A muted note, controller, automation node, etc. So long as there's data, it will get exported. Edited 3 hours ago by sjoens Link to comment Share on other sites More sharing options...
Anthony Bennett Posted 2 hours ago Author Share Posted 2 hours ago 5 hours ago, David Baay said: If you want the file to start before the first note, there has to be some event to define that point. 39 minutes ago, sjoens said: The Tempo trick David mentioned adds a data node to the mix, as does the "kludgy" way you're already doing it. A muted note, controller, automation node, etc. So long as there's data, it will get exported. Thanks guys. As I mentioned of the other post, I've done exactly this, taken screenshots to show the events in event list, but I'm still not getting an export where the dummy event I created at 1:04:480, then made that the start of the range selection, ended up on 1:00:000 in the exported MIDI file. Link to comment Share on other sites More sharing options...
David Baay Posted 2 hours ago Share Posted 2 hours ago The timestamps of events in a MIDI file are not in M:B:T format; they're just total tick values starting from 0. If you open the file in Sonar (or any any MIDI app) the first event is always going to be at 1:01:000 and the M:B:T position of all the other events is derived from the PPQ clock rate and time signature(s) embedded in the file. If you want the musical events to start at some specific point later in the timeline, the only option is to have an event at 1:01:000, and include that in the export. Again, this is just how MIDI files work, and is not something that Sonar - or any DAW - can change. Audio files pretty much work the same way except that you have the option to export and import Broadcast waves which have an absolute SMPTE offset embedded in them. In the absence of that information, an audio file will just open with the first sample at time zero in the DAW/Player, and if you want the music to start later, the beginning of the file has to include "dead air" from time zero. Link to comment Share on other sites More sharing options...
sjoens Posted 15 minutes ago Share Posted 15 minutes ago Unlike MIDI clips, at least in Cakewalk, an audio clip can be exported from clip end to clip end so you can drag the ends where you want start and end points to be and it honors them - even without bouncing it. MIDI clips aren't designed to do that, tho it would be cool if they could. I will say that while experimenting with this, one exported .mid file had inserted 9 measures in front of the MIDI notes when reopening it in Cakewalk. Weird. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now