fix cyclist clock cycle

This commit is contained in:
Jade (Rose) Rowland 2024-05-08 00:05:05 -04:00
parent 7df663e87d
commit 16472b59dd
3 changed files with 92 additions and 81 deletions

View file

@ -4,7 +4,6 @@ Copyright (C) 2022 Strudel contributors - see <https://github.com/tidalcycles/st
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import Fraction from 'fraction.js';
import { logger } from './logger.mjs';
export class NeoCyclist {
@ -87,15 +86,7 @@ export class NeoCyclist {
this.latency +
this.worker_time_dif;
const duration = hap.duration / this.cps;
onTrigger?.(
hap,
0,
duration,
this.cps,
targetTime,
this.cycle,
// + Fraction(this.latency).div(this.cps)
);
onTrigger?.(hap, 0, duration, this.cps, targetTime, this.cycle);
}
});
};