launch pt.10: almost works!

This commit is contained in:
🪞👃🪞 2024-11-02 01:29:28 +02:00
parent 3ee9a670da
commit 924b68fccf

View file

@ -59,7 +59,9 @@ impl PhrasePlayer {
if let Some((started, phrase)) = &self.phrase { if let Some((started, phrase)) = &self.phrase {
// First sample to populate. Greater than 0 means that the first // First sample to populate. Greater than 0 means that the first
// pulse of the phrase falls somewhere in the middle of the chunk. // 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) // 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 // 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. // sample of the output buffer that corresponds to a MIDI pulse.