Module Mu.Instrument

Music instruments.

Instruments

type t = [
  1. | `Custom of string
    (*

    Not in General MIDI

    *)
  2. | `Percussion
    (*

    Not in General MIDI, use with Percussion.

    *)
  3. | `Accordion
  4. | `Acoustic_bass
  5. | `Acoustic_grand_piano
  6. | `Acoustic_guitar_nylon
  7. | `Acoustic_guitar_steel
  8. | `Agogo
  9. | `Alto_sax
  10. | `Applause
  11. | `Bagpipe
  12. | `Banjo
  13. | `Baritone_sax
  14. | `Bassoon
  15. | `Bird_tweet
  16. | `Blown_bottle
  17. | `Brass_section
  18. | `Breath_noise
  19. | `Bright_acoustic_piano
  20. | `Celesta
  21. | `Cello
  22. | `Choir_aahs
  23. | `Chorused_piano
  24. | `Church_organ
  25. | `Clarinet
  26. | `Clavinet
  27. | `Contrabass
  28. | `Distortion_guitar
  29. | `Dulccimer
  30. | `Electric_bass_fingered
  31. | `Electric_bass_picked
  32. | `Electric_grand_piano
  33. | `Electric_guitar_clean
  34. | `Electric_guitar_jazz
  35. | `Electric_guitar_muted
  36. | `English_horn
  37. | `Fiddle
  38. | `Flute
  39. | `French_horn
  40. | `Fretless_bass
  41. | `Fx1_train
  42. | `Fx2_soundtrack
  43. | `Fx3_crystal
  44. | `Fx4_atmosphere
  45. | `Fx5_brightness
  46. | `Fx6_goblins
  47. | `Fx7_echoes
  48. | `Fx8_sci_fi
  49. | `Glockenspiel
  50. | `Guitar_fret_noise
  51. | `Guitar_harmonics
  52. | `Gunshot
  53. | `Hammond_organ
  54. | `Harmonica
  55. | `Harpsichord
  56. | `Helicopter
  57. | `Honky_tonk_piano
  58. | `Kalimba
  59. | `Koto
  60. | `Lead1_square
  61. | `Lead2_sawtooth
  62. | `Lead3_calliope
  63. | `Lead4_chiff
  64. | `Lead5_charang
  65. | `Lead6_voice
  66. | `Lead7_fifths
  67. | `Lead8_bass_lead
  68. | `Marimba
  69. | `Melodic_drum
  70. | `Music_box
  71. | `Muted_trumpet
  72. | `Oboe
  73. | `Ocarina
  74. | `Orchestra_hit
  75. | `Orchestral_harp
  76. | `Overdriven_guitar
  77. | `Pad1_new_age
  78. | `Pad2_warm
  79. | `Pad3_polysynth
  80. | `Pad4_choir
  81. | `Pad5_bowed
  82. | `Pad6_metallic
  83. | `Pad7_halo
  84. | `Pad8_sweep
  85. | `Pan_flute
  86. | `Percussive_organ
  87. | `Piccolo
  88. | `Pizzicato_strings
  89. | `Recorder
  90. | `Reed_organ
  91. | `Reverse_cymbal
  92. | `Rhodes_piano
  93. | `Rock_organ
  94. | `Seashore
  95. | `Shakuhachi
  96. | `Shamisen
  97. | `Shanai
  98. | `Sitar
  99. | `Slap_bass1
  100. | `Slap_bass2
  101. | `Soprano_sax
  102. | `Steel_drums
  103. | `String_ensemble1
  104. | `String_ensemble2
  105. | `Synth_bass1
  106. | `Synth_bass2
  107. | `Synth_brass1
  108. | `Synth_brass2
  109. | `Synth_drum
  110. | `Synth_strings1
  111. | `Synth_strings2
  112. | `Synth_voice
  113. | `Taiko_drum
  114. | `Tango_accordion
  115. | `Telephone_ring
  116. | `Tenor_sax
  117. | `Timpani
  118. | `Tinkle_bell
  119. | `Tremolo_strings
  120. | `Trombone
  121. | `Trumpet
  122. | `Tuba
  123. | `Tubular_bells
  124. | `Vibraphone
  125. | `Viola
  126. | `Violin
  127. | `Voice_oohs
  128. | `Whistle
  129. | `Woodblock
  130. | `Xylophone
]

The type for instruments as per General MIDI programs except for `Custom and `Percussion.

`Percussion should be used with Percussion pitches, these are treated specially during MIDI. They are performed on channel 10.

val midi_program : t -> int

midi_program i is the zero-based MIDI program number for instrument i. Raises Invalid_argument on `Custom _ or `Percussion.

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.

Instrument sets and maps

module Set : sig ... end

Instrument sets.

module Map : sig ... end

Instrument maps.