Skip to content
Back to top

# Graphic EQ Stages

Graphic EQ Stages allow frequency response adjustments at fixed center frequencies.

## GraphicEq10b

class audio_dsp.stages.GraphicEq10b(**kwargs)

  A 10 band graphic equaliser, with octave spaced center frequencies. The center frequencies are: [32, 64, 125, 250, 500, 1000, 2000, 4000, 8000, 16000]. The gain of each band can be adjusted between -12 and + 12 dB.

  Note that for a 32 kHz sample rate, the 16 kHz band is not available, making a 9 band EQ. For a 16 kHz sample rate the 8k and 16 kHz bands are not available, making an 8 band EQ.

  Attributes:
    dsp_block `audio_dsp.dsp.graphic_eq.graphic_eq_10_band`

      The DSP block class; see 10 Band Graphic Equaliser for implementation details

  set_gains(gains_db)

    Set the gains of the graphic eq in dB.

    Parameters:
      gains_db list[float]

        A list of the 10 gains of the graphic eq in dB.

  set_parameters(
    parameters: GraphicEq10bParameters,
  )

    Set the parameters of the graphic eq.

    Parameters:
      parameters GraphicEq10bParameters

        The parameters of the graphic eq.

pydantic model audio_dsp.models.graphic_eq.GraphicEq10bParameters

  Parameters for a 10-band graphic equalizer.

  Attributes:
    gains_db: (list[float])

      Gain values (in dB) for each of the 10 frequency bands. - Each value must be between -24 dB and +24 dB. - The list must have exactly 10 elements.

  field gains_db: Annotated[list[Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Gain of the band in dB.', metadata=[Ge(ge=-24), Le(le=24)])]], Len(min_length=10, max_length=None)] [Optional]
    Constraints:

      - min_length = 10

### GraphicEq10b Control

The following runtime command ids are available for the GraphicEq10b Stage. For details on reading and writing these commands, see the Run-Time Control User Guide.

Control parameter | Payload length
--- | ---
CMD_GRAPHIC_EQ_10B_GAINS | `sizeof(int32_t)*[10]`
The graphic EQ gains in Q31 format. To convert a value in decibels to this format, the function `geq_db_to_gain()` in `control/helpers.h`. |