class Chaussettes::EffectChain
A chain of effects to apply
Attributes
commands[R]
Public Class Methods
new()
click to toggle source
# File lib/chaussettes/effect_chain.rb, line 12 def initialize @commands = [] end
Public Instance Methods
fade(in_len, stop_at = nil, out_len = nil, type: nil)
click to toggle source
# File lib/chaussettes/effect_chain.rb, line 16 def fade(in_len, stop_at = nil, out_len = nil, type: nil) effect = Effect::Fade.new(in_len, stop_at, out_len, type: type) @commands.concat(effect.commands) self end
gain(db, *opts)
click to toggle source
# File lib/chaussettes/effect_chain.rb, line 22 def gain(db, *opts) effect = Effect::Gain.new(db, *opts) @commands.concat(effect.commands) self end
newfile()
click to toggle source
# File lib/chaussettes/effect_chain.rb, line 28 def newfile @commands << 'newfile' self end
pad(length, position = nil)
click to toggle source
# File lib/chaussettes/effect_chain.rb, line 33 def pad(length, position = nil) length = "#{length}@#{position}" if position @commands << 'pad' << length self end
restart()
click to toggle source
# File lib/chaussettes/effect_chain.rb, line 39 def restart @commands << 'restart' self end
synth(length = nil, type = nil, &block)
click to toggle source
# File lib/chaussettes/effect_chain.rb, line 44 def synth(length = nil, type = nil, &block) effect = Effect::Synth.new(length, type, &block) @commands.concat(effect.commands) self end
trim(*positions)
click to toggle source
# File lib/chaussettes/effect_chain.rb, line 50 def trim(*positions) if positions.empty? raise ArgumentError, 'you must specify at least one position for trim' end @commands << 'trim' @commands.concat(positions) self end
vol(gain, type: nil, limitergain: nil)
click to toggle source
# File lib/chaussettes/effect_chain.rb, line 60 def vol(gain, type: nil, limitergain: nil) effect = Effect::Vol.new(gain, type: type, limitergain: limitergain) @commands.concat(effect.commands) self end