Class: MusaLCEServer::Bitwig::Channel Private
- Inherits:
-
Object
- Object
- MusaLCEServer::Bitwig::Channel
- Defined in:
- lib/bitwig/controllers.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Represents a MIDI channel on a controller.
Each channel can be named and mapped to a track for MIDI output.
Instance Attribute Summary collapse
-
#channel_number ⇒ Integer
readonly
The MIDI channel number (0-15).
- #name ⇒ Object private
Instance Method Summary collapse
-
#initialize(controller, tracks, channel_number, logger:) ⇒ Channel
constructor
private
Creates a new channel.
-
#output ⇒ Musa::MIDIVoices::MIDIVoice
private
Returns the MIDI voice for this channel.
-
#to_s ⇒ String
private
Returns a string representation of this channel.
Constructor Details
#initialize(controller, tracks, channel_number, logger:) ⇒ Channel
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new channel.
183 184 185 186 187 188 |
# File 'lib/bitwig/controllers.rb', line 183 def initialize(controller, tracks, channel_number, logger:) @controller = controller @tracks = tracks @channel_number = channel_number @logger = logger end |
Instance Attribute Details
#channel_number ⇒ Integer (readonly)
Returns the MIDI channel number (0-15).
194 195 196 |
# File 'lib/bitwig/controllers.rb', line 194 def channel_number @channel_number end |
#name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
194 |
# File 'lib/bitwig/controllers.rb', line 194 attr_reader :channel_number, :name |
Instance Method Details
#output ⇒ Musa::MIDIVoices::MIDIVoice
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the MIDI voice for this channel.
210 211 212 |
# File 'lib/bitwig/controllers.rb', line 210 def output @controller.midi_device.channels[@channel_number] end |
#to_s ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a string representation of this channel.
217 218 219 |
# File 'lib/bitwig/controllers.rb', line 217 def to_s "<Channel #{@channel_number} '#{@name}' on port '#{@controller.port_name}' (controller '#{@controller.name}')>" end |