Class: MicroMIDI::Instructions::SysEx
- Inherits:
-
Object
- Object
- MicroMIDI::Instructions::SysEx
- Includes:
- MIDIMessage
- Defined in:
- lib/micromidi/instructions/sysex.rb,
lib/micromidi/instructions/shorthand.rb
Instance Method Summary collapse
-
#initialize(state) ⇒ SysEx
constructor
A new instance of SysEx.
-
#sysex_command(address, data, options = {}) ⇒ Object
(also: #command, #sc)
create a sysex command.
-
#sysex_message(data, options = {}) ⇒ Object
(also: #sysex, #sx)
create an indeterminate sysex message.
-
#sysex_request(address, size, options = {}) ⇒ Object
(also: #request, #sr)
create a sysex request.
Constructor Details
#initialize(state) ⇒ SysEx
Returns a new instance of SysEx.
11 12 13 |
# File 'lib/micromidi/instructions/sysex.rb', line 11 def initialize(state) @state = state end |
Instance Method Details
#sysex_command(address, data, options = {}) ⇒ Object Also known as: command, sc
create a sysex command
16 17 18 19 20 |
# File 'lib/micromidi/instructions/sysex.rb', line 16 def sysex_command(address, data, = {}) [:sysex_node] ||= [:node] props = @state.(, :sysex_node) SystemExclusive::Command.new(address, data, :node => props[:sysex_node]) end |
#sysex_message(data, options = {}) ⇒ Object Also known as: sysex, sx
create an indeterminate sysex message
32 33 34 35 36 |
# File 'lib/micromidi/instructions/sysex.rb', line 32 def (data, = {}) [:sysex_node] ||= [:node] props = @state.(, :sysex_node) SystemExclusive::Message.new(data, :node => props[:sysex_node]) end |
#sysex_request(address, size, options = {}) ⇒ Object Also known as: request, sr
create a sysex request
24 25 26 27 28 |
# File 'lib/micromidi/instructions/sysex.rb', line 24 def sysex_request(address, size, = {}) [:sysex_node] ||= [:node] props = @state.(, :sysex_node) SystemExclusive::Request.new(address, size, :node => props[:sysex_node]) end |