Is there a way to convert a Standard MIDI File (SMF) from Type 1 to Type 0? Obviously, some advanced features might be lost, but that's okay.

I imagine there might be a software program which does this. I've tried using a few different editors & sequencers, but they either don't provide the option to pick a specific Standard MIDI File Type, or don't output Standard MIDI Files at all. (MuseScore, Timidity, Muse)


I have a Standard MIDI File (Type 1), which I composed via MuseScore. My keyboard (a Yamaha YPG-535) has the ability to construct lessons and display scores for MIDI files, but only for Type 0.

Edit: I'm looking for open source software, and preferably available for Linux.

  • You are not using the correct nomenclature. You are looking for information for "type 1" and "type 0", not "version 1" or "version 0". I have edited your question to reflect this. – user1044 Nov 3 '15 at 5:59
  • Some sequencers will save a type 0 if you merge the tracks into one multi-channel track before export. Both Cubase & Logic used to do this [idk if they still do, I haven't worked with pure midi files in a long time] – Tetsujin Nov 3 '15 at 7:56
  • 1
    @Tetsujin That sounds like a promising lead. Thanks! – jpaugh Nov 3 '15 at 15:18
  • Cockos Reaper can do this too: merge the tracks into one multi-channel track when you export an SMF. The user manual doesn't mention the distinction between Type 1 and Type 0 by name, but it would be worth a try. – user1044 Nov 3 '15 at 17:34
  • I found a program which does this. It's written in Java, so it works on any OS. The downside is, you have to compile it yourself, with the JDK. – jpaugh May 22 '17 at 0:15

There are several computer software sequencer programs that have a legacy of a great deal of capability in manipulating MIDI data. They can input and output and convert between Standard MIDI Files of Type 1 and Type 0.

I know of one such program, Sagan Metro, for Windows and Mac OS X, but there are certainly other programs that can do this.

If you do a Google search on the terms

convert smf midi file type 1 type 0

you can locate other utilities and programs.

No "features are lost" between Type 1 and Type 0. All the MIDI data will be retained in either type; it's just organized differently.


Seeing as you are particularly interested in Linux and that I found your question due to a common interest, Here are a couple of suggestions that may help:

  1. SMFformat0, part of the midifile_rb Ruby library (not a Ruby Gem, however), which you can use like this:

    $ SMFformat0 infile.mid outfile.mid

    You need to download the tar file and then run it. If you're technically adept I am sure you can work it out from the website ;)

  2. Midish, a command-line MIDI sequencer and filter for BSD and Linux. which can import and export. It will import type 1 or 0 but it only outputs type 1. It's therefore suitable for converting from type 0 to type 1 but not the other way around.

  3. Use ALSA:

    $ arecordmidi -p 14:0 output.mid &
    $ aplaymidi -l # to identify 'arecordmidi port 0' device (e.g. 129:0)
    $ aplaymidi -p 129:0 input.mid
    $ kill %%

    This last one works because arecordmidi creates type 0 files by default but it has the disadvantage of being like taping tapes - it's in real time.

I am surprised this subject is so lacking answers for the open source / linux world.


As an option you can take one of the libraries over Internet to write a small program that do what you want. For example, there is .NET library DryWetMIDI. With it conversion MIDI file from Type 1 (Multitrack) to Type 0 (Singletrack) looks like:

var midiFile = MidiFile.Read("MultiTrack file.mid");
midiFile.Write("SingleTrack file.mid", format: MidiFileFormat.SingleTrack);

I sure there are crossplatform libraries that you can use on Linux.

  • Despite requiring custom programming, this is probably the easiest way, believe it or not. IIRC, I found some software to do it, but it was awkward to use, as that was far from its primary function. The only thing preventing me from accepting this answer is that it isn't applicable to someone without programming skill. – jpaugh Jun 13 '18 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.