lib/midiops/observer.rb in midiops-0.2.0 vs lib/midiops/observer.rb in midiops-0.2.1
- old
+ new
@@ -16,16 +16,16 @@
def on_cc ch, number, &handler
@handler.add [176+ch, number, :ARG], handler
end
- def on_key_press ch, key, octave, &handler
- @handler.add [144+ch, MIDIOps::Note.key_to_code(key, octave), :ARG], handler
+ def on_key_press ch, note_string, &handler
+ @handler.add [144+ch, MIDIOps::Note.note_to_code(note_string), :ARG], handler
end
alias_method :on_key, :on_key_press
def on_key_release ch, key, octave, &handler
- @handler.add [128+ch, MIDIOps::Note.key_to_code(key, octave), :ARG], handler
+ @handler.add [128+ch, MIDIOps::Note.note_to_code(note_string), :ARG], handler
end
def listen input
EM.run do
loop do