Back again with some trouble!
I’m trying to build a tremolo pedal based on the tremolo effect from DaisySP controling rate and depth with two potentiometers. I got to do it thanks to this post but I don’t seem to have the frequency parameter between the desired range which is from 0.1 Hz to 20 Hz
This is my tremolo.cpp:
using namespace daisysp;
void Tremolo::Init(float sample_rate)
sample_rate_ = sample_rate;
float Tremolo::Process(float in)
float modsig = dc_os_ + osc_.Process();
return in * modsig;
void Tremolo::SetFreq(float freq)
// THIS IS WHERE I TRY TO SET THE FREQ RANGE
freq = fclamp(freq, 0.1f, 20.f);
freq *= .5f;
void Tremolo::SetWaveform(int waveform)
void Tremolo::SetDepth(float depth)
depth = fclamp(depth, 0.f, 1.f);
depth *= .5f;
dc_os_ = 1.f - depth;
As you can see I basically tried to clamp the values as it’s done with the depth parameter by default but I never get as “fast” as 20Hz.
Any suggestions for make this work properly please?
I’m also thinking about using the parameter class to manage the knobs well and the logger class to read the knob values on screen, but haven’t got that far yet.
Thanks in advance for any help!