Feat: polyphony + iterator reset

This commit is contained in:
2026-02-02 00:33:46 +01:00
parent 8452033473
commit ccce0df79d
9 changed files with 132 additions and 145 deletions

View File

@@ -450,6 +450,10 @@ impl RunsCounter {
*count += 1;
current
}
fn clear_pattern(&mut self, bank: usize, pattern: usize) {
self.counts.retain(|&(b, p, _), _| b != bank || p != pattern);
}
}
pub(crate) struct TickInput {
@@ -716,6 +720,7 @@ impl SequencerState {
}
}
};
self.runs_counter.clear_pattern(pending.id.bank, pending.id.pattern);
self.audio_state.active_patterns.insert(
pending.id,
ActivePattern {