diff --git a/crates/tek_sequencer/src/sequencer_snd.rs b/crates/tek_sequencer/src/sequencer_snd.rs index dd6f381d..1f6b52ff 100644 --- a/crates/tek_sequencer/src/sequencer_snd.rs +++ b/crates/tek_sequencer/src/sequencer_snd.rs @@ -59,7 +59,9 @@ impl PhrasePlayer { if let Some((started, phrase)) = &self.phrase { // First sample to populate. Greater than 0 means that the first // pulse of the phrase falls somewhere in the middle of the chunk. - let sample = sample0.saturating_sub(started.sample.get() as usize); + let sample = sample0.saturating_sub( + started.sample.get() as usize + self.clock.started.read().unwrap().unwrap().0 + ); // Iterator that emits sample (index into output buffer at which to write MIDI event) // paired with pulse (index into phrase from which to take the MIDI event) for each // sample of the output buffer that corresponds to a MIDI pulse.