Class: Bitwig::Track

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, logger:) ⇒ Track

Returns a new instance of Track.



34
35
36
37
38
39
# File 'lib/bitwig/tracks.rb', line 34

def initialize(name, logger:)
  @name = name
  @logger = logger

  @output = Musa::Extension::DynamicProxy::DynamicProxy.new
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



41
42
43
# File 'lib/bitwig/tracks.rb', line 41

def name
  @name
end

Instance Method Details

#_channel=(new_channel) ⇒ Object



47
48
49
50
# File 'lib/bitwig/tracks.rb', line 47

def _channel=(new_channel)
  @logger.info "Assigning #{new_channel} to track '#{@name}'"
  @output.receiver = new_channel.output
end

#_forget_channelObject



43
44
45
# File 'lib/bitwig/tracks.rb', line 43

def _forget_channel
  @output.receiver = nil
end

#outObject



52
53
54
# File 'lib/bitwig/tracks.rb', line 52

def out
  @output
end