Module: MIDIInstrument::API::Output
- Included in:
- Node
- Defined in:
- lib/midi-instrument/api.rb
Overview
Output convenience methods
Class Method Summary collapse
Instance Method Summary collapse
-
#outputs ⇒ Array<UniMIDI::Output>
MIDI output devices.
-
#transmit_channel ⇒ Fixnum?
(also: #tx_channel)
MIDI channel messages will be optionally forced to have this channel when outputted.
-
#transmit_channel=(channel) ⇒ Fixnum?
(also: #tx_channel=)
Set an optional MIDI channel to force channel notes into when outputted.
Class Method Details
.included(base) ⇒ Object
39 40 41 42 |
# File 'lib/midi-instrument/api.rb', line 39 def self.included(base) base.send(:extend, Forwardable) base.send(:def_delegators, :@output, :mute, :toggle_mute, :mute=, :muted?, :mute?) end |
Instance Method Details
#outputs ⇒ Array<UniMIDI::Output>
MIDI output devices
46 47 48 |
# File 'lib/midi-instrument/api.rb', line 46 def outputs @output.devices end |
#transmit_channel ⇒ Fixnum? Also known as: tx_channel
MIDI channel messages will be optionally forced to have this channel when outputted
52 53 54 |
# File 'lib/midi-instrument/api.rb', line 52 def transmit_channel @output.channel end |
#transmit_channel=(channel) ⇒ Fixnum? Also known as: tx_channel=
Set an optional MIDI channel to force channel notes into when outputted
59 60 61 |
# File 'lib/midi-instrument/api.rb', line 59 def transmit_channel=(channel) @output.channel = channel end |