class MIDIInstrument::NoteEvent
An NoteEvent
is a pairing of a MIDI NoteOn and NoteOff message. Its duration can correspond to sequencer ticks
Attributes
duration[R]
finish[R]
length[R]
start[R]
Public Class Methods
new(start_message, duration, options = {})
click to toggle source
@param [MIDIMessage::NoteOn] start_message @param [Fixnum] duration @param [Hash] options @option options [MIDIMessage::NoteOff] :finish
# File lib/midi-instrument/note_event.rb, line 20 def initialize(start_message, duration, options = {}) @start = start_message @length = duration @finish = options[:finish] || start_message.to_note_off end