Class: Synthesizer::Filter::Parallel::Fx
- Inherits:
-
Object
- Object
- Synthesizer::Filter::Parallel::Fx
- Defined in:
- lib/synthesizer/filter/parallel.rb
Instance Method Summary collapse
-
#initialize(fxs) ⇒ Fx
constructor
A new instance of Fx.
- #process(input) ⇒ Object
Constructor Details
#initialize(fxs) ⇒ Fx
Returns a new instance of Fx.
20 21 22 |
# File 'lib/synthesizer/filter/parallel.rb', line 20 def initialize(fxs) @fxs = fxs end |
Instance Method Details
#process(input) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/synthesizer/filter/parallel.rb', line 24 def process(input) outputs = @fxs.map {|fx| fx.process(input) } AudioStream::Buffer.merge(outputs, average: true) end |