sig
type division = Ticks_per_quarter of int | SMPTE of int * int
type event =
Note_off of Audio.Note.t * float
| Note_on of Audio.Note.t * float
| Aftertouch of int * float
| Control_change of int * int
| Patch of int
| Channel_aftertouch of int
| Pitch of int
| Sequence_number of int
| Text of string
| Copyright of string
| Track_name of string
| Instrument_name of string
| Lyric of string
| Marker of string
| Cue of string
| End_of_track
| Tempo of int
| Time_signature of int * int * int * int
| Key_signature of int * bool
| Custom of string
type buffer
val data : MIDI.buffer -> (int * MIDI.event) list
val create : int -> MIDI.buffer
val copy : MIDI.buffer -> MIDI.buffer
val blit : MIDI.buffer -> int -> MIDI.buffer -> int -> int -> unit
val blit_all : MIDI.buffer -> MIDI.buffer -> unit
val merge : MIDI.buffer -> MIDI.buffer -> unit
val add : MIDI.buffer -> int -> MIDI.buffer -> int -> int -> unit
val clear_all : MIDI.buffer -> unit
val insert : MIDI.buffer -> int * MIDI.event -> unit
module Multitrack :
sig
type t = MIDI.buffer array
type buffer = MIDI.Multitrack.t
val channels : MIDI.Multitrack.buffer -> int
val duration : MIDI.Multitrack.buffer -> int
val create : int -> int -> MIDI.Multitrack.buffer
val clear :
?channel:int -> MIDI.Multitrack.buffer -> int -> int -> unit
end
module IO :
sig
module Reader :
sig
class type t =
object
method close : unit
method read :
int -> MIDI.Multitrack.buffer -> int -> int -> int
end
class of_file : string -> t
end
module Writer :
sig
class type t =
object
method advance : int -> unit
method close : unit
method note_off : int -> int -> float -> unit
method note_on : int -> int -> float -> unit
method put : int -> MIDI.event -> unit
end
class to_file : int -> ?tracks:int -> string -> t
end
end
end