Mu_midi.FileMIDI files (.mid).
MIDI files encoder.
The type for specifying the unit for ticks in the file.
type track = event listA track is a list of MIDI events. The tick of an event is expressed relative to the previous tick. Tracks need to end with Msg.t.Track_end event (XXX The codec could handle that).
v ~type ~time_div ~tracks is a MIDI file with given parameters.
val to_string : t -> stringto_string m is m as a MIDI file.
val of_performance : Mu.Performance.t -> tof_performance p is a MIDI file for peformance p.
FIXME.
result, for now this raises Failure _.p is limited to use of 15 instruments (one is reserved for percussion). Each instrument gets assigned a different channel and lives in its own track. A few alternative strategies could be used here.