Class: MusaLCEServer::Bitwig::Controller Private
- Inherits:
-
Object
- Object
- MusaLCEServer::Bitwig::Controller
- 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 controller in Bitwig.
A controller corresponds to a hardware MIDI device with 16 channels that can be routed to tracks.
Instance Attribute Summary collapse
-
#channels ⇒ Array<Channel>
readonly
The 16 MIDI channels.
- #is_clock ⇒ Object private
-
#midi_device ⇒ MIDIDevice?
readonly
The associated MIDI device.
-
#name ⇒ String
The controller name.
-
#port_name ⇒ String
The MIDI port name.
Instance Method Summary collapse
-
#initialize(name, midi_devices, clock, tracks, logger:) ⇒ Controller
constructor
private
Creates a new controller.
Constructor Details
#initialize(name, midi_devices, clock, tracks, logger:) ⇒ Controller
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 controller.
113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/bitwig/controllers.rb', line 113 def initialize(name, midi_devices, clock, tracks, logger:) @midi_devices = midi_devices @clock = clock @tracks = tracks @logger = logger @midi_device = nil self.name = name @channels = Array.new(16) { |channel| Channel.new(self, tracks, channel, logger: logger) } end |
Instance Attribute Details
#channels ⇒ Array<Channel> (readonly)
Returns the 16 MIDI channels.
137 |
# File 'lib/bitwig/controllers.rb', line 137 attr_reader :name, :midi_device, :channels, :is_clock |
#is_clock ⇒ 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.
137 |
# File 'lib/bitwig/controllers.rb', line 137 attr_reader :name, :midi_device, :channels, :is_clock |
#midi_device ⇒ MIDIDevice? (readonly)
Returns the associated MIDI device.
137 |
# File 'lib/bitwig/controllers.rb', line 137 attr_reader :name, :midi_device, :channels, :is_clock |
#name ⇒ String
Returns the controller name.
137 138 139 |
# File 'lib/bitwig/controllers.rb', line 137 def name @name end |
#port_name ⇒ String
Returns the MIDI port name.
127 128 129 |
# File 'lib/bitwig/controllers.rb', line 127 def port_name @port_name end |