Its purpose is to convert a MIDI song in format 0 or 1 to a Uzebox MIDI stream outputted as a nicely formatted C include file.
The code lives in the uzebox/tools/midiconv directory, and it should run on Linux, OS X, and Windows (using mingw).
It is built using Midifile, a really awesome open-source C++ library for parsing Standard MIDI Files (c) 1999-2015, Craig Stuart Sapp.
To speed up the build time, all of the original examples that were in the src-programs directory have been moved to src-programs-extras. Any of those files can be copied back into the src-programs directory and then built using the instructions below.
BUILD/INSTALL INSTRUCTIONS:
Code: Select all
make
Code: Select all
make library
make midiconv
To get a list of all supported options, just run:
Code: Select all
./bin/midiconv --help
Code: Select all
Usage: ./bin/midiconv [OPTION]... INFILE OUTFILE
Options:
-h, --help Display this help text and exit
-f, --factor Speed correction factor (double). Defaults to 30.
-v, --varname Variable name used in the include file. Defaults
to 'midisong'
-s, --start Force a loop start (specified in ticks). Any
existing loop start in the input will be discarded.
-e, --end Force a loop end (specified in ticks). Any existing
loop end in the input will be discarded.
-d, --debug Print debugging information
-1, --no1 Include note off events for channel 1
-2, --no2 Include note off events for channel 2
-3, --no3 Include note off events for channel 3
-4, --no4 Include note off events for channel 4
-5, --no5 Include note off events for channel 5
If you used Rosegarden to create a MIDI file by arranging multiple segments, unless those segments are joined by clicking the name of each track (to select all segments on that track) and pressing Ctrl-J to join them, the resulting Uzebox C include file may contain multiple redundant control messages, which wastes space. After you export your MIDI (using File > Export > Export MIDI File...) you can undo these joins if you wish to keep your original segmented source file (for instance to preserve any of your linked segments).