-
-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Datapacks are amazing and was what NBS2CBS (this thing https://www.youtube.com/watch?v=ADPJg3_KsCM, with visualizer seen here https://www.youtube.com/watch?v=orHr7S1HE9k) was planned to become in 1.13+. I'm so glad someone was able to make a note block player in this thing now.
There are a few enhancements that NBS2CBS has over the datapack export, which I think can be implemented.
The notes playing should adhere to the set volume on the layer they were playing in the NBS file. /playsound supports volume, so I got it working by editing the playing.mcfunction file manually and changing the /playsound commands there. If it could be generated with layer volume values in mind, that would be great.
There should be the ability to add custom instruments to the game, as they can be played via resource packs. The /playsound command simply plays the name of the custom instrument (e.g block.note.trumpet) and, a resource pack that uses that sound ID will play the notes. Else, it is simply inaudible without a resource pack.
This can be extended to actual minecraft sounds, which don't need a resource pack at all to be heard.

Stereo support can also be added by playing the sounds a set distance to the left or to the right of the character's head. NBS2CBS did this on a world axis, but 1.13 and up now can do it relative to where the player head is looking, so it should work even better now.
Stereo is currently done through python arguments in the layer names, but this can be changed to a stereo knob which the updated nbs format can include.

If you want to reference how NBS2CBS does things, you can download the script here:
Documentation: https://drive.google.com/file/d/1xmLqNz3W82YwYvbVFOAkSULaVRdxfuE7/view
Download: https://drive.google.com/file/d/1ZclKU8HmQqwXoERVak5_32V2VmjsBc3K/view