Module Mu.Percussion

Percussion sounds.

Percussion sounds can be created by using the `Percussion instrument values and the appropriate sound pitch. These notes are performed on channel 10 during MIDI rendering.

Sounds

type t = [
| `Acoustic_bass_drum
| `Acoustic_snare
| `Bass_drum1
| `Cabasa
| `Chinese_cymbal
| `Claves
| `Closed_hi_hat
| `Cowbell
| `Crash_cymbal1
| `Crash_cymbal2
| `Electric_snare
| `Hand_clap
| `Hi_bongo
| `Hi_mid_tom
| `Hi_wood_block
| `High_agogo
| `High_floor_tom
| `High_timbale
| `High_tom
| `Long_guiro
| `Long_whistle
| `Low_agogo
| `Low_bongo
| `Low_conga
| `Low_floor_tom
| `Low_mid_tom
| `Low_timbale
| `Low_tom
| `Low_wood_block
| `Maracas
| `Mute_cuica
| `Mute_hi_conga
| `Mute_triangle
| `Open_cuica
| `Open_hi_conga
| `Open_hi_hat
| `Open_triangle
| `Pedal_hi_hat
| `Ride_bell
| `Ride_cymbal1
| `Ride_cymbal2
| `Short_guiro
| `Short_whistle
| `Side_stick
| `Splash_cymbal
| `Tambourine
| `Vibraslap
]

The type for percussion sounds as per General MIDI percussion.

Sounds as pitches

val to_pitch : t -> Pitch.t

to_pitch snd is Pitch.of_abs (to_abs_pitch snd).

val to_abs_pitch : t -> Pitch.abs

to_abs_pitch s is the MIDI note used to represent percusion sound s. The result is in the range [midi_min;midi_max].

val midi_min : Pitch.abs

midi_min is 35 the lowest MIDI note used to represent percussion sounds in General MIDI.

val midi_max : Pitch.abs

midi_max is 81 the highest MIDI note used to represent percussion sounds in General MIDI.

Predicates and comparisons

val equal : t -> t -> bool

equal i0 i1 is true iff i0 and i1 are the same instrument.

val compare : t -> t -> int

compare is a total order on instruments compatible with equal.