Class: Bitwig::Controller

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, midi_devices, clock, tracks, logger:) ⇒ Controller

Returns a new instance of Controller.



63
64
65
66
67
68
69
70
71
72
73
# File 'lib/bitwig/controllers.rb', line 63

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

#channelsObject (readonly)

Returns the value of attribute channels.



76
77
78
# File 'lib/bitwig/controllers.rb', line 76

def channels
  @channels
end

#is_clockObject

Returns the value of attribute is_clock.



76
77
78
# File 'lib/bitwig/controllers.rb', line 76

def is_clock
  @is_clock
end

#midi_deviceObject (readonly)

Returns the value of attribute midi_device.



76
77
78
# File 'lib/bitwig/controllers.rb', line 76

def midi_device
  @midi_device
end

#nameObject

Returns the value of attribute name.



76
77
78
# File 'lib/bitwig/controllers.rb', line 76

def name
  @name
end

#port_nameObject

Returns the value of attribute port_name.



75
76
77
# File 'lib/bitwig/controllers.rb', line 75

def port_name
  @port_name
end