Can you take a Multiple Track MIDIFile Message Queue and write a single track (Type 0) midi file?
For example I have a program that is generating notes at different intervals so I need to use multiple tracks to "record" the information,
But I want to write the .mid as a Single track,
Basically I want to combine all the tracks.
Have any tips on how to do this
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1. Load all tracks of a midi 1 file into one VB array or one stream in OCX. Converting ticks to time. See midiplayer, midiplayerstream, miditest demo to load midi files.
2. Sort the VB array. Primary sort is time. Secondary sort is message number. Sorting the stream is usually already done without needing the SortStreamEx() function.
3. Save the VB array or stream to one track in a midi file to automatically make it a midi 0 file. Converting time to ticks. See miditest demo to save/record/generate midi files.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Cool thanks for the tips...
The only reason I really care is for other people's use. I personally have no problem with using Type 1 files but I'm sure it would be good to have Type 0. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you take a Multiple Track MIDIFile Message Queue and write a single track (Type 0) midi file?
For example I have a program that is generating notes at different intervals so I need to use multiple tracks to "record" the information,
But I want to write the .mid as a Single track,
Basically I want to combine all the tracks.
Have any tips on how to do this
I guess I should have stated...
I'm working in VB6.
Midi 1 to midi 0 file format conversion:
1. Load all tracks of a midi 1 file into one VB array or one stream in OCX. Converting ticks to time. See midiplayer, midiplayerstream, miditest demo to load midi files.
2. Sort the VB array. Primary sort is time. Secondary sort is message number. Sorting the stream is usually already done without needing the SortStreamEx() function.
3. Save the VB array or stream to one track in a midi file to automatically make it a midi 0 file. Converting time to ticks. See miditest demo to save/record/generate midi files.
Cool thanks for the tips...
The only reason I really care is for other people's use. I personally have no problem with using Type 1 files but I'm sure it would be good to have Type 0. Thanks.