ComputerCraft Forums

ComputerCraft => Programs => Topic started by: Barnet on Oct 09, 2021, 11:34 PM

Title: NBS Player/Jukebox "EasyPlay"
Post by: Barnet on Oct 09, 2021, 11:34 PM
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 (https://www.computercraft.info/forums2/index.php?/topic/2384-noteblock-api-noteblock-player/) and some tweaking efforts of SoniEx2 (https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/mods-discussion/2431617-computercraft-computronics-nbsplayer-4-0) 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:

Update:
I recently updated the program and added some new features.
Title: NBS Player/Jukebox "EasyPlay"
Post by: pjals_but_noisy on Oct 26, 2021, 08:45 AM
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 (https://github.com/Dekkonot/bitbuffer/blob/main/src/vanilla.lua)
Title: NBS Player/Jukebox "EasyPlay"
Post by: oliehaku on Mar 07, 2022, 04:41 AM
I have been racking my brain to try and figure out how to install custom songs for this thing in a multiplayer world. Mostly my problem is on player_nbs.lua:57: or nbs.lua:23: where it says that it failed to perform arithmetic on a nil value.
I'm creating the nbs files by loading midi files into nbs and then putting those saves onto pastebin, does that not work with these? Is there a location or source of nbs files that work? I could really use some help figuring this out.
Title: NBS Player/Jukebox "EasyPlay"
Post by: Barnet on Mar 07, 2022, 08:19 AM
Quote from: oliehaku on Mar 07, 2022, 04:41 AMI have been racking my brain to try and figure out how to install custom songs for this thing in a multiplayer world. Mostly my problem is on player_nbs.lua:57: or nbs.lua:23: where it says that it failed to perform arithmetic on a nil value.
I'm creating the nbs files by loading midi files into nbs and then putting those saves onto pastebin, does that not work with these? Is there a location or source of nbs files that work? I could really use some help figuring this out.

This program uses the actual binary nbs files and therefore always parses them through an interpreter beforehand. I don't think you can download files from pastebin as binary. It's always a textfile, which doesn't work. So if you own the server you can just copy and paste the nbs files into the corresponding pc folder, located in the world folder (you have to name the pc first with the "label" command to indentify it). If you don't own the server, you have to upload your nbs file first to somewhere else than pastebin (some filesharing website) and then download the file with my nbs download function to get the full binary file -> easyPlay download <url> <filename>.
Title: NBS Player/Jukebox "EasyPlay"
Post by: Lupus590 on Mar 07, 2022, 02:35 PM
Alternatively, you can encode your binary file as base64 before uploading it to pastebin and then decode it on the CC computer before using it.

Also, newer CC:T versions have a file upload feature built into the mod, just drag and drop your file onto the game window while you have a computer GUI open and CC will upload the file to the computer that you have open. (It will have a pop up if it works, if it doesn't pop up then you might be on an old version of CC.)
Title: NBS Player/Jukebox "EasyPlay"
Post by: oliehaku on Mar 07, 2022, 09:16 PM
Ah, this is what I needed to fix it! much appreciated! Sorry for asking so late after the post was made, I found it and this was the only one I could find that worked only using CC: tweaked. Anyways, have a good one and once again thank you for the quick reply!