File tree 1 file changed +5
-0
lines changed
source/funkin/ui/debug/charting
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -6322,6 +6322,9 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
6322
6322
6323
6323
public function postLoadInstrumental (): Void
6324
6324
{
6325
+ var playbackRate = ((menubarItemPlaybackSpeed .value ?? 1.0 ) * 2.0 ) / 100.0 ;
6326
+ playbackRate = Math .floor (playbackRate / 0.05 ) * 0.05 ; // Round to nearest 5%
6327
+ playbackRate = Math .max (0.05 , Math .min (2.0 , playbackRate )); // Clamp to 5% to 200%
6325
6328
if (audioInstTrack != null )
6326
6329
{
6327
6330
// Prevent the time from skipping back to 0 when the song ends.
@@ -6334,6 +6337,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
6334
6337
}
6335
6338
audioVocalTrackGroup .pause ();
6336
6339
};
6340
+ audioInstTrack .pitch = playbackRate ;
6341
+ audioVocalTrackGroup .pitch = playbackRate ;
6337
6342
}
6338
6343
else
6339
6344
{
You can’t perform that action at this time.
0 commit comments