Products
Orders
Services
Impressum
Freeware
Links

Usage of available commandline tools for Windows

GNMIDI screenshot GN MIDI Tools are Win32 commandline tools for analysing, converting, modifying MIDI files.
The tools can be licensed for commercial or noncommercial uses.

midi2txt

midi2txt converts a binary MIDI file into readable ASCII text.
The text can be modified and converted back to midi using txt2midi utiltity if the text syntax is still correct.

usage: midi2txt [-error][-chunk][-short][-info][-lyric][-tact][-units][-ms][-dec][-channel] file.mid [file.txt]
options:
-error  checks file only. Produces only error report
-chunk  prints structure of midi file (header, tracks)
-short  prints short info about text, tracknames, programs
-info   prints info about text, tracknames, programs, controls
-lyric  prints lyrics only
-tact   marks end of tact bars with .
-units  prints position of all events in midi units.
-ms     prints position of all events in milliseconds (1st track only).
-dec    print decimal values instead of notes, channels, programs,pauses...
-channel        print channel before every event

midi2txt examples

midi2txt -units -ms coldice5.mid coldice5_midi2txt_readabletext.txt
result text: coldice5_midi2txt_readabletext.txt
midi2txt -dec coldice5.mid coldice5_midi2txt_using_option_values.txt
result text: coldice5_midi2txt_using_option_values.txt
midi2txt -dec -short coldice5.mid coldice5_midi2txt_using_option_values_short.txt
result text: coldice5_midi2txt_using_option_values_short.txt
midi2txt -chunk coldice5.mid coldice5_midi2txt_chunk.txt
result text: coldice5_midi2txt_chunk.txt

txt2midi

txt2midi converts text converted using midi2txt utility back to a MIDI file. The text syntax must be valid.

usage: txt2midi [-version] [-programs] textfile.txt midifile.mid

midi2csv

midi2csv converts a binary MIDI file into a comma separated text table. The rows are commands and the columns are parameters and additional calculated time information.
The csv can be modified using a text editor or using a spreadsheet application and converted back to MIDI file using csv2midi

usage: midi2csv [-combinenoteonoff] [-separator sepcharacter] input.mid [output.csv]
-combine        finds corresponding note on/off commands and merges them in an output line
-separator      the separator used in spreadsheet (usually semicolon ; or comma ,

midi2csv examples

midi2csv coldice4.mid coldice4_midi2csv_semicolon.csv
result text: coldice4_midi2csv_semicolon.csv
midi2csv -sep , coldice4.mid coldice4_midi2csv_using_comma.csv
result text: coldice4_midi2csv_using_comma.csv
midi2csv -combine coldice4.mid coldice4_midi2csv_combinednoteonoff.csv
result text: coldice4_midi2csv_combinednoteonoff.csv

csv2midi

csv2midi converts a text file generated by midi2csv utility back to a MIDI file.

usage: csv2midi input.csv output.mid

mid2parson

mid2parson reads the notes from a specified channel of a binary midi file and makes it mono. The remaining notes are converted to Parsons code which is often used to find parts from the song by a given search term that has not to be very exact (e.g. humming).

midi2pars [-channel #][-track #] input.mid [output.txt]
(channel # is 1-16,  track # is 1-255)

midinote

midinote converts a binary MIDI file into a text file that can easily read by machines or software. Each line contains a MIDI command with values as parameters. The parameters contain also calculated times.
The text file can be modified using a text editor and converted back to a MIDI file using utility note2mid.

usage: midinote [-nohead] [-val] [-ev ...][-units][-time] input.mid [output.txt]

-noheader       don't print header that explains the columns
-values         print cryptical values for easier import into programs
-eventlist ...  print only events of kind listed in argument ...
-units  print column with units
-time   print column with milliseconds
input.mid       get notes sorted by start time from this midi file
output.txt      write output into a text file (default: standard output)
by default units and time columns are shown

midinote examples

midinote coldice3.mid coldice3_midinote_readable.txt
result text: coldice3_midinote_readabletext.txt
midinote -values coldice3.mid coldice3_midinote_values.txt
result text: coldice3_midinote_values.txt
midinote -eventlist t -time coldice3.mid coldice3_midinote_textevents.txt
result text: coldice3_midinote_textevents.txt

note2mid

note2mid converts a text file generated by midinote utility back to a MIDI file.

usage: note2mid textfile midifile

removechords

removechords removes chords of given formats in a midi file

removechords input.mid output.mid -method methodname -format chordformats ...

methods:
REMOVEALLCHORDS
REMOVECHORDFORMATS removeformat1 removeformat2 ...
REMOVECHORDFORMATSEXCEPT exceptformat1 expceptformat2 ...
REMOVEDUPLICATECHORDS preferformat1 preferformat2 ...

chordformats: LYRIC TEXT MARKER PSR WORDBOX BIAB
default method is REMOVECHORDFORMATS

removechords examples

removechords -method REMOVEALLCHORDS coldice3.mid nochords.mid
removechords coldice3.mid chords_without_psr_and_biab.mid -method REMOVECHORDFORMATS -format PSR BIAB
removechords coldice3.mid chords_onlypsr.mid -method REMOVECHORDFORMATSEXCEPT -format PSR
removechords coldice3.mid chords_onlyoneformat.mid -method REMOVEDUPLICATECHORDS -format PSR WORDBOX LYRIC TEXT MARKER BIAB
www.gnmidi.com © Günter Nagler Contact