Class: MusaLCEServer::Bitwig::Channel

Inherits:
Object
  • Object
show all
Defined in:
lib/bitwig/controllers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller, tracks, channel_number, logger:) ⇒ Channel

Returns a new instance of Channel.



104
105
106
107
108
109
# File 'lib/bitwig/controllers.rb', line 104

def initialize(controller, tracks, channel_number, logger:)
  @controller = controller
  @tracks = tracks
  @channel_number = channel_number
  @logger = logger
end

Instance Attribute Details

#channel_numberObject (readonly)

Returns the value of attribute channel_number.



111
112
113
# File 'lib/bitwig/controllers.rb', line 111

def channel_number
  @channel_number
end

#nameObject

Returns the value of attribute name.



111
112
113
# File 'lib/bitwig/controllers.rb', line 111

def name
  @name
end

Instance Method Details

#outputObject



120
121
122
# File 'lib/bitwig/controllers.rb', line 120

def output
  @controller.midi_device.channels[@channel_number]
end

#to_sObject



124
125
126
# File 'lib/bitwig/controllers.rb', line 124

def to_s
  "<Channel #{@channel_number} '#{@name}' on port '#{@controller.port_name}' (controller '#{@controller.name}')>"
end