Hello,
I am trying to capture a kick button both states “press” and “release”, but I only get the “release” state. How I can get both? I want make an action while the button is pressed, and stop it when it is released (ONLY start it when it is pressed).
Inside my processor>process method:
…etc…
if (pid == getTriggerParamID(osc)) {
std::string msg = "[DEBUG] Trigger Osc " + std::to_string(osc)
+ " - Valor: " + std::to_string(value)
+ " (" + (value > 0.5f ? "ON" : "OFF") + ")";
debugOutput(msg);
if (value > 0.5f) {
DiscoFXs[osc].setTrigger(true);
debugOutput("Trigger activated");
}
else {
debugOutput("Trigger de-activated");
}
}
…etc.
When I press and release the button, only the release is captured, it prints:
[DEBUG] Trigger Osc 0 - Valor: 0.000000 (OFF)
Trigger de-activated