From d126c28b852dc94dc66114d80ef6586e3fe54ed9 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Wed, 28 Jun 2023 22:25:49 +0200 Subject: [PATCH] fix: loopAt with cps 1 for fallback --- packages/core/pattern.mjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/core/pattern.mjs b/packages/core/pattern.mjs index 1d737df4..6396d97b 100644 --- a/packages/core/pattern.mjs +++ b/packages/core/pattern.mjs @@ -2321,6 +2321,13 @@ export const splice = register( false, // turns off auto-patternification ); +// this function will be redefined in repl.mjs to use the correct cps value. +// It is still here to work in cases where repl.mjs is not used + +export const { loopAt, loopat } = register(['loopAt', 'loopat'], function (factor, pat) { + return _loopAt(factor, pat, 1); +}); + /** * Makes the sample fit the given number of cycles and cps value, by * changing the speed. Please note that at some point cps will be