• SONAR
  • My fudge to ensure exported midi stems start at time 0, regardless of when data starts
2015/11/28 21:09:01
lingyai
After some time trying to figure this out I've come up with a simple solution, it ain't pretty but it works and is fast.
 
Say you and a non-Sonar user are collaborating, so you want to deliver to him (and you want back from him) audio and midi stem files which each start at time 0 (even if the performance only starts later), so that when your friend gets them, he only needs to import each file at time 0, and everything will sound as intended, time-wise.
 
In this case one of the stems is a punch in-recording from in bars 10-11, nothing else.
 
If that recording were audio, no problem; I'd mute every track but that one,  go File/Export/Audio.... It makes a wav file which has silence from time 0 through the end of bar 9, the music in bars 10-11, and silence thereafter. Just what was ordered.
 
But if that punch in data were midi, it doesn't seem to work that way (correct me if I'm wrong, folks). I say so as... 
 
-- I tried to make the midi clip start at time 0 by, using the edit tool or smart tool, hovering the mouse at the left edge of the clip and then extending it to the left by dragging it all the way to time 0.  I then tried exporting it by dragging it from Sonar into a folder in Windows Explorer. Unfortunately, all I got was a two-measure midi clip (containing the data from measures 10-11); if your friend wanted to use it, he'd have to manually position it to start at measure 10. No good, especially if this has to be done often, then it becomes a real PITA. 
 
-- I also tried muting everything but the track with the punched-in midi clip and going File / Save as ... *.mid, but no good either -- it gave me a midi file containing data from all the midi tracks merged, even though they were muted.
 
My solution is to extend the midi clip to start at time 0, as mentioned; and then, at time 0 in the piano roll, put in a short note where it can do no harm (i.e. not where it acts like a keyswitch or something), and then set the velocity to 1 so it's inaudible. Now the "performance" starts at time 0. You can drag this out into windows Explorer, and when dragged back in, the file starts with 9 measures of silence, then has data in bars 10-11. Just as needed.  
 
If someone has a better idea, please let me know.  If not, and this helps solve a problem for you, ching-ching!
 
 
2015/11/28 23:22:56
ricoskyl
That approach will work fine, and it's pretty easy, but you could use any MIDI event at the start of the clip.  Perhaps a controller change.  You could easily increment then decrement a value and everything would be back to scratch before it had a chance to mess anything up.  
 
Would it help to put a 'null' event like this in your media browser with other MIDI files so you could just drag it into the start of any MIDI clip you were thinking of exporting?
2015/11/29 00:14:24
lingyai
ricoskyl
That approach will work fine, and it's pretty easy, but you could use any MIDI event at the start of the clip.  Perhaps a controller change.  You could easily increment then decrement a value and everything would be back to scratch before it had a chance to mess anything up.  
 
Would it help to put a 'null' event like this in your media browser with other MIDI files so you could just drag it into the start of any MIDI clip you were thinking of exporting?




Excellent ideas all! Thanks. Fist bumps, Hawaiian shirts, the works! 
2015/11/29 01:50:41
brundlefly
I'd suggest a CC64 = 0 (sustain pedal up). It will do the job and isn't likely to cause any kind of playback anomaly or change in sound of any synth.
2015/11/29 01:54:15
lingyai
Thanks man. Good advice as well. 
 
Wow .. people helping people ... let's do a warm fuzzy infomercial!
2015/11/29 08:58:53
Beepster
I've been using the 00:00:00 note trick since scook pointed it out to me a while back (I was working on the Kjerlighet collab which has lots of MIDI tracks).
 
It seems to me the least intrusive way and because there is a visible note there you are less likely to forget about it (thus avoiding problems and making it obvious to anyone who ends up with the file in the future). Once the clip is dragged in you just delete the note (if it's bugging you).
 
I think the MIDI export options is another solution because one of the options retains time data (maybe both) but I don't fully understand that and haven't tried it out. I'm also uncertain if such exports can be imported into projects already in progress... like they have to be opened as project files themselves. I also think the Split to Tracks Cal might need to be applied to get all the parts/clips isolated from each other. All reasons why the single note at the start of a clip option seemed a lot simpler to me.
 
But I'm used to working with audio so that just makes more sense in my little noodle.
 
MIDI be hard, yo.
2015/11/29 11:45:21
lingyai
Beepster
I've been using the 00:00:00 note trick since scook pointed it out to me a while back (I was working on the Kjerlighet collab which has lots of MIDI tracks).....
 

 
Wow, if I've stumbled onto a solution originally proposed by scook, I know I'm on the right track! (Said without sarcasm -- he is one of the top "no drama, all techno-merit" guys on this forum.) 
 
Beepster
All reasons why the single note at the start of a clip option seemed a lot simpler to me.
 
But I'm used to working with audio so that just makes more sense in my little noodle.
 
MIDI be hard, yo.
 

 
True dat!



2015/11/29 14:37:08
Kev999
I would just insert a note and mute it.
© 2026 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account