Class: SynthBlocks::Fx::Damper
- Inherits:
-
Object
- Object
- SynthBlocks::Fx::Damper
- Defined in:
- lib/synth_blocks/fx/g_verb.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(damping) ⇒ Damper
constructor
A new instance of Damper.
- #run(x) ⇒ Object
Constructor Details
#initialize(damping) ⇒ Damper
48 49 50 51 |
# File 'lib/synth_blocks/fx/g_verb.rb', line 48 def initialize(damping) @damping = damping @delay = 0.0 end |
Instance Method Details
#run(x) ⇒ Object
53 54 55 56 57 |
# File 'lib/synth_blocks/fx/g_verb.rb', line 53 def run(x) y = x * (1.0-@damping) + @delay * @damping; @delay = y y end |