Module: Midi::Event

Defined in:
lib/kuromusic/IO/MIDI/Event.rb

Constant Summary collapse

NOTE =
{"C"=>0, "C#"=>1, "D"=>2, "D#"=>3, "E"=>4, "F"=>5, "F#"=>6, "G"=>7, "G#"=>8, "A"=>9, "A#"=>10, "B"=>11}
OCTAVE_UNIT =
12

Instance Method Summary collapse

Instance Method Details

#to_binObject



35
36
37
38
39
40
41
42
# File 'lib/kuromusic/IO/MIDI/Event.rb', line 35

def to_bin()
  #p self.args
  if @args[:type] == ::Event::EventType::NOTE
    return note_to_bin
  elsif @args[:type] == ::Event::EventType::META
    return meta_to_bin
  end
end