From bcb21883c541a04b1df459ebbb7f4fdd954fa03d Mon Sep 17 00:00:00 2001 From: Hasinjato Date: Tue, 11 Aug 2026 11:18:44 +0300 Subject: [PATCH] Keep tempo on seekto grid 0 --- .../kotlin/mg/dot/feufaro/midi/MidiPlayer.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/composeApp/src/desktopMain/kotlin/mg/dot/feufaro/midi/MidiPlayer.kt b/composeApp/src/desktopMain/kotlin/mg/dot/feufaro/midi/MidiPlayer.kt index 71e3cd5..da18439 100644 --- a/composeApp/src/desktopMain/kotlin/mg/dot/feufaro/midi/MidiPlayer.kt +++ b/composeApp/src/desktopMain/kotlin/mg/dot/feufaro/midi/MidiPlayer.kt @@ -722,13 +722,7 @@ actual class FMediaPlayer actual constructor( val tick = (gridIndex.toDouble() * resolution).toLong() sequencer?.tickPosition = tick - val initialOrPreviousBpm = navigationSteps - .filter { it.newBpm != null && it.gridIndex <= gridIndex } - .maxByOrNull { it.gridIndex }?.newBpm ?: 120f - - targetBpm = initialOrPreviousBpm applyBpm() - sharedScreenModel.setBpmFlow(initialOrPreviousBpm) // Voir les velocity avant val lastDynamic = navigationSteps .filter { it.dynamic != null && it.gridIndex <= gridIndex } @@ -747,9 +741,9 @@ actual class FMediaPlayer actual constructor( val currentTick = sequencer?.tickPosition ?: 0L if (currentTick == 0L) { resetNavigationFlags() - targetBpm = initialBpm + /*targetBpm = initialBpm forceTempo(initialBpm.toDouble()) - boundModel?.setBpmFlow(initialBpm) + boundModel?.setBpmFlow(initialBpm)*/ } val countInEnable = prefs.getBoolean("isCountIn", true) if (currentTick == 0L && countInEnable) {