're-triggering filter-out' re-enabled.
This commit is contained in:
parent
b219e19eb4
commit
632be4da1f
1 changed files with 8 additions and 8 deletions
|
|
@ -171,17 +171,17 @@ void receiveEvent(int numBytes) {
|
||||||
amp2.gain(amp_gain);
|
amp2.gain(amp_gain);
|
||||||
//
|
//
|
||||||
int gate = str_gate.toInt();
|
int gate = str_gate.toInt();
|
||||||
if (gate == 0) {
|
if (gate == 1) { //on 'start'
|
||||||
// filter out re-triggering same note while it is playing. <== ???? WORKS????
|
// filter out re-triggering same note while it is playing.
|
||||||
// if (!playSdWav1.isPlaying() || sample_now != key) { <== ???? WORKS????
|
if (!playSdWav1.isPlaying() || sample_now != key) {
|
||||||
|
sample_now = key;
|
||||||
|
sample_player_start_task.restart();
|
||||||
|
Serial.println("sample_player_start_task");
|
||||||
|
}
|
||||||
|
} else if (gate == 0) { //on 'stop'
|
||||||
sample_now = key;
|
sample_now = key;
|
||||||
sample_player_stop_task.restart();
|
sample_player_stop_task.restart();
|
||||||
Serial.println("sample_player_stop_task");
|
Serial.println("sample_player_stop_task");
|
||||||
// }
|
|
||||||
} else {
|
|
||||||
sample_now = key;
|
|
||||||
sample_player_start_task.restart();
|
|
||||||
Serial.println("sample_player_start_task");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue