Class: SMF::NoteOff
- Inherits:
-
VoiceMessage
- Object
- Event
- MIDIMessage
- ChannelMessage
- VoiceMessage
- SMF::NoteOff
- Defined in:
- lib/smf.rb
Instance Attribute Summary collapse
-
#note ⇒ Object
Returns the value of attribute note.
Attributes inherited from ChannelMessage
Attributes inherited from Event
Instance Method Summary collapse
- #==(other) ⇒ Object
- #fake? ⇒ Boolean
-
#initialize(offset, ch, note, vel) ⇒ NoteOff
constructor
A new instance of NoteOff.
- #vel ⇒ Object (also: #velocity)
- #vel=(vel) ⇒ Object (also: #velocity=)
Methods inherited from Event
Constructor Details
#initialize(offset, ch, note, vel) ⇒ NoteOff
Returns a new instance of NoteOff.
318 319 320 321 322 |
# File 'lib/smf.rb', line 318 def initialize(offset, ch, note, vel) # note:0/2**7-1, vel:0/2**7-1 super(offset, ch) @note, @vel = note, vel end |
Instance Attribute Details
#note ⇒ Object
Returns the value of attribute note.
324 325 326 |
# File 'lib/smf.rb', line 324 def note @note end |
Instance Method Details
#==(other) ⇒ Object
333 334 335 |
# File 'lib/smf.rb', line 333 def == (other) super && note == other.note && vel == other.vel end |
#fake? ⇒ Boolean
328 |
# File 'lib/smf.rb', line 328 def fake?() @vel.nil? end |
#vel ⇒ Object Also known as: velocity
326 |
# File 'lib/smf.rb', line 326 def vel() @vel || 64 end |
#vel=(vel) ⇒ Object Also known as: velocity=
327 |
# File 'lib/smf.rb', line 327 def vel=(vel) @vel = vel end |