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 = [
  1. | `Acoustic_bass_drum
  2. | `Acoustic_snare
  3. | `Bass_drum1
  4. | `Cabasa
  5. | `Chinese_cymbal
  6. | `Claves
  7. | `Closed_hi_hat
  8. | `Cowbell
  9. | `Crash_cymbal1
  10. | `Crash_cymbal2
  11. | `Electric_snare
  12. | `Hand_clap
  13. | `Hi_bongo
  14. | `Hi_mid_tom
  15. | `Hi_wood_block
  16. | `High_agogo
  17. | `High_floor_tom
  18. | `High_timbale
  19. | `High_tom
  20. | `Long_guiro
  21. | `Long_whistle
  22. | `Low_agogo
  23. | `Low_bongo
  24. | `Low_conga
  25. | `Low_floor_tom
  26. | `Low_mid_tom
  27. | `Low_timbale
  28. | `Low_tom
  29. | `Low_wood_block
  30. | `Maracas
  31. | `Mute_cuica
  32. | `Mute_hi_conga
  33. | `Mute_triangle
  34. | `Open_cuica
  35. | `Open_hi_conga
  36. | `Open_hi_hat
  37. | `Open_triangle
  38. | `Pedal_hi_hat
  39. | `Ride_bell
  40. | `Ride_cymbal1
  41. | `Ride_cymbal2
  42. | `Short_guiro
  43. | `Short_whistle
  44. | `Side_stick
  45. | `Splash_cymbal
  46. | `Tambourine
  47. | `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.