From 2363900c05c9e123a62dccecf24d2ae11dec1693 Mon Sep 17 00:00:00 2001 From: hhhzzzsss Date: Fri, 31 May 2024 19:27:48 -0500 Subject: [PATCH] Add out-of-range wrapping to nbs conversion --- .../hhhzzzsss/songplayer/conversion/NBSConverter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/github/hhhzzzsss/songplayer/conversion/NBSConverter.java b/src/main/java/com/github/hhhzzzsss/songplayer/conversion/NBSConverter.java index dad97c8..f81f2da 100644 --- a/src/main/java/com/github/hhhzzzsss/songplayer/conversion/NBSConverter.java +++ b/src/main/java/com/github/hhhzzzsss/songplayer/conversion/NBSConverter.java @@ -147,8 +147,11 @@ public class NBSConverter { continue; } - if (note.key < 33 || note.key > 57) { - continue; + while (note.key < 33) { + note.key += 12; + } + while (note.key > 57) { + note.key -= 12; } byte layerVolume = 100;