MidiRadio
MidiRadio - The anywhere you go midi player!
What is MidiRadio?
MidiRadio attempts to imitate songs in game by sending tuned in players note block sounds. MidiRadio is inspired by and expands on the original works of Protected in their plugin MidiBanks, now managed by jfmherokiller.
Rather than play note sounds through note blocks however, MidiRadio streams the players individually note sounds when they are tuned in to the radio, regardless of where they are at.
How do I use MidiRadio?
MidiRadio is very easy to setup in its current stage. Just stick some midi files into the plugin's data folder and it will start playing next time the server starts up. By default players are not tuned in to the radio - however typing /tune in will quickly have them listening to the waves in no time. You can opt out too by using /tune out.
Players with the midiradio.play permission can use /play <song> to change the song too!
Video demonstation:
You can see MidiRadio in action on server.minesworn.com. Just use /tune in when you join.
At the moment MidiRadio is still in its infancy and I'd love to expand on it by adding features like playlists, or multiple radio stations however they might be limited by how much time I have. Also, please do share any good midi files you find that work well with this plugin - keep in mind though that note blocks aren't suitable for playing long notes.
Check out the source on Github here!
I want to be able to have a tune that plays for 10 seconds when someone joins the server only, can you make support for that? :)
Only thing I don't like about this plugin is that it doesn't have a node for the /tune in/out afaik. Add that and It would be even better :D
@mindcat
I just downloaded Note Block Studio and I can export the existing .nbs files into midi format just fine. When I play them back using MidiRadio they sound the same. I don't really want to have to work with another file format where you can already easily convert between formats, but the source code of MidiRadio is freely available so you're welcome to try and create your own .nbs player.
This is awesome! I really like this plugin a lot. Personally, I have a list of plugins I wait for to update when a new update comes out, and this is among the top of them. Great job!
@t7seven7t
export to midi, it is not original track.
Well, I'll wait before I end up using this. I'll let it mature a little more.
@mindcat
You can already export .nbs files into .mid though? Either way I might look into it.
Can you support .nbs format?
www.minecraftforum.net/topic/136749-minecraft-note-block-studio-190000-downloads
@robotnikthingy
Hmm, I did recently change to obtaining java's midi resources and it looks like its not able to obtain a sequencer device. Is there an error in the log that says "Could not obtain midi sequencer device". It won't have a stack trace so it probably isn't very noticeable. May have to go back to how I was doing it previously then.
EDIT: From now on I'll include both players and default to the old one if the plugin can't obtain a sequencer. Let me know if you find any problems with this as the sequencer works just fine for me so I can't test whether it defaults back correctly.
I get this error when i try to use the tune in command with the latest version
17.01 12:24:17 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
17.01 12:24:17 [Server] INFO at net.t7seven7t.midiradio.MidiRadio.onCommand(MidiRadio.java:96)
17.01 12:24:17 [Server] INFO Caused by: java.lang.NullPointerException
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:849)
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:427)
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.MinecraftServer.q(MinecraftServer.java:494)
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.DedicatedServer.r(DedicatedServer.java:224)
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.MinecraftServer.r(MinecraftServer.java:598)
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.DedicatedServerConnection.b(SourceFile:30)
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.ServerConnection.b(SourceFile:39)
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.PlayerConnection.d(PlayerConnection.java:112)
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.NetworkManager.b(NetworkManager.java:290)
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.Packet3Chat.handle(Packet3Chat.java:44)
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.PlayerConnection.a(PlayerConnection.java:853)
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.PlayerConnection.chat(PlayerConnection.java:898)
17.01 12:24:17 [Server] INFO at net.minecraft.server.v1_4_6.PlayerConnection.handleCommand(PlayerConnection.java:980)
17.01 12:24:17 [Server] INFO at org.bukkit.craftbukkit.v1_4_6.CraftServer.dispatchCommand(CraftServer.java:510)
17.01 12:24:17 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186)
17.01 12:24:17 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46)
17.01 12:24:17 [Server] INFO org.bukkit.command.CommandException Unhandled exception executing command 'tune' in plugin MidiRadio v1.4
Is this heavy on server ressources? This is epic :3
Turns out I was still using a part of the old midibanks tempo conversion which makes playback somewhat slower than it should actually be causing songs to occasionally end prematurely. Will fix that :)
@brinaq
I never even thought of playing the Morrowind theme. I'll have to go find a good midi for it now! Thanks :)
This is really awesome! Wow now I can play Morrowind theme in note blocks to my players :D will test tomorrow and see how it sounds. Once I get the MIDI.
@Ajtro08
Thanks, with your files I found a glitch with how the player gets the instrument from the midi file and fixed the drums up a bit so that you will only hear them when the channel is equal to 10 (drum channel in midi files). However, unfortunately neither of these updates are good news for your tracks unless you can make some edits to them.
Both of the tracks you linked have only two channels each which are both the same instrument. If you can change the second channel to either channel 10 (for drums) or a guitar instrument (for MidiRadio that includes instruments 28 to 40) then you will get a more distinct difference between the two channels and as a result the song will sound better.
Call me maybe sounds pretty cool on this.. I mean.. for a note block song :P
@t7seven7t
Alright, here are two of the midis with the problem desribed: http://www.qfpost.com/file/d?g=NtC9EbLJC (The Lazy Song - Bruno Mars) http://www.qfpost.com/file/d?g=unvNZ5EjU (Call Me Maybe - Carly Rae Jepsen)
@Ajtro08
Sure, I'm always looking to improve playback for different songs in the hopes it will make all sound better. I should also add that files need to use PPQ timing and most homemade midis probably won't work very well unless you've split the song into different channels for each instrument.
@t7seven7t
I created a local server and tried it, and the the midis I used didn't work. It did the same thing. I can see how the randomness can be created by latency, but the "beat" we heard was just one instrument (a very quiet drum.) I believe this program doesn't recognize some types of noise in midis? If you want, I can send you the .mid files.
@t7seven7t
there is no midiradio data folder being created as it just crashes on startup ;/
@Ajtro08
Might sound seemingly random unless you have a direct connection to the server. Due to the way Minecraft sends packets (UDP) the timing of packets showing up to the client can deviate and packets may become out of order. There really is no solution to this asides from client side mods to ensure timing and order are maintained during playback. This plugin works best for servers and clients connecting in a local network but can also achieve at least semi-desirable playback on other servers.
As for your midi files not working, its really dependent on the song as to how well it will play back. There are a few things that might help though:
1. Make sure you're using the most recent build (v1.1) where I fix the automatic picking of instruments somewhat so some of the notes which used to sound random now use the proper instrument.
2. Use sound clips that don't have notes which are played for long durations, or rely on playing lots of notes very fast. Good spacing between notes is something that might help combat the playback issues I mentioned earlier.
3. You might also try setting up a local test server for each song and listening to them to see whether the sound any good with no latency. If they don't you could try editing them to your liking with a program such as Anvil Studio (freeware program for viewing, creating and editing midis).