From 5b49fabc6f7dde7b2e9a60ef58a3503610f1ca2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lumi=C3=A8re=20=C3=89lev=C3=A9?= <88174309+PoneyClairDeLune@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:22:55 +0000 Subject: [PATCH] Bug fixed for peak hold type 3 in Octavia SC. --- src/disp/disp_sc.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/disp/disp_sc.mjs b/src/disp/disp_sc.mjs index 7245d06..53a5ca6 100644 --- a/src/disp/disp_sc.mjs +++ b/src/disp/disp_sc.mjs @@ -356,7 +356,9 @@ let ScDisplay = class extends RootDisplay { // Strength calculation sum.velo.forEach(function (e, i) { upThis.#lingerOld[i] = upThis.#linger[i] >> 8; - upThis.#noteOn[i] --; + if (upThis.#noteOn[i]) { + upThis.#noteOn[i] --; + }; if (((e >> 4) << 4) > upThis.#linger[i] >> 8) { if (scConf.peakHold == 3) { upThis.#linger[i] = ((e >> 4) << 4) << 8;