MusicPlayerCC - DFPWM GUI Based Music Player

Started by coppertj, Feb 23, 2024, 01:23 AM

Previous topic - Next topic

coppertj

MusicPlayerCC - DFPWM GUI Based Music Player.

Install instructions aswell as how to use guide: https://github.com/coppertj/MusicPlayerCC

This program uses the powerful Basalt API to create a user friendly interface to play music files. This program is aimed to give a experience similar to that of an Ipod in terms of pausing, skipping, play back, aswell as a GUI file manager to navigate the /music folder with subfolder support. The target platform for this program is a Advanced Noisy Pocket Computer however can be used on just a regular Advanced computer with a speaker next to it.

This program is only a proof of concept in terms of it does what it is advertised to do however there is much room for improvement in the code whether it's optimization of the basalt code for better performance or future features.

This project is managed on github and is open to community improvements aswell I will be improving this as my main side project currently. I'd like to get this to a very reliable state where this is something mod pack authors would take into account when setting up their computercraft server configs to have HTTP/file upload/etc., setup for this idea in mind.

Future Features:

-Open Noteblock Studio support
-Actual sound visualizer
-Metadata creation for track order per folder/subfolder
-Global shuffle that will play the entire music folder and subfolders
-Options menu for buffer size (improves audio quality/performance at the cost of accurate pause/skip/repeat button detection) NOTE: Currently the buffer size is set to 1024*16 which gives great audio reliability but the pausing, skipping, playback is slow. This can be adjusted at line 404 in the lua code. I found 1024*6 to be somewhat reliable but it has the potential to get really wonky...
-HTML streaming from webserver
-More refined file explorer GUI

Known Bugs:

-When computer is under intense load music will get louder and louder as it lags. This could be linked to server performance or unoptimized code, could also be linked to the buffer size. (This is only a proof of concept this initial version).

Pictures:



Estagiario_em_C

I did some changes to the code.
Here it is: pastebin
With this code, it plays on all speakers, even those in the network.

had to remove the sound of buttons for it to work.

Sorry for my english, im not a native speaker.

Hope it helps.

ComputerCrafter

That's so cool!
You've just invented the iPod...in ComputerCraft. :O

Anyways, maybe you could implement a system where your program automatically converts other files to DFPWM using the HTTP API (site to convert: https://music.madefor.cc/)
This is very interesting! :D

"Code is read much more often than it is written."
– Guido Van Rossum, creator of Python

Raykaye

hey! I keep getting an error saying my file is to large. its 1090kb which is super small so im confused on what im doing wrong?

Lupus590

1090Kb is large for CC. The default file upload limit is 512Kb and the default drive size of a computer is about 1000Kb

what should I do if, after installing the code, I get an error in line 126

QuickMuffin8782

Quote from: ComputerCrafter on May 10, 2024, 11:59 AMThat's so cool!
You've just invented the iPod...in ComputerCraft. :O

Anyways, maybe you could implement a system where your program automatically converts other files to DFPWM using the HTTP API (site to convert: https://music.madefor.cc/)
This is very interesting! :D



Hmm... this could be used to make my own player...
"The Blue Blur" - Working on Net Star OS, a new frontier for Red Star OS 3.0
linktr.ee/quickmuffin8782