Class: MIDIEvents::NoteOn

Inherits:
Object
  • Object
show all
Includes:
NoteMessage
Defined in:
lib/midi-events/messages.rb

Overview

MIDI Note-On message

Constant Summary collapse

STATUS =
0x9
DATA =
[:channel, :note, :velocity].freeze
DISPLAY_NAME =
'Note On'.freeze
CONSTANT =
{ 'Note' => :note }.freeze

Instance Method Summary collapse

Instance Method Details

#abs_noteFixnum Originally defined in module NoteMessage

How many half-steps is this note above the closest C

Returns:

  • (Fixnum)

#note_nameString Originally defined in module NoteMessage

The name of the note without its octave e.g. F#

Returns:

  • (String)

#octaveFixnum Also known as: oct Originally defined in module NoteMessage

The octave number of the note

Returns:

  • (Fixnum)

#octave=(value) ⇒ NoteMessage Also known as: oct= Originally defined in module NoteMessage

Set the octave number of the note

Parameters:

  • value (Fixnum)

Returns:

#to_note_offObject

returns the NoteOff equivalent of this object



102
103
104
# File 'lib/midi-events/messages.rb', line 102

def to_note_off
  NoteOff.new(channel, note, velocity)
end