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.
Files changed (2) hide show
  1. package/dist/index.js +9 -1
  2. 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
- return { shouldStop: true, cycleCompleted: true };
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elektron-lfo",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Elektron LFO engine simulator implementation with CLI visualization",
5
5
  "main": "dist/index.js",
6
6
  "module": "src/index.ts",