expr pedal threshold

This commit is contained in:
Michael Sippel 2025-01-12 05:07:05 +01:00
parent c75d61123a
commit bcead0e0b5
Signed by: senvas
GPG key ID: 060F22F65102F95C

View file

@ -88,9 +88,12 @@ static void on_process(void *userdata, struct spa_io_position *position)
case 0x0b:
// expr pedal
float val_f = ((float)midi_data[2]) / 128.0;
float thres = 0.4;
if ( val_f > thres ) {
printf("Expr Pedal %f\n", val_f);
if ( val_f > 0.1 ) {
data->delay.mix = val_f;
data->delay.mix = (val_f - thres) / (1.0-thres);
} else {
data->delay.mix = 0.0;
}