|
|
|
@ -292,11 +292,12 @@ void handle_ui(void) |
|
|
|
|
switch (ui_main_state) |
|
|
|
|
{ |
|
|
|
|
case UI_MAIN_FILTER_FRQ: |
|
|
|
|
/* if (enc[i].read() <= 0)
|
|
|
|
|
if (enc[i].read() <= 0) |
|
|
|
|
enc[i].write(0); |
|
|
|
|
else if (enc[i].read() > ENC_FILTER_FRQ_STEPS) |
|
|
|
|
enc[i].write(ENC_FILTER_FRQ_STEPS); |
|
|
|
|
effect_filter_frq = enc[i].read(); |
|
|
|
|
/*
|
|
|
|
|
if (effect_filter_frq == ENC_FILTER_FRQ_STEPS) |
|
|
|
|
{ |
|
|
|
|
// turn "off" filter
|
|
|
|
@ -317,11 +318,12 @@ void handle_ui(void) |
|
|
|
|
*/ |
|
|
|
|
break; |
|
|
|
|
case UI_MAIN_FILTER_RES: |
|
|
|
|
/* if (enc[i].read() <= 0)
|
|
|
|
|
if (enc[i].read() <= 0) |
|
|
|
|
enc[i].write(0); |
|
|
|
|
else if (enc[i].read() > ENC_FILTER_RES_STEPS) |
|
|
|
|
enc[i].write(ENC_FILTER_RES_STEPS); |
|
|
|
|
effect_filter_resonance = enc[i].read(); |
|
|
|
|
/*
|
|
|
|
|
//filter1.resonance(mapfloat(effect_filter_resonance, 0, ENC_FILTER_RES_STEPS, 0.7, 5.0));
|
|
|
|
|
filter1.resonance(EXP_FUNC(mapfloat(effect_filter_resonance, 0, ENC_FILTER_RES_STEPS, 0.7, 5.0)) * 0.044 + 0.61); |
|
|
|
|
|
|
|
|
@ -332,11 +334,12 @@ void handle_ui(void) |
|
|
|
|
*/ |
|
|
|
|
break; |
|
|
|
|
case UI_MAIN_FILTER_OCT: |
|
|
|
|
/* if (enc[i].read() <= 0)
|
|
|
|
|
if (enc[i].read() <= 0) |
|
|
|
|
enc[i].write(0); |
|
|
|
|
else if (enc[i].read() > ENC_FILTER_OCT_STEPS) |
|
|
|
|
enc[i].write(ENC_FILTER_OCT_STEPS); |
|
|
|
|
effect_filter_octave = enc[i].read(); |
|
|
|
|
/*
|
|
|
|
|
filter1.octaveControl(mapfloat(effect_filter_octave, 0, ENC_FILTER_OCT_STEPS, 0.0, 7.0)); |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("Setting filter octave control to: ")); |
|
|
|
|