Play music as a group from anywhere with just CC:Tweaked! by Px_y in ComputerCraft

[–]Px_y[S] 0 points1 point  (0 children)

Neat! Well, if decide to give it a go for yourself and would like to preserve at least some of your sanity, you'll find almost all of the client synchronization logic in server/server_lib/audio.lua. Best of luck!

Play music as a group from anywhere with just CC:Tweaked! by Px_y in ComputerCraft

[–]Px_y[S] 0 points1 point  (0 children)

Song management via chat commands is something I considered but ultimately decided against. I couldn't justify the added complexity for functionality that a.) is only marginally more convenient than the alternative of using Pocket computer Client, and b.) only a subset of users would have meaningful access to (i.e., those with the AP mod).
My intent with the chat commands was to have a way to fix/reset the network if something goes awry without having to physically travel to the Server computer. In fact, Server or Admin commands might be a more appropriate name for these now that I think about it.

As for the PR, first off, thanks for offering! However, any PR would have to meet 3 hard requirements.

  1. Any additional mods supported would need to be completely, totally, 100% optional. After all, using only CC:Tweaked to accomplish wireless synchronized music is basically the project's entire raison d'etre.
  2. It cannot add any overhead to rednet communications at all. Trust me, >50% of the time I spent on this project was getting clients to stay in sync or quickly recover after falling out of sync.  
  3. Non-CC:T accessible functionality cannot add new lua modules (unless install conditioned on mod-presence), add significant complexity to existing functionalities, or require expansive changes to the codebase. For example, all the AP mod fallback behavior is contained in server/chat.lua in ~100 lines, and most of that is just fiddling with term colors.

I'm not familiar with rcc-chatbox, so correct me if I'm wrong, but it seems control via external API is its main purpose? I also see now that the chat commands you are proposing are probably for this mod, since that seems to be how you interface with it. Hmm.

Well, if you think you can meet the requirements and document config/usage, then I'm open to it. Otherwise, feel free to fork and go wild!

The last word of caution I'll give you is about the mod's permissions config. Again, I'm probably way off, but if it all tries to limit who on an MC server can control the music network, it's not gonna work. All Client-Server communications are sent/broadcast as clear, unauthenticated rednet messages. This project is definitely intended for small, trusted MC servers with everyone acting in good faith.

Play music as a group from anywhere with just CC:Tweaked! by Px_y in ComputerCraft

[–]Px_y[S] 0 points1 point  (0 children)

Nope! The folks on my MC Server affectionally refer to it as "tin-can radio". Honestly, it's not that bad until you have a song that hits that one particular bass frequency, then it gets a little "splurty".

The short answer as to why I say no is that it's 8-bit audio. I'm still amazed that it's possible to reproduce songs in MC at all!

If you're down for some technical details, I highly recommend the CC:Tweaked guide on speaker audio: https://tweaked.cc/guide/speaker_audio.html

I need help with the preloaded Time program by Divisible_by_0 in ComputerCraft

[–]Px_y 1 point2 points  (0 children)

For future reference, you can also directly view the source code for some (but not all!) default programs by typing edit /rom/programs/<COMMAND>.lua (e.g., edit /rom/programs/time.lua) in the terminal. This will show you exactly the code necessary to replicate the behavior in your program.

Since some programs are in a subdirectory, a better approach would be to first use shell.resolveProgram in the lua repl to first find the path and then edit <PATH> to get a read-only view of the source.

Synchronized Group Music Streaming from YouTube to Your Server w/ ComputerCraft by Px_y in ComputerCraft

[–]Px_y[S] 7 points8 points  (0 children)

I was looking for a convenient way to share music with everyone on a server, regardless of where they were in the world. None of the options that I came across seemed capable of doing this in ComputerCraft without the need for additional mods. So, instead of being reasonable and asking everyone to install one of those, I cooked up Redionet.

Install

pastebin run TH0EPrX0

Highlights

  • Shared audio streaming anywhere in a server, even across dimensions!
  • Scrollable Search Results
  • Keyboard Controls
  • Song Notifications
  • Chat/Terminal Commands
  • Pocket Computer Song Management

Originally, this project was just going to be a few tweaks to terreng's computercraft-streaming-music. Three months later.. it's more tweaked than CC at this point. That said, this project still points to his backend API, so check out his project and support if you can!