some more midi thing

This commit is contained in:
Chayapak 2023-09-25 17:11:55 +07:00
parent 349a655d31
commit 798d6fd197

View file

@ -323,9 +323,10 @@ public class MusicPlayerPlugin extends Bot.Listener {
// this uses the pitch to calculate // this uses the pitch to calculate
final float pitch = note.pitch; final float pitch = note.pitch;
// these numbers seems to work for me if (pitch > 5) blockPosition = -(float) (pitch / -5) - 2; // left
if (pitch < 1) blockPosition = -(float) pitch / -1; // left else if (pitch < 5) blockPosition = (pitch / 5) - 2; // right
else if (pitch > 9) blockPosition = pitch / 9; // right
blockPosition = MathUtilities.clamp(blockPosition, -1, 1);
} }
key += 33; key += 33;