| Class | MIDI::Utils |
| In: |
lib/midilib/utils.rb
|
| Parent: | Object |
Utility methods.
| NOTE_NAMES | = | [ 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B' | MIDI note names. NOTE_NAMES[0] is ‘C’, NOTE_NAMES[1] is ‘C#’, etc. |
Given an integer, returns it as a variable length array of bytes (the format used by MIDI files).
The converse operation—converting a var len into a number—requires input from a stream of bytes. Therefore we don’t supply it here. That is a part of the MIDIFile class.