Mu_midi.File
MIDI files (.mid
).
MIDI files encoder.
The type for specifying the unit for ticks in the file.
type track = event list
A 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 -> string
to_string m
is m
as a MIDI file.
val of_performance : Mu.Performance.t -> t
of_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.