Skip to content

Native Android client for Spotify, built with Jetpack Compose

AutoMix lab: half/double-time blends kept to 8 bars

kota-zo7b35e6e6d8fe
diff --git a/base/automix/src/main/kotlin/app/myspoti/automix/MixPlanner.kt b/base/automix/src/main/kotlin/app/myspoti/automix/MixPlanner.kt
index ab6fc28e..6f389615 100644
--- a/base/automix/src/main/kotlin/app/myspoti/automix/MixPlanner.kt
+++ b/base/automix/src/main/kotlin/app/myspoti/automix/MixPlanner.kt
@@ -134,6 +134,9 @@ object MixPlanner {
if (bars > max(2, s.maxBars)) continue
// A large stretch is heard on B for the second half and its way back: kept to 16 bars.
if (abs(m.speed - 1) > WIDE_STRETCH && bars > 16) continue
+ // Half or double time (71 against 130 BPM): two grooves that meet every other beat only,
+ // a mess over a long mix (reported on the phone: 40 s of it).
+ if (m.beatsPerB != 1.0 && bars > 8) continue
val len = bars * barA
if (len > s.maxSec + 0.01 && bars > 2) continue
val spanB = len * m.speed