JukeBox Pro - Music System for Unity

JukeBox is an easy to use playlist based music system, it can play songs in progression, skip back and forth, play random songs and now supports runtime loading of music files.

Current features include:

  • All of JukeBox Free features
  • Custom dynamic inspector (changes based on what you doing)
  • Runtime file loading of user music
  • Written to support both desktops and phones (no testing has been done on phones), loads .ogg/.mp3 depending on the platform
  • Many small bug fixes and possible speed improvements

Version: 1.6.2
Source Code: C#
Unity Version: 3.4.1 Free
Price: $5
Asset Store: JukeBox | Tools | Unity Asset Store

Any feature suggestions are welcome.

Custom Inspector

ChangeLog:
Version 1.6.2:

  • Fixed a bug with the random function.

Version 1.6:

  • Fixed bug with loading user playlist without playlists.
  • Added a method to change playlist via name.

Version 1.5:

  • Multiple playlists
  • User loaded songs get loaded into a User playlist
  • Many small bug fixes and updates
  • Improved inspector to handle the new features
  • An improved example of the system in the form of a Music Player
  • Updated to use events instead of callbacks, which are very similar. This allows multiple scripts to hook into the jukebox to get song changes.
  • Seek through songs is now possible
  • Pausing is now possible too

Regards,
Garth

JukeBox pro is now available on the asset store:

I just posted an update of JukeBox Pro to the asset store. This version brings a more elegant event system for song changes with regards to showing of title and so forth. It also has improved documentation and a custom gizmo.

This version also brings a price decrease of $5 to bring the price to $5.

This update is one of the biggest updates to JukeBox. It brings many small subtle changes and many major breaking changes however they are for a good cause.

Version 1.5:

  • Multiple playlists
  • User loaded songs get loaded into a User playlist
  • Many small bug fixes and updates
  • Improved inspector to handle the new features
  • An improved example of the system in the form of a Music Player
  • Updated to use events instead of callbacks, which are very similar. This allows multiple scripts to hook into the jukebox to get song changes.
  • Seek through songs is now possible
  • Pausing is now possible too

This will hopefully go live some time in the next couple of days.

Regards,
Garth

Version 1.5 is now live!

Hi Garth,

first of all thanks a lot for this nice tool.
Unfortunatly i got some problems when using it.

  1. how can i change the playlist ingame? ( Cant add the playlistscript due to an classnameerror )
  2. when i load oggs from a folder without manually assigning a playlist first, unity crashes! a bug?

could you help me?

Thanks

Regards
Ben

I will have a look at it over the weekend and will hopefully have some sort of patch, if it is indeed a bug. I will also try to put together a walk through for changing playlists at runtime via code.

I have completed version 1.6 which provides a patch to the crashing of unity when there is no playlists. And also made it more simpler to change the playlist that have already been assigned. However, I cannot currently update the package as I can’t seem to login.

Version 1.6 is live on the Asset Store.

Great Job, thank you:)

Another problem makes me sick…
Why are the songs loaded from a folder only played as 2D-Audio?

Thanks in advance.

I will look into adding the option for 3D audio on loaded files. Hopefully the update will be out by early next week.

Regards,
Garth

I have uploaded a new version of Jukebox that allows you to select whether it loads the files as 3D or not. Hopefully it will be available soon.

Regards,
Garth

The latest version is now available on the Asset Store. Get JukeBox Pro for all your in game music needs.

Hi,
I can get it to crash, and I thought it was by selecting random.
However, that has now gone away (I am on a Mac)

the problem I have is that the sound level is far too low to be heard against all the other sounds.
I have found the var volume and have set it to 200f but that has not made any difference.

What do I need to do please?

Edgley, I must ask where is the JukeBox component compared to where your camera and thus (usually) your Audio Listener is?

If you use a 2D based Audio Clip does it play loud enough? I’m thinking that it could be possible that your Audio Listener is too far away from the JukeBox component and thus the Audio Source it uses for playing audio.

Has the crash gone with Random? I’ve never experienced or heard of someone experiencing that.

Regards,
Garth

Hi, Unity crashes on Random. I used the Load From File option, it loads all oggs in the specified folder, but only plays the last one even when pressing Next Song or Previous Song.

Edit: Fixed the problem, you may want to take a look at Jukebox.cs: NextTrack and PreviousTrack. When setting the newSong to a random song, it’s getting a random number between 0 and the number of playlists. I changed this to number of songs and it works. It was getting stuck in the do while loop forever.

Thanks for spotting that. Unfortunately I wasn’t able to reply sooner.

I will correct that and upload a hotfix asap.

Regards,
Garth

I will make the change to the file and will presume that works for me too.
I will try your suggestions, Garth.

Still quite new, so its bound to be something I have not got quite right :slight_smile:

I have now attached the object with the jukebox to my main camera.
If i turn off all other game sounds I can just about here the music; no where near the level of the other sounds.

I have checked the file in VLC and it plays fine in there.
Any additional points please, appreciate its just me not getting it :slight_smile:

@Edgley, if you set the Audio Clip to 2D sound, basically just ensure 3D is not selected. Does it play loud then? It won’t be a fix if there is a requirement for 3D sound. You could also try to load the example scene and play the audio clips in that JukeBox. The example scene functions as a basic music player.

The volume value you passing in should be between 0-100.

Has anyone else had problems with the Audio Volume?