From abee609e43ca12df72268c8142fca79048cf5879 Mon Sep 17 00:00:00 2001 From: Vixalie Date: Tue, 11 Mar 2025 22:37:37 +0800 Subject: [PATCH] fix empty pattern duration calculation. --- src/context/Patterns.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/context/Patterns.tsx b/src/context/Patterns.tsx index 5248654..56f47be 100644 --- a/src/context/Patterns.tsx +++ b/src/context/Patterns.tsx @@ -117,7 +117,7 @@ export function totalDuration(pattern: Pattern): number { return reduce( pattern.pulses, (former, pulse) => former + pulse.offset, - pattern.smoothRepeat ? 100 : 0, + pattern.smoothRepeat && pattern.pulses.length > 1 ? 100 : 0, ); }