Custom Music without Spout/Mods

Discussion in 'Archived: Plugin Requests' started by jcreations, May 28, 2013.

  1. Offline

    jcreations

    ** PLEASE read the whole post before telling me this is not possible. I have a suggested method below to do it without Spout or client mods **

    Before I begin, I have read previous ideas and the rules for suggestions, and I am aware that this line is in the post guidelines:
    But, I believe that, myself being a programmer, and after doing some research, that it is possible to do Custom Music for clients without Spout or a client mod, with the following method.

    Plugin category: Fun

    Suggested name: Bukkit Music (or) No Spout Music

    What I want: The ability for a server to play custom music for a client, but without client modification or external software (besides a browser) by using a webpage.

    For an idea of what I'm thinking, it would be like merging these two plugins:
    http://dev.bukkit.org/server-mods/musicservice-play-music-anywhere/
    -- and --
    http://dev.bukkit.org/server-mods/custommusic/

    Details:
    With the ability in Minecraft 1.2 to click on web urls in the chat to open them, it is now easier than every to use a webpage as a "client" for something like this.
    On login to a server, (as part of the MOTD), ask the user to click on a link if they want to hear custom music. This will direct them to a webpage (hosted by the plugin) with a music player embedded in the site (like MusicService) that stops/starts streaming tracks from the server based on triggers from the inside Minecraft (such as regions, commands, etc.) similar to how CustomMusic works.

    This way, the music does not need to be on the client's computer (since it streams), and a program doesn't need to be downloaded (since it is a website).

    The Proof:
    Here is a quote from the MusicService plugin:
    This is the kind of webpage/"client" I'm thinking of (but maybe stream without Flash via Javascript and HTML5)

    Also, here is an example of CustomMusic, using their client program which doesn't modify minecraft in any way. This is the kind of result I would like:


    Ideas for commands: Same commands as CustomMusic

    Ideas for permissions: Permissions for using each command

    When I'd like it by: Whenever possible. I appreciate any efforts to make this plugin a reality! I'd love to use it as soon as it can be made.

    * I am willing to help create the webpage portion of the plugin, but I do not know Java, so I cannot help with the plugin itself *
     
  2. Offline

    timtower Moderator Moderator

    jcreations isn't sending packages to an webpage and then back to an client somewhat weird? What is wrong with CustomMusic?
     
  3. Offline

    jcreations

    1) The webpage is just the music player, and it would not communicate back with the server or Minecraft client. The server changes the music that is playing on the webpage based on in game triggers. 2) CustomMusic requires a downloaded client and four open ports, plus it is out of date and appears abandoned.
     
  4. Offline

    timtower Moderator Moderator

    jcreations The developer hasn't been online sinds February so you are pretty much right. And how do you want to send everything to the web page?
     
  5. Offline

    Greennose120

    isn't it possible to create instead of a Webpage, a standalone Java-Application which runs locally and receives these packets and turns them into sound?
     
  6. Offline

    timtower Moderator Moderator

    Greennose120 Then you just get the same idea as CustomMusic, would still require open ports.
    And please tahg me if you reply to me ;)
     
  7. Offline

    jcreations

    timtower Basic HTTP GET or POST commands with a password could do or something like Websend (http://dev.bukkit.org/server-mods/websend/). A basic Web server that can be run alongside the server could make it easier since then you wouldn't need to embed PHP or anything in the plugin.
    Greennose120 I'm hoping that this would not require a client, since a webpage doesn't need to be downloaded. The idea was to do what CustomMusic does, without the client software.
     
  8. Offline

    timtower Moderator Moderator

    jcreations You know that you still need to open ports then? And the page needs to be refreshed before the user gets an new song.
     
  9. Offline

    Greennose120

    Wouldn't it be easier to develop a Runnable jar SoundClient instead of a webpage?
    Isn't a locally running JavaApplication running more performant than a webpage?
    Another point is that you could use already opened ports as for example 80 or 25565
     
  10. Offline

    jcreations

    timtower Yes, but most people already have a web server/port 80 open. Also, it would only need one, not 4 or 5. Ajax or something similar could be used to not require a refresh, but if a refresh was needed, it would be fine.
    Greennose120 It would maybe have better performance, but again, the idea is to have no downloaded client required. With a webpage, just click on a link, and you are good to go :)
     
  11. Offline

    Greennose120

    jcreations
    mhh. I do not have the knowledge to develop a webpage for this without using java applets and embed them....
     
  12. Offline

    jcreations

    Greennose120 I can to the webpage if someone else can do the Java.
    A Java applet could work... But I can write the streaming part myself if needed. All I would need is the plugin to use GET or POST requests to my scripts for it to work.
     
  13. Offline

    Greennose120

    jcreations
    I have no idea how POST and GET works with Java...
    Maybe this could be easily done with DatagramPackets (UDP).
     
  14. Offline

    Gawdzahh

    What about just asking if the player wants to listening to music without the webpage? I could do it all in-game and have it so it streams from a server depending on what your doing/giving in return for this.
     
  15. Offline

    jcreations

  16. Offline

    MDCreator

    WebSockets, my friends. WebSockets is the solution. They're specifically designed as a high-speed, layerable two-way communication channel. There's implementations directly in the browser, or if you want, there's implementations for a Java client. See https://github.com/TooTallNate/Java-WebSocket. There's no need for any more port forwarding, because I'm pretty sure that you can have websockets run on the same port as the Minecraft server(that needs some testing... hmmm). What's great about this is, however, you can choose to have both a webpage and a Java client using the same protocol. If you need, I can attempt to implement this for communication.
     
  17. Offline

    Gawdzahh

  18. Offline

    jcreations

    Gawdzahh Unfortunately, I am trying to play mp3 files. I have seen playing midi files with noteblocks before, but while interesing, it doesn't fit this plugin.

    If someone can program the actual plugin with websockets, get requests, or something better that works with a webpage or embedable applet, I can try to make the web part of the package.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  19. Offline

    Gawdzahh

    Couldn't you just convert the files to .midi?
     
  20. Offline

    jcreations

    Gawdzahh They would sound completely different than the original if the song was simple, and complex songs wouldn't even convert since midi is based on musical notes and mp3 is based on actual sound waves. Most mp3s cannot convert to midi because of this.

    MDCreator Thanks for that, it looks promissing. I will look into the web end of that.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  21. Offline

    Jahb

    Something like this has been done by "The Hive" server in their game The Herobrine.
     
  22. Offline

    jcreations

    And it has been done already: http://dev.bukkit.org/bukkit-mods/noteblockplayer/

    I think many other people would appreciate this since the CustomMusic plugin is defiantly gone now :( There are many comments on the page (http://dev.bukkit.org/bukkit-mods/custommusic/) saying that is is incompatible and the developer is not responding.

    Still looking for anyone who can help with the Java part. I can do all the code for the web stuff, and it can be hosted without an external program with something like BukkitHTTPD (http://dev.bukkit.org/bukkit-mods/bukkithttpd/). I only need triggers for the events to start/stop the music.

    ** If I cannot find anyone who can help with the Java, I may try to create this with other plugins and script packages for them, and release it with instructions. **

    Thanks to anyone who can help!
     
  23. Offline

    jasonjsuperstar

    Cant you guys just stream the song with twitch tv and give them the link to ur channel then they play while listening to ur computers songs
    Just as simple as that
     
  24. Offline

    Spaceyavin

    Twitch is for screen streaming. Also this topic is two months old.
     
  25. Offline

    jcreations

    jasonjsuperstar Each player has a different audio stream based on their location... that wouldn't work :(
    Spaceyavin I am still watching, but it is getting old.

    I am learning Java (slowly), so I may come back to this later myself. We'll see!
     
  26. Offline

    deimos161

    It would be epic if this could work. It would be great to have to sounds for different areas of map, great for an RPG server.
     

Share This Page