Class: Voicemeeter::Strip

Inherits:
IRemote
  • Object
show all
Includes:
Channel_Meta_Functions, Mixin::Fades, Mixin::Outputs
Defined in:
lib/voicemeeter/strip.rb

Direct Known Subclasses

PhysicalStrip, VirtualStrip

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Mixin::Fades

#fadeby, #fadeto

Methods included from Conversions

Boolean

Methods inherited from IRemote

#getter, #set_multi, #setter, #to_s

Constructor Details

#initialize(remote, i) ⇒ Strip

Returns a new instance of Strip.



25
26
27
28
29
30
31
32
33
34
# File 'lib/voicemeeter/strip.rb', line 25

def initialize(remote, i)
  super
  self.make_accessor_bool :solo, :mute, :mono
  self.make_accessor_float :gain
  self.make_accessor_int :limit
  self.make_accessor_string :label

  @gainlayer = (0...8).map { |j| GainLayer.new(remote, i, j) }
  @levels = StripLevels.new(remote, i)
end

Instance Attribute Details

#deviceObject

Returns the value of attribute device.



13
14
15
# File 'lib/voicemeeter/strip.rb', line 13

def device
  @device
end

#gainlayerObject

Returns the value of attribute gainlayer.



13
14
15
# File 'lib/voicemeeter/strip.rb', line 13

def gainlayer
  @gainlayer
end

#levelsObject

Returns the value of attribute levels.



13
14
15
# File 'lib/voicemeeter/strip.rb', line 13

def levels
  @levels
end

Class Method Details

.make(remote, layout_strip) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/voicemeeter/strip.rb', line 15

def self.make(remote, layout_strip)
  "
  Factory function for Strip classes.
  "
  p_in, v_in = layout_strip.values
  (0...(p_in + v_in)).map do |i|
    i < p_in ? PhysicalStrip.new(remote, i) : VirtualStrip.new(remote, i)
  end
end

Instance Method Details

#identifierObject



36
37
38
# File 'lib/voicemeeter/strip.rb', line 36

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