Export midi tracks

• Jan 14, 2017 - 00:24

I have a midi song that plays fine in Musescore2. I want to export the tracks to individual .wav files, one for each instrument. I did that OK, however when I added some tracks to another media program, they are all different lengths. Is there a way to be sure that each track is the same length (in seconds?) Otherwise, if Musescore does export them all the same, then I need to know the playback rate for each track. If it's not a Musescore issue, I will have to look for help with the other software. The other software imports based on frame rate for playback, because it is a media program that uses video as well as audio. I can select several frame rates when I create my project, but not sure which would make the .wav files that Musescore created all sync up. Right now they are getting out of sync as they play, so nearer the end of the song it's a mess. They start out OK, but the error is additive as they play.


Comments

It's been a while (from version 2.0.2) since I exported individual tracks, but I remember having had a similar issue.
I worked around it by adding one measure in the front of the piece and add a single note for every instrument on the first beat of it. I've also added a measure to the end of the piece and did the same there.

If I remember correctly, that was all that was needed to have them line up; but if they don't, at least you've now got two reference points on which you can timestretch.

In reply to by jeetee

Not sure I understand what you mean. But the problem is that one of the exported midi tracks is shorter than 3 of the other tracks. However, they all start out in sync, but by the time about 70% or so have played, I can hear that the "shortest" track is playing slightly ahead of the other 3, and as it goes on, it gets worse. So just adding a measure at the beginning would make the beginning out of sync anyway, although it might help toward the end. Either way, I don't understand why Musescore would export tracks from the same MIDI file at different lengths (times).

In reply to by bill2reg

I don't know what caused it either, only what was a valid workaround for me back in those days.

You state that they start in synch; but somehow you also think that if you add a measure in front that somehow that measure won't be in synch?

In reply to by jeetee

Yes, because they start in synch all together. There is a slight difference in playback speed between some of the track .wav files, so it's not noticeable at the beginning. But it is a cumulative error, so the farther along the tracks play (at slightly different speeds), the more noticeable the out-of-synch error becomes. So if I add a measure at the beginning of the "bad" tracks, then they will just start later anyway and still be out of synch.

In reply to by bill2reg

That's *Exactly* why you also add a measure to the end.
For me magically, they then all became the same length, no more out-of-synch.

But if they then still are out of synch you have two easy recognizable points (the start measure and the end measure) which you can use to synch your tracks yourself.

In reply to by bill2reg

You have to add a note to the added measures as well, so they don't just add silence. How the internals worked it out correctly after that, I can't currently say; all I can say is that for me they magically did.

Try it out; it's not that big of an effort:
Best case: you and up with perfectly synched tracks, you only have to cut the back and front synch notes from them.
Worst case: your tracks are still out of synch, but at least you now have a marker you can use to manually synchronize afterwards.

In reply to by jeetee

I tried adding a measure at the beginning and end, but it didn't solve the problem. I'm not sure that you understand, or maybe I didn't say it, but the program that I am using to play back all the separate tracks KEEPS them SEPARATE. So, they are multiple audio tracks in a video editor that also can include audio tracks, and during plavback they all mix down together so you hear them all. But each track plays at whatever speed/length it is, and since these tracks are all different lengths (in time), they don't blend back correctly like in the original MIDI song. Does that explain better? I appreciate your help. I'd like to work this out.

In reply to by bill2reg

Your video editor likely doesn't support stretching/resampling audio; most editors don't. But if you've exported wav's (one for each track), you could open them in an audio editor (like Audacity) to first stretch/edit/correct their lengths and export them again (still as separate tracks).
Then use those tracks in your video editor.
Hardly a walk in the park, but it might get you there.

I'd also be interested to see the audio/MIDI that gives you the wrong exports from MuseScore. If copyright allows it, could you attach them here with the steps you perform from loading/importing up and including the exporting from MuseScore?
At the very least, it could help in figuring out what's going wrong with MuseScore…

In reply to by jeetee

I will have to research/remember where I got the MIDI file. It may have been from the Musescore downloads, but I will check. As far as loading, I just open the file with Musescore2, create the parts and export as .wav files to a folder. I guess that's all pretty straightforward. I did find that if I import them to my video editor at 23.81 fps, they synch up better. Also, I have Audacity, but I have never really used it so I have no idea how to lengthen or shorten the individual parts so that they are all equal in length. I will have to read the manual when I have time.

Do you still have an unanswered question? Please log in first to post your question.