Class Filter<E extends FilterBiquadCommon>

java.lang.Object
processing.sound.Effect<E>
processing.sound.Filter<E>
Direct Known Subclasses:
BandPass, HighPass, LowPass

public abstract class Filter<E extends FilterBiquadCommon> extends Effect<E>
Common superclass for JSyn filters that have a 'frequency' and a 'Q' unitport
  • Constructor Summary

    Constructors
    Constructor
    Description
    Filter(PApplet parent)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    freq(float freq)
    Sets the cutoff frequency for the filter.
    void
    freq(Modulator modulator)
    Modulates the frequency of this filter using another generator, typically a (low frequency) oscillator.
    void
    process(SoundObject input, float freq)
     
    void
    process(SoundObject input, float freq, float q)
    Starts applying this filter to an input signal.
    void
    res(float q)
    Sets the resonance (or 'Q factor') of this filter.
    void
    res(Modulator modulator)
    Modulates the resonance of this filter using another generator, typically a (low frequency) oscillator.
    void
    set(float freq, float q)
    Sets frequency and bandwidth of the filter with one method.

    Methods inherited from class processing.sound.Effect

    isProcessing, process, stop

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Filter

      public Filter(PApplet parent)
  • Method Details

    • res

      public void res(float q)
      Sets the resonance (or 'Q factor') of this filter. Increasing Q increases the resonance of the filter at its cutoff frequency. Defaults to 1.
      Parameters:
      q - the desired Q factor, a value between 0.1 and 10
    • res

      public void res(Modulator modulator)
      Modulates the resonance of this filter using another generator, typically a (low frequency) oscillator. The effective resonance of the filter will be the sum of the static value passed to .res(float), and the dynamic value produced by the modulator (which fluctuates around 0).
      Parameters:
      modulator - an oscillator or noise object
    • freq

      public void freq(float freq)
      Sets the cutoff frequency for the filter.
      Parameters:
      freq - the cutoff frequency in Hertz
    • freq

      public void freq(Modulator modulator)
      Modulates the frequency of this filter using another generator, typically a (low frequency) oscillator. The effective cutoff frequency of the filter will be the sum of the static value passed to .freq(float), and the dynamic value produced by the modulator (which fluctuates around 0).
      Parameters:
      modulator - an oscillator or noise object
    • process

      public void process(SoundObject input, float freq)
    • process

      public void process(SoundObject input, float freq, float q)
      Starts applying this filter to an input signal.
      Parameters:
      input - the sound source to filter
      freq - the cutoff frequency in Hertz
      q - the resonance (or 'Q factor'), a value between 0.1 and 10
    • set

      public void set(float freq, float q)
      Sets frequency and bandwidth of the filter with one method.
      Parameters:
      freq - the cutoff frequency in Hertz
      q - the resonance (or 'Q factor'), a value between 0.1 and 10