Module: MIDIInstrument::API::Input
- Included in:
- Node
- Defined in:
- lib/midi-instrument/api.rb
Overview
Input convenience methods
Class Method Summary collapse
Instance Method Summary collapse
-
#inputs ⇒ Array<UniMIDI::Input>
MIDI input devices.
-
#receive_channel ⇒ Fixnum?
(also: #rx_channel)
MIDI channel messages will only be acknowledged if they have this optional specified channel.
-
#receive_channel=(channel) ⇒ Fixnum?
(also: #rx_channel=)
Set the receive channel.
Class Method Details
.included(base) ⇒ Object
9 10 11 12 |
# File 'lib/midi-instrument/api.rb', line 9 def self.included(base) base.send(:extend, Forwardable) base.send(:def_delegators, :@input, :omni_on) end |
Instance Method Details
#inputs ⇒ Array<UniMIDI::Input>
MIDI input devices
16 17 18 |
# File 'lib/midi-instrument/api.rb', line 16 def inputs @input.devices end |
#receive_channel ⇒ Fixnum? Also known as: rx_channel
MIDI channel messages will only be acknowledged if they have this optional specified channel
22 23 24 |
# File 'lib/midi-instrument/api.rb', line 22 def receive_channel @input.channel end |
#receive_channel=(channel) ⇒ Fixnum? Also known as: rx_channel=
Set the receive channel
29 30 31 |
# File 'lib/midi-instrument/api.rb', line 29 def receive_channel=(channel) @input.channel = channel end |