Class: Sidtool::MidiFileWriter::NoteOn
- Inherits:
-
Struct
- Object
- Struct
- Sidtool::MidiFileWriter::NoteOn
- 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
69 70 71 |
# File 'lib/sidtool/midi_file_writer.rb', line 69 def channel @channel end |
#key ⇒ Object
Returns the value of attribute key
69 70 71 |
# File 'lib/sidtool/midi_file_writer.rb', line 69 def key @key end |
Instance Method Details
#bytes ⇒ Object
70 71 72 73 74 75 76 77 78 |
# File 'lib/sidtool/midi_file_writer.rb', line 70 def bytes raise "Channel too big: #{channel}" if channel > 15 raise "Key is too big: #{key}" if key > 255 [ 0x90 + channel, key, 40 # Default velocity ] end |