From b9eeebdbeafa01b561902409ea4bef8a40441a75 Mon Sep 17 00:00:00 2001 From: Keoiki <55053690+Keoiki@users.noreply.github.com> Date: Sun, 4 May 2025 00:41:15 +0300 Subject: [PATCH] Fix metronome measure beeps. --- source/funkin/ui/debug/charting/ChartEditorState.hx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 61e84cc05..207247581 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -3526,7 +3526,10 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState if (metronomeVolume > 0.0 && this.subState == null && (audioInstTrack != null && audioInstTrack.isPlaying)) { - playMetronomeTick(Conductor.instance.currentBeat % Conductor.instance.beatsPerMeasure == 0); + var currentMeasureTime:Float = Conductor.instance.getMeasureTimeInMs(Conductor.instance.currentMeasure); + var currentStepTime:Float = Conductor.instance.getStepTimeInMs(Conductor.instance.currentStep); + final msTreshold:Float = 10.0; + playMetronomeTick(currentMeasureTime >= currentStepTime - msTreshold && currentMeasureTime <= currentStepTime + msTreshold); } // Show the mouse cursor.