Class: Voicemeeter::Strip::Base

Inherits:
Object
  • Object
show all
Extended by:
MetaFunctions
Includes:
IRemote, Mixins::Fades, Mixins::Outputs
Defined in:
lib/voicemeeter/strip.rb

Overview

Base class for Strip

Direct Known Subclasses

PhysicalStrip, VirtualStrip

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Mixins::Fades

#fadeby, #fadeto

Methods included from Mixins::Outputs

#make_attr_outputs

Methods included from IRemote

#apply, #to_s

Methods included from Logging

#logger

Constructor Details

#initialize(remote, i) ⇒ Base

Returns a new instance of Base.



20
21
22
23
24
25
# File 'lib/voicemeeter/strip.rb', line 20

def initialize(remote, i)
  super
  make_attr_outputs(*remote.kind.outs)
  @gainlayer = (0...8).map { GainLayer.new(remote, i, _1) }
  @levels = StripLevels.new(remote, i)
end

Instance Attribute Details

#gainlayerObject (readonly)

Returns the value of attribute gainlayer.



10
11
12
# File 'lib/voicemeeter/strip.rb', line 10

def gainlayer
  @gainlayer
end

#levelsObject (readonly)

Returns the value of attribute levels.



10
11
12
# File 'lib/voicemeeter/strip.rb', line 10

def levels
  @levels
end

Class Method Details

.make(remote, i) ⇒ Object



16
17
18
# File 'lib/voicemeeter/strip.rb', line 16

def self.make(remote, i)
  (i < remote.kind.phys_in) ? PhysicalStrip.new(remote, i) : VirtualStrip.new(remote, i)
end

Instance Method Details

#identifierObject



27
28
29
# File 'lib/voicemeeter/strip.rb', line 27

def identifier
  "strip[#{@index}]"
end