From 8e8e7f1bc21a02a2c11b0f8bf1fa95e3fe855139 Mon Sep 17 00:00:00 2001 From: Lasercar Date: Sun, 23 Feb 2025 13:53:51 +1000 Subject: [PATCH] Set playspeed after variation load --- source/funkin/ui/debug/charting/ChartEditorState.hx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 44c14be06e..f4021fb962 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -6322,6 +6322,9 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState public function postLoadInstrumental():Void { + var playbackRate = ((menubarItemPlaybackSpeed.value ?? 1.0) * 2.0) / 100.0; + playbackRate = Math.floor(playbackRate / 0.05) * 0.05; // Round to nearest 5% + playbackRate = Math.max(0.05, Math.min(2.0, playbackRate)); // Clamp to 5% to 200% if (audioInstTrack != null) { // Prevent the time from skipping back to 0 when the song ends. @@ -6334,6 +6337,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState } audioVocalTrackGroup.pause(); }; + audioInstTrack.pitch = playbackRate; + audioVocalTrackGroup.pitch = playbackRate; } else {