MusicBox [0.4] [Api 4 + Api 5]

I’m having a problem with the server starting up:

Currently running on SpongeForge 1695 (API 5.0.0)

http://paste.ubuntu.com/23226532/

@Clienthax Are you adding something with regions? like region music and such, since im using sponge on my pixelmon server im kinda looking for a music plugin that has that. the other day i saw a thread someone made asking if someone is adding regions and u said that ur working on it, is that version availible? or is it a command that i dont know?

Hi @Clienthax ! I saw on github that to convert a nbs’s note to a pitch you are using the xxmicloxx’s mapping array, but it’s an array of rounded numbers found by ear.
For a personnal project, I did researches and I found a better way to do it :

byte nbsKey = ? ; // Read from .nbs files
byte mcKey = nbsKey -33; // Here is the real conversion between NBS and MC
double pitch = Math.pow(2.0, (double) (mcKey - 12) / 12D); // Used when playing sounds (extracted from MC's sources)

I share it because the results are more accurate than xxmicloxx’s array and it allow you to play nbs’s notes that are not vanilla :wink: I hope it can help you

can you make a pr with that, id like to check the differences :wink:

I’m very busy at this time, but it would be fast so I will do it as soon as I can
EDIT: I found time, it’s done :wink:

Can’t play juke boxes on latest snapshot http://pastebin.com/XnYSt4x0
You can use the radio though

forge-1.10.2-12.18.2.2123-universal.jar
spongeforge-1.10.2-2123-5.1.0-BETA-1879.jar
musicbox-0.41.jar

Is this still being updated?

For those interested in making this plugin work with 1.12.2 on spigot api 7, you can come ask me I have made a little ajustment to the code for it to work fine on 1.12 and more. I just don’t want to upload to it to get any merit of doing so, but only posting here for any interested, thx alot for the plugins !