Class: Bitwig::Channel
- Inherits:
-
Object
- Object
- Bitwig::Channel
- Defined in:
- lib/bitwig/controllers.rb
Instance Attribute Summary collapse
-
#channel_number ⇒ Object
readonly
Returns the value of attribute channel_number.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(controller, tracks, channel_number, logger:) ⇒ Channel
constructor
A new instance of Channel.
- #output ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(controller, tracks, channel_number, logger:) ⇒ Channel
Returns a new instance of Channel.
103 104 105 106 107 108 |
# File 'lib/bitwig/controllers.rb', line 103 def initialize(controller, tracks, channel_number, logger:) @controller = controller @tracks = tracks @channel_number = channel_number @logger = logger end |
Instance Attribute Details
#channel_number ⇒ Object (readonly)
Returns the value of attribute channel_number.
110 111 112 |
# File 'lib/bitwig/controllers.rb', line 110 def channel_number @channel_number end |
#name ⇒ Object
Returns the value of attribute name.
110 111 112 |
# File 'lib/bitwig/controllers.rb', line 110 def name @name end |
Instance Method Details
#output ⇒ Object
119 120 121 |
# File 'lib/bitwig/controllers.rb', line 119 def output @controller.midi_device.channels[@channel_number] end |
#to_s ⇒ Object
123 124 125 |
# File 'lib/bitwig/controllers.rb', line 123 def to_s "<Channel #{@channel_number} '#{@name}' on port '#{@controller.port_name}' (controller '#{@controller.name}')>" end |