Class: Tone::Effect::Phaser

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(frequency: 0.5, octaves: 3, base_frequency: 350) ⇒ Phaser

Returns a new instance of Phaser.



126
127
128
129
130
131
# File 'lib/tone/effect.rb', line 126

def initialize(frequency: 0.5, octaves: 3, base_frequency: 350)
  @frequency = frequency
  @octaves = octaves
  @base_frequency = base_frequency
  super `new Tone.Phaser(frequency, octaves, base_frequency)`
end

Instance Attribute Details

#base_frequencyObject (readonly)

Returns the value of attribute base_frequency.



124
125
126
# File 'lib/tone/effect.rb', line 124

def base_frequency
  @base_frequency
end

#frequencyObject (readonly)

Returns the value of attribute frequency.



124
125
126
# File 'lib/tone/effect.rb', line 124

def frequency
  @frequency
end

#octavesObject (readonly)

Returns the value of attribute octaves.



124
125
126
# File 'lib/tone/effect.rb', line 124

def octaves
  @octaves
end

Instance Method Details

#==(other) ⇒ Object



133
134
135
136
137
138
# File 'lib/tone/effect.rb', line 133

def ==(other)
  super &&
    frequency == other.frequency &&
      octaves == other.octaves &&
        base_frequency == other.base_frequency
end