Class: Sidtool::MidiFileWriter::NoteOff
- Inherits:
-
Struct
- Object
- Struct
- Sidtool::MidiFileWriter::NoteOff
- Defined in:
- lib/sidtool/midi_file_writer.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#key ⇒ Object
Returns the value of attribute key.
Instance Method Summary collapse
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel
81 82 83 |
# File 'lib/sidtool/midi_file_writer.rb', line 81 def channel @channel end |
#key ⇒ Object
Returns the value of attribute key
81 82 83 |
# File 'lib/sidtool/midi_file_writer.rb', line 81 def key @key end |
Instance Method Details
#bytes ⇒ Object
82 83 84 85 86 87 88 89 90 |
# File 'lib/sidtool/midi_file_writer.rb', line 82 def bytes raise "Channel too big: #{channel}" if channel > 15 raise "Key is too big: #{key}" if key > 255 [ 0x80 + channel, key, 40 # Default velocity ] end |