Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ddf.minim.effects
Class NotchFilter

    java.lang.Object
      ddf.minim.effects.IIRFilter
          ddf.minim.effects.NotchFilter

All Implemented Interfaces:
  AudioEffect

    public class NotchFilter

extends IIRFilter

A notch filter removes a narrow band of frequencies from an audio signal. It is the opposite of a band pass filter, which allows only a narrow band of frequencies to pass through the filter.

Author:
  Damien Di Fede

Field Summary

Fields inherited from class ddf.minim.effects.IIRFilter
`a, b`

Constructor Summary
`NotchFilter(float freq, float bandWidth, float sampleRate)` Constructs a notch filter with the requested center frequency, bandwidth and sample rate.

Method Summary
`protected void` | `calcCoeff()` Calculates the coefficients of the filter using the current cutoff frequency.
`float` | `getBandWidth()` Returns the band width of this filter.
`void` | `setBandWidth(float b)` Sets the band width of the filter.

Methods inherited from class ddf.minim.effects.IIRFilter
`frequency, printCoeff, process, process, sampleRate, setFreq, validFreq`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NotchFilter

    public NotchFilter(float freq,
                       float bandWidth,
                       float sampleRate)

  Constructs a notch filter with the requested center frequency, bandwidth and sample rate.

  Parameters:
    `freq` - the center frequency of the band to remove (in Hz)
    `bandWidth` - the width of the band to remove (in Hz)
    `sampleRate` - the sample rate of audio that will be filtered by this filter

Method Detail

### setBandWidth

    public void setBandWidth(float b)

  Sets the band width of the filter.

  Parameters:
    `b` - the band width (in Hz)

### getBandWidth

    public float getBandWidth()

  Returns the band width of this filter.

  Returns:
    the band width (in Hz)

### calcCoeff

    protected void calcCoeff()

  Description copied from class: `IIRFilter`
  Calculates the coefficients of the filter using the current cutoff frequency. To make your own IIRFilters, you must extend IIRFilter and implement this function. The frequency is expressed as a fraction of the sample rate. When filling the coefficient arrays, be aware that `b[0]` corresponds to the coefficient `b1`.

  Specified by:
    `calcCoeff` in class `IIRFilter`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD