Class: Sidtool::MidiFileWriter::ProgramChange
- Inherits:
-
Struct
- Object
- Struct
- Sidtool::MidiFileWriter::ProgramChange
- Defined in:
- lib/sidtool/midi_file_writer.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#program_number ⇒ Object
Returns the value of attribute program_number.
Instance Method Summary collapse
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel
58 59 60 |
# File 'lib/sidtool/midi_file_writer.rb', line 58 def channel @channel end |
#program_number ⇒ Object
Returns the value of attribute program_number
58 59 60 |
# File 'lib/sidtool/midi_file_writer.rb', line 58 def program_number @program_number end |
Instance Method Details
#bytes ⇒ Object
59 60 61 62 63 64 65 66 |
# File 'lib/sidtool/midi_file_writer.rb', line 59 def bytes raise "Channel too big: #{channel}" if channel > 15 raise "Program number is too big: #{program_number}" if program_number > 255 [ 0xC0 + channel, program_number ] end |