MORE SHIT

i'd rather listen on spotify than making these mc musics shit
This commit is contained in:
Chayapak 2023-10-02 20:25:05 +07:00
parent 6be81661ff
commit 48185bd771
2 changed files with 5 additions and 5 deletions

View file

@ -336,10 +336,10 @@ public class MusicPlayerPlugin extends Bot.Listener {
else if (average < 100) blockPosition = (float) average / 100; // right
} else {
// this uses the MIDI PITCH and MIDI PANNING to calculate
final double pitch = (double) (note.originalPitch + note.panning) / 2;
final double pitch = (double) (note.originalPitch + (note.panning / 100)) / 2;
if (pitch > 80) blockPosition = -(float) (pitch / -85) - 2; // right
else if (pitch < 20) blockPosition = (float) ((pitch / 15) - 2); // left
if (pitch > 80) blockPosition = -(float) (pitch / -80) - 2; // right
else if (pitch < 20) blockPosition = (float) ((pitch / 20) - 2); // left
blockPosition = MathUtilities.clamp(blockPosition, -0.4F, 0.4F);
}

View file

@ -218,7 +218,7 @@ public class MidiConverter implements Converter {
float volume = (float) velocity / 127.0f;
long time = microTime / 1000L;
return new Note(instrument, pitch, midiPitch, volume, time, (int) ((panning - 64) / (float) 64), 100);
return new Note(instrument, pitch, midiPitch, volume, time, (int) ((panning - 64) / (float) 64) * 100, 100);
}
private static Note getMidiPercussionNote (int midiPitch, int velocity, long microTime, int panning) {
@ -229,7 +229,7 @@ public class MidiConverter implements Converter {
Instrument instrument = Instrument.fromId(noteId / 25);
long time = microTime / 1000L;
return new Note(instrument, pitch, midiPitch, volume, time, (int) ((panning - 64) / (float) 64), 100);
return new Note(instrument, pitch, midiPitch, volume, time, (int) ((panning - 64) / (float) 64) * 100, 100);
}
return null;
}