Class: Tone::Effect::Vibrato

Inherits:
Base
  • Object
show all
Defined in:
lib/tone/effect.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(frequency: 5, depth: 0.1) ⇒ Vibrato

Returns a new instance of Vibrato.



36
37
38
39
40
# File 'lib/tone/effect.rb', line 36

def initialize(frequency: 5, depth: 0.1)
  @frequency = frequency
  @depth = depth
  super `new Tone.Vibrato(frequency, depth)`
end

Instance Attribute Details

#depthObject (readonly)

Returns the value of attribute depth.



34
35
36
# File 'lib/tone/effect.rb', line 34

def depth
  @depth
end

#frequencyObject (readonly)

Returns the value of attribute frequency.



34
35
36
# File 'lib/tone/effect.rb', line 34

def frequency
  @frequency
end

Instance Method Details

#==(other) ⇒ Object



42
43
44
45
46
# File 'lib/tone/effect.rb', line 42

def ==(other)
  super &&
    frequency == other.frequency &&
      depth == other.depth
end