NBS Player/Jukebox "EasyPlay"

Started by Barnet, Oct 09, 2021, 11:34 pm

Previous topic - Next topic

Barnet

Oct 09, 2021, 11:34 pm Last Edit: Nov 27, 2021, 02:41 pm by Barnet Reason: Update
Greetings fellow nerds.

I present to you an actually easy to use noteblock studio player for CC Computers using only modems, monitors and speakers. I was looking for this for quite a while, but couldn't find anything up to date. Most NBS-Player I found were only usable with the old format. So if anyone can direct me to something well made that'd be great. Anyways... together with the nbs decoder from MysticT and some tweaking efforts of Soni from some years ago, I took on the task of making their program work again with the newer NBS versions and also make it easier to use for Pepegas like me.

Pastebin: 5vaJeT44

How to use:
  • Run the installer (5vaJeT44) -> installer
  • When you want to use a custom speaker setup (instead of the default configuration shown in the video) you need to run the "setup" command and follow the instructions. -> easyPlay setup
  • You can now put NBS files with your trusty windows explorer into the folder of your CC Computer or use the "download" command to get songs form the internet. (https://opennbs.org/songs/ for example) -> easyPlay download <url> <filename>
  • Start a song by using the "start" command. -> easyPlay start <fileName>
  • Profit

Notes:
  • The megalovania.nbs file always gets downloaded with the installation programm so you can always run that off the bat without any hassle.
  • When using a custom setup, make sure to run the "setup" command first. -> easyPlay setup <monitor> <slaves> ...
    Put the side where the monitor (or a modem connected to a monitor) at <monitor> and the side where the modems are that are connected to the speakers at <slaves> (separated by space, just like multiple arguments)
  • If you are confused by the setup command, just run it with any arguments and you'll get a step by step guide on how to get it done.
  • No songs that use custom instruments work with this program.
  • Keep in mind that this is a fairly scuffed program, since its original purpose was to play the old (version 0) NBS files on iron noteblocks from the CC Addon mod with the same name. I just smeared with my crayons a little bit through the code until it worked. So feel free to improve it and post your own version. :)

Update:
I recently updated the program and added some new features.
  • The installer is a little bit smarter now. It overrides all files that already exist instead of throwing errors. So you only need to pastebin the new installer and run that. No need to manually delete the files of older versions of this program.
  • You can now play a whole album by giving the "start" command a folder instead of just a file.
    ex.: easyPlay start songs (when "songs" is a directory that contains nbs files)
    This works recursively. So your "songs" folder can also contain more folders with more songs.
  • In addition to the album play, I also added the possibility to loop and shuffle these albums. Just provide the letters "s" for shuffle or "l" for loop as a 3rd argument when calling "easyPlay start".
    ex.: easyPlay start songs ls <- This would loop and shuffle the provided album
  • There are also some new controls. You can now skip a song by pressing the "D" key and end the program by pressing the "E" key.

pjals_but_noisy

you beat me to it! i was making a nbs player (more like an api) too! it supported v5 nbs, but there was endianness issues :/ i used this api for most of the stuff (it doesn't support little-endian though): click here
a