Skip to content

Latest commit

 

History

History
 
 

pipeline_equalizer

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Playback Example of WAV File Processed by Equalizer

This example is playing back a WAV file processed by an equalizer.

Compatibility

This example is will run on boards marked with green checkbox. Please remember to select the board in menuconfig as discussed is section Usage below.

Board Name Getting Started Chip Compatible
ESP32-LyraT alt text ESP32 alt text
ESP32-LyraTD-MSC alt text ESP32 alt text
ESP32-LyraT-Mini alt text ESP32 alt text
ESP32-Korvo-DU1906 alt text ESP32 alt text
ESP32-S2-Kaluga-1 Kit alt text ESP32-S2 alt text

Usage

Prepare the audio board:

  • Connect speakers or headphones to the board.
  • Insert a microSD card loaded with a WAV file 'test.wav' into board's card slot.

Configure the example:

  • Select compatible audio board in menuconfig > Audio HAL.

Load and run the example.

Additional Information

To change the parameters of the equalizer, edit set_gain[] table in filr equalizer_example.c. The center frequencies of equalizer are 31 Hz, 62 Hz, 125 Hz, 250 Hz, 500 Hz, 1 kHz, 2 kHz, 4 kHz, 8 kHz and 16 kHz.

To run the example of playback, the following conditions should be met:

  • The audio file should be in format supported by the equalizer:

    • Sampling rate of 11025 Hz, 22050 Hz, 44100 Hz or 48000 Hz.
    • Number of channels: 1 or 2.
  • Audio file format for this example is WAV.

Contents of 'document' folder:

  • The 'test.wav' file is the example file with sample rate of 44100 Hz and a single audio channel.
  • The 'spectrum_before.png' is the spectrum image of the original 'test.wav' file.
spectrum_before
- The 'spectrum_after.png' is the spectrum image of the 'test.wav' file after processing by the equalizer, when the gain of equalizer is -13 dB.
spectrum_after
- The 'amplitude_frequency.png' is the equalizer's frequency response diagram, when the gain of equalizer is 0 dB.
amplitude_frequency