Skip to content

Commit

Permalink
don't reset after learning
Browse files Browse the repository at this point in the history
  • Loading branch information
magnetophon committed Oct 24, 2024
1 parent bcd133b commit 209fc01
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,6 @@ impl Del2 {
self.learned_notes
.store(self.learning_index.load(Ordering::SeqCst), note);
self.last_played_notes.note_off(note);
self.counting_state = CountingState::TimeOut;
self.timing_last_event = 0;
self.samples_since_last_event = 0;
}

// Check for timeout condition and reset if necessary
Expand All @@ -679,7 +676,7 @@ impl Del2 {
self.timing_last_event = 0;
self.samples_since_last_event = 0;
} else if should_record_tap
&& !matches!(self.counting_state, CountingState::TimeOut)
&& self.counting_state != CountingState::TimeOut
&& self.samples_since_last_event > 0
&& velocity > 0.0
{
Expand Down

0 comments on commit 209fc01

Please sign in to comment.