|  |  |  | GStreamer Good Plugins 0.10 Plugins Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
GObject +----GstObject +----GstElement +----GstBaseTransform +----GstAudioFilter +----GstIirEqualizer +----GstIirEqualizerNBands
The n-band equalizer element is a fully parametric equalizer. It allows to select between 1 and 64 bands and has properties on each band to change the center frequency, band width and gain.
gst-launch filesrc location=song.ogg ! oggdemux ! vorbisdec ! audioconvert ! equalizer-nbands num-bands=15 band5::gain=6.0 ! alsasink
#include <gst/gst.h>
...
typedef struct {
  gfloat freq;
  gfloat width;
  gfloat gain;
} GstEqualizerBandState;
...
  GstElement *equalizer;
  GstObject *band;
  gint i;
  GstEqualizerBandState state[] = {
    { 120.0,   50.0, - 3.0},
    { 500.0,   20.0,  12.0},
    {1503.0,    2.0, -20.0},
    {6000.0, 1000.0,   6.0},
    {3000.0,  120.0,   2.0}
  };
...
  equalizer = gst_element_factory_make ("equalizer-nbands", "equalizer");
  g_object_set (G_OBJECT (equalizer), "num-bands", 5, NULL);
...
  for (i = 0; i < 5; i++) {
    band = gst_child_proxy_get_child_by_index (GST_CHILD_PROXY (equalizer), i);
    g_object_set (G_OBJECT (band), "freq", state[i].freq,
        "bandwidth", state[i].width,
	"gain", state[i].gain);
    g_object_unref (G_OBJECT (band));
  }
...
| plugin | equalizer | 
| author | Benjamin Otte <otte@gnome.org>, Stefan Kost <ensonic@users.sf.net> | 
| class | Filter/Effect/Audio | 
| name | sink | 
| direction | sink | 
| presence | always | 
| details | audio/x-raw-int, depth=(int)16, width=(int)16, endianness=(int)1234, signed=(boolean)true, rate=(int)[ 1000, 2147483647 ], channels=(int)[ 1, 2147483647 ] | 
| audio/x-raw-float, width=(int){ 32, 64 }, endianness=(int)1234, rate=(int)[ 1000, 2147483647 ], channels=(int)[ 1, 2147483647 ] | 
| name | src | 
| direction | source | 
| presence | always | 
| details | audio/x-raw-int, depth=(int)16, width=(int)16, endianness=(int)1234, signed=(boolean)true, rate=(int)[ 1000, 2147483647 ], channels=(int)[ 1, 2147483647 ] | 
| audio/x-raw-float, width=(int){ 32, 64 }, endianness=(int)1234, rate=(int)[ 1000, 2147483647 ], channels=(int)[ 1, 2147483647 ] | 
"num-bands" property"num-bands" guint : Read / Write / Construct
number of different bands to use.
Allowed values: [1,64]
Default value: 10