Skip to main content

Equalizer (10 bands)

The 10-band equalizer block allows changing the gain of 10 frequency bands. The bands are equally distributed between 30 Hz and 15 KHz.

Use the SetBand method to set a value for each band.

Block info

Name: Equalizer10Block.

Pin directionMedia typePins count
InputUncompressed audio1
OutputUncompressed audio1

The sample pipeline

Sample code

var pipeline = new MediaBlocksPipeline();

var filename = "test.mp3";
var fileSource = new UniversalSourceBlock(await UniversalSourceSettings.CreateAsync(new Uri(filename)));

var eq10 = new Equalizer10Block();
eq10.SetBand(0, -6.0f);
eq10.SetBand(1, -6.0f);
eq10.SetBand(2, -6.0f);
eq10.SetBand(3, -6.0f);
eq10.SetBand(4, -6.0f);
eq10.SetBand(5, -8.0f);
eq10.SetBand(6, -8.0f);
eq10.SetBand(7, -8.0f);
eq10.SetBand(8, -8.0f);
eq10.SetBand(9, -8.0f);

pipeline.Connect(fileSource.AudioOutput, eq10.Input);

var audioRenderer = new AudioRendererBlock();
pipeline.Connect(eq10.Output, audioRenderer.Input);

await pipeline.StartAsync();

Platforms

Windows, macOS, Linux, iOS, Android.