Class: Chaussettes::Effect::Gain

Inherits:
Object
  • Object
show all
Defined in:
lib/chaussettes/effect/gain.rb

Overview

Represents a gain effect

Constant Summary collapse

TYPE_MAP =
{
  :e => 'e', 'e' => 'e', :equalize => 'e',
  :B => 'B', 'B' => 'B', :balance => 'B',
  :b => 'b', 'b' => 'b', :balance_protect => 'b',
  :r => 'r', 'r' => 'r', :reclaim_headroom => 'r',
  :n => 'n', 'n' => 'n', :normalize => 'n',
  :l => 'l', 'l' => 'l', :limiter => 'l',
  :h => 'h', 'h' => 'h', :headroom => 'h'
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(db, *opts) ⇒ Gain

Returns a new instance of Gain.



18
19
20
21
22
23
# File 'lib/chaussettes/effect/gain.rb', line 18

def initialize(db, *opts)
  @commands = [ 'gain' ]
  @commands.concat(opts.map { |opt| TYPE_MAP.fetch(opt) })
  @commands << db
  @commands.freeze
end

Instance Attribute Details

#commandsObject (readonly)

Returns the value of attribute commands.



16
17
18
# File 'lib/chaussettes/effect/gain.rb', line 16

def commands
  @commands
end