...
Code Block |
---|
-- detect the format of the MIDI files midiseq = {} midiseq[1] = readMidiFile("c:/temp/Format 0.mid") midiseq[2] = readMidiFile("c:/temp/Format 1.mid") --[[ please set the file path to the location of the files on your system before you run the script ]] for i, seq in ipairs(midiseq) do if seq.format == MidiFileFormat.singleMultiChannelTrack then print(seq.songname..".mid has MIDI file format 0.") elseif seq.format == MidiFileFormat.simultaneousTracks then print(seq.songname..".mid has MIDI file format 1.") else print("Midi file format of "..seq.songname.." not supported!") end end |
Panel |
---|
See Also: MIDI Sequence ClassTable, readMidiFile, writeMidiFile, insertEvent, sortEvents |