elektron-lfo 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -283,7 +283,15 @@ function checkModeStop(config, state, previousPhase, currentPhase) {
|
|
|
283
283
|
const isForward = config.speed >= 0;
|
|
284
284
|
if (config.mode === "ONE") {
|
|
285
285
|
if (state.cycleCount >= 1) {
|
|
286
|
-
|
|
286
|
+
if (isForward) {
|
|
287
|
+
if (startPhase === 0 || currentPhase >= startPhase) {
|
|
288
|
+
return { shouldStop: true, cycleCompleted: true };
|
|
289
|
+
}
|
|
290
|
+
} else {
|
|
291
|
+
if (startPhase === 0 || currentPhase <= startPhase) {
|
|
292
|
+
return { shouldStop: true, cycleCompleted: true };
|
|
293
|
+
}
|
|
294
|
+
}
|
|
287
295
|
}
|
|
288
296
|
} else if (config.mode === "HLF") {
|
|
289
297
|
const halfPhase = (startPhase + 0.5) % 1;
|