Class: MIDI::SongSelect
- Inherits:
-
SystemCommon
- Object
- Event
- SystemCommon
- MIDI::SongSelect
- Defined in:
- lib/midilib/event.rb
Instance Attribute Summary collapse
-
#song ⇒ Object
Returns the value of attribute song.
Attributes inherited from Event
#delta_time, #print_channel_numbers_from_one, #print_decimal_numbers, #print_note_names, #status, #time_from_start
Instance Method Summary collapse
- #data_as_bytes ⇒ Object
-
#initialize(song = 0, delta_time = 0) ⇒ SongSelect
constructor
A new instance of SongSelect.
- #to_s ⇒ Object
Methods inherited from Event
#<=>, #channel_to_s, #number_to_s, #quantize_to
Constructor Details
#initialize(song = 0, delta_time = 0) ⇒ SongSelect
Returns a new instance of SongSelect.
310 311 312 313 |
# File 'lib/midilib/event.rb', line 310 def initialize(song = 0, delta_time = 0) super(SONG_SELECT, delta_time) @song = song end |
Instance Attribute Details
#song ⇒ Object
Returns the value of attribute song.
308 309 310 |
# File 'lib/midilib/event.rb', line 308 def song @song end |
Instance Method Details
#data_as_bytes ⇒ Object
315 316 317 318 319 |
# File 'lib/midilib/event.rb', line 315 def data_as_bytes data = [] data << @status data << @song end |
#to_s ⇒ Object
321 322 323 |
# File 'lib/midilib/event.rb', line 321 def to_s return super << "song sel #{number_to_s(@song)}" end |