| Class | MIDI::IO::MIDIFile |
| In: |
lib/midilib/io/midifile.rb
|
| Parent: | Object |
A MIDIFile parses a MIDI file and calls methods when it sees MIDI events. Most of the methods are stubs. To do anything interesting with the events, override these methods (those between the "The rest of these are NOPs by default" and "End of NOPs" comments).
See SeqReader for a subclass that uses these methods to create Event objects.
| MThd_BYTE_ARRAY | = | [77, 84, 104, 100] | ||
| MTrk_BYTE_ARRAY | = | [77, 84, 114, 107] | ||
| NUM_DATA_BYTES | = | [ 0, 0, 0, 0, 0, 0, 0, 0, # 0x00 - 0x70 2, 2, 2, 2, 1, 1, 2, 0 | This array is indexed by the high half of a status byte. Its value is either the number of bytes needed (1 or 2) for a channel message, or 0 if it‘s not a channel message. |
| bytes_to_be_read | [RW] | |
| curr_ticks | [RW] | |
| no_merge | [RW] | |
| raw_data | [RW] | |
| raw_time_stamp_data | [RW] | Raw data info |
| raw_var_num_data | [RW] | |
| skip_init | [RW] | |
| ticks_so_far | [RW] |
This default getc implementation tries to read a single byte from io and returns it as an integer.
Read and add a number of bytes to the message buffer. Return the last byte (so we can see if it‘s an EOX or not).