Class: Tone::Effect::Chorus

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(frequency: 1.5, delay_time: 3.5, depth: 0.7) ⇒ Chorus

Returns a new instance of Chorus.



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

def initialize(frequency: 1.5, delay_time: 3.5, depth: 0.7)
  @frequency = frequency
  @delay_time = delay_time
  @depth = depth
  super `new Tone.Chorus(frequency, delay_time, depth)`
end

Instance Attribute Details

#delay_timeObject (readonly)

Returns the value of attribute delay_time.



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

def delay_time
  @delay_time
end

#depthObject (readonly)

Returns the value of attribute depth.



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

def depth
  @depth
end

#frequencyObject (readonly)

Returns the value of attribute frequency.



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

def frequency
  @frequency
end

Instance Method Details

#==(other) ⇒ Object



25
26
27
28
29
30
# File 'lib/tone/effect.rb', line 25

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