Class: MIDI::SystemExclusive
- Inherits:
-
SystemCommon
- Object
- Event
- SystemCommon
- MIDI::SystemExclusive
- Defined in:
- lib/midilib/event.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
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(data, delta_time = 0) ⇒ SystemExclusive
constructor
A new instance of SystemExclusive.
- #to_s ⇒ Object
Methods inherited from Event
#<=>, #channel_to_s, #number_to_s, #quantize_to
Constructor Details
#initialize(data, delta_time = 0) ⇒ SystemExclusive
Returns a new instance of SystemExclusive.
269 270 271 272 |
# File 'lib/midilib/event.rb', line 269 def initialize(data, delta_time = 0) super(SYSEX, delta_time) @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
267 268 269 |
# File 'lib/midilib/event.rb', line 267 def data @data end |
Instance Method Details
#data_as_bytes ⇒ Object
274 275 276 277 278 279 280 281 |
# File 'lib/midilib/event.rb', line 274 def data_as_bytes data = [] data << @status data << Utils.as_var_len(@data.length) data << @data data << EOX data.flatten end |
#to_s ⇒ Object
283 284 285 |
# File 'lib/midilib/event.rb', line 283 def to_s return super << "sys ex" end |