Menu

Need some help...

Dispass138
2005-02-10
2013-03-27
  • Dispass138

    Dispass138 - 2005-02-10

    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

     
    • Dispass138

      Dispass138 - 2005-02-10

      I guess I should have stated...
      I'm working in VB6.

       
      • jtbalogh

        jtbalogh - 2005-02-10

        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.

         
    • Dispass138

      Dispass138 - 2005-02-10

      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.

       

Log in to post a comment.

MongoDB Logo MongoDB