From ab1a7654d844bac072bc91a29e8433cc983b5f50 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Wed, 27 Sep 2023 14:10:20 +0700 Subject: [PATCH] FIX NBS PITCH --- .../land/chipmunk/chayapak/chomens_bot/song/NBSConverter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/song/NBSConverter.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/song/NBSConverter.java index 55fe24a..d7daf23 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/song/NBSConverter.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/song/NBSConverter.java @@ -174,6 +174,8 @@ public class NBSConverter implements Converter { int key = note.key; if (note.instrument < instrumentIndex.length) { instrument = instrumentIndex[note.instrument]; + + key = note.key + (note.pitch / 100); } else { int index = note.instrument - instrumentIndex.length; @@ -217,8 +219,8 @@ public class NBSConverter implements Converter { if (!sounds.contains(name) && sounds.contains(file)) name = file; instrument = Instrument.of(name); - key += customInstrument.pitch; + key += note.key + customInstrument.pitch; key -= 45 + (note.pitch / 100); }