fix slooo

This commit is contained in:
🪞👃🪞 2024-07-02 16:59:58 +03:00
parent 2f96897d39
commit e30dd94d23
3 changed files with 29 additions and 13 deletions

View file

@ -25,11 +25,11 @@ impl Phrase {
frame0: usize,
frames: usize,
) {
let ticks = timebase.frames_to_ticks(
frame0 as f64,
(frame0 + frames) as f64,
timebase.pulses_frames(self.length as f64)
);
let start = frame0 as f64;
let end = start + frames as f64;
let repeat = timebase.pulses_frames(self.length as f64);
let ticks = timebase.frames_to_ticks(start, end, repeat);
//panic!("{start} {end} {repeat} {ticks:?}");
for (time, tick) in ticks.iter() {
let events = self.notes.get(&(*tick as usize));
if events.is_none() {