Module: Midi::Track
- Defined in:
- lib/kuromusic/IO/MIDI/Track.rb
Instance Method Summary collapse
Instance Method Details
#to_bin ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/kuromusic/IO/MIDI/Track.rb', line 6 def to_bin() track = [] @measures.each {|m| m.extend(Midi::Measure) track.concat m.to_bin(@key) } tl = track.concat([0, 0xff, 0x02, 0]).size result = [0x4d, 0x54, 0x72, 0x6b, tl >> 24, tl >> 16, tl >> 8, tl % 256].concat track end |