Spliterash / MusicBox

Music plugin for spigot
11 stars 11 forks source link

Update to NoteBlockAPI 2.0 #27

Open mibby opened 1 year ago

mibby commented 1 year ago

Would it be possible to update to NoteBlockAPI 2.0 officially? I have a fork based on the latest upstream commit https://github.com/Spliterash/MusicBox/commit/13f36da4b962d9ab4b26dc7496294c438bc8f6bc and this PR https://github.com/Spliterash/MusicBox/pull/19 with @jhooc77 NBAPI 2.0 fix commit in this branch https://github.com/jhooc77/MusicBox/commit/73d89aa85e14d733bacb38a0aaa2169bcc10877c.

This can be found here. https://github.com/mibby/MusicBox

Upon comparison testing between both NoteBlockAPI versions, 2.0 seems to significantly improve playback performance and sound. Playback is no longer choppy or randomly cutting out since it is async and the timing / audible octave range sounds much better, even with terrible NBS converted midi files. Especially if you use extendedOctavesRange and a resource pack that supports the 10 octave range. Oddly enough even if you use the octave range patch with 1.x NBAPI, lows still sound better on 2.0.

I did however notice three issues currently with the 2.0 changes;

1) Song doesn't properly destroy itself on end anymore. The BossBar display remains up and duration bar filled. You have to click the Stop button to remove it.

Believe to be caused by this change and isn't fixed in MusicBox fully. destroyed -> !playing isn't enough of a fix. https://github.com/koca2000/NoteBlockAPI/commit/a3b29f8bfd70b8aca340b29bd31ed63720a57609

2) The Song panel does not update to the current song in the center if you are playing a folder and it rolls into the next song. It only seems to update when you skip to the next song from the GUI.

3) Stereo mode isn't being used anywhere. Playback is still mono in private listening and speaker mode.