Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
116d66b59This file is pinned to the selected release. Download the original to open it in your design tool.
// Custom.cpp
#include "Custom.h"
#include <cmath>
void Custom::init ()
{
filter.set_sample_freq (erb_SAMPLE_RATE);
filter.set_type_low_pass ();
filter.set_resonance (1.f);
ui.antenna.blink ();
}
void Custom::process ()
{
float freq_hz = 20.f * std::pow (1000.f, ui.freq);
filter.set_freq (freq_hz);
filter.update ();
for (size_t i = 0 ; i < erb_BUFFER_SIZE ; ++i)
{
ui.audio_out [i] = filter.process (ui.audio_in [i]);
}
}