Hello!
I’m wondering if it’s possible to repurpose the Daisy Patch’s CV inputs (CTRL1-4) as Gates? I tried going the algorithmic way by implementing a trigger function like the one from GateIn class, but I get an extra trigger every time. I’m also unsure if the ramping up voltages of the gate signals will be an issue regarding time.
Here’s the Trig function which is executed inside the AudioCallback:
bool Trig()
{
float mapped = floorf(sonovolt::math::map(control_->Value(), 0.0f, 1.0f, 0.0f, 8.0f));
float diff = abs(mapped - prev_value_);
prev_state_ = state_;
state_ = diff > 1.f;
bool flipped = state_ && !prev_state_;
if(flipped)
{
prev_value_ = mapped;
}
return flipped;
}
Cheers!