forked from ChomeNS/chomens-bot-java
some more midi thing
This commit is contained in:
parent
349a655d31
commit
798d6fd197
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue