forked from ChomeNS/chomens-bot-java
some more before i go to sleep
This commit is contained in:
parent
abfbe8044b
commit
7cf994a3eb
2 changed files with 4 additions and 2 deletions
|
@ -290,7 +290,7 @@ public class MusicPlayerPlugin extends Bot.Listener {
|
|||
while (currentSong.reachedNextNote()) {
|
||||
final Note note = currentSong.getNextNote();
|
||||
|
||||
if (notesPerSecond > 1000) continue;
|
||||
if (notesPerSecond > 2500) continue;
|
||||
|
||||
float key = note.pitch;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import land.chipmunk.chayapak.chomens_bot.Bot;
|
|||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
|
||||
// Author: hhhzzzsss
|
||||
|
@ -168,7 +169,8 @@ public class NBSConverter {
|
|||
|
||||
NBSCustomInstrument customInstrument = customInstruments.get(index);
|
||||
|
||||
String name = customInstrument.file;
|
||||
final Path path = Path.of(customInstrument.file);
|
||||
String name = path.getFileName().toString();
|
||||
if (name.endsWith(".ogg")) name = name.substring(0, name.length() - ".ogg".length()); // bad but OK
|
||||
|
||||
instrument = Instrument.of(name);
|
||||
|
|
Loading…
Reference in a new issue