Module MIDI

module MIDI: sig .. end

Operations on MIDI data.


type division = 
| Ticks_per_quarter of int (*

Ticks per quarter note.

*)
| SMPTE of int * int (*

SMPTE (frames per second, ticks per frame).

*)

Units for delta-times.

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 

A MIDI buffer.

val data : buffer -> (int * event) list
val create : int -> buffer

Create a MIDI buffer of given length in samples.

val copy : buffer -> buffer

Create a copy of a MIDI buffer.

val blit : buffer -> int -> buffer -> int -> int -> unit
val blit_all : buffer -> buffer -> unit
val merge : buffer -> buffer -> unit

merge b1 b2 merges the buffer b2 into b1.

val add : buffer -> int -> buffer -> int -> int -> unit
val clear_all : buffer -> unit
val insert : buffer -> int * event -> unit
module Multitrack: sig .. end
module IO: sig .. end