PartySystem/Getting and Running the LightDJ Software
This page tells you how to get and run the LightDJ software.
Getting the Software
All of the software is available as a GIT repository. The Java code was written using Eclipse as the editor, and some of the workspace/project settings are also in the GIT repository to make it easy.
Install GIT if you haven't already! Also install Eclipse for Java if you don't have that.
To get the repository, change directories to where you want the code on the computer. Then, run
This should give you a directory called
Other Operating Systems
The code has been tested on Windows, but for some reason it doesn't run very fast. It has not been tested on Mac OS X.
Once you have the code, open up Eclipse. When it asks you what workspace to use, select the
When Eclipse opens for the first time with this project, you should do the following:
- Import the SoundExpressor folder as a Java project (SoundExpressor/ is in lightdj/).
- To run the software, run the MainClass class as a Java application.
You should be good to go!
Other IDE / No IDE
If you use another IDE, you want to run the MainClass file in the SoundEngine file.
Or, if you like the command line, you can use "ant run" in the directory with build.xml (right above the src/ folder) to start the LightDJ software. Ant is Java's version of "make", and you might need to install it if you don't have it already if you want to start the LightDJ code from the command line.
Running the Code
There are two ways to run the code: using an ant build.xml file (Java's version of "make" if you're familiar with C/C++) as noted above, or with Eclipse. If you're using Eclipse (the recommended Java IDE), run the MainClass.java file as a Java application. If running using the terminal, go to the lightdj/SoundExpressor/ folder, and run "ant run".
During the 2010-2011 year, the LightDJ software was run successfully on Ubuntu (10.04) to power the Party Lighting System. If you want to ensure compatibility, you should consider running it on Ubuntu. It probably works with other Linux distributions and operating systems as well, but this has not been formally tested. Since then, it's been tested and works great on Ubuntu up to version 12.10 (this sentence was last updated around January 2013).
Please note that, in order to ensure low latency, it is necessary to uninstall PulseAudio from Ubuntu. PulseAudio is an Ubuntu package that controls volume, allows you to record from speakers, and do a number of other things. However, it adds a lot of latency to the FFT audio processing. Check around the Ubuntu documentation online to figure out how to uninstall PulseAudio. Once it's uninstalled, the regular volume controls might not work, so you can adjust the volume by opening up a terminal and using the "alsamixer" command. Please also note that once PulseAudio is uninstalled, you won't be able to play music off of your computer and have the LightDJ software use this audio stream. Instead, you'll have to physically plug some audio source (ex., an MP3 player, another computer, DJ equipement, etc.) into the Line In port on the computer running the LightDJ software.
Please also note that, once you uninstall PulseAudio, you probably won't be able to use OpenJDK as your Java virtual machine because a lot of the sound libraries that OpenJDK uses require PulseAudio. So, please install the Sun Java version in Ubuntu (again, check around the Ubuntu documentation for instructions on how to do this) in order to run the LightDJ software. Once Sun Java is installed, change the settings in your Java IDE (probably Eclipse) to use the new Sun Java instead of OpenJDK when you run the software.
The above settings are designed for party mode. Namely, running the code with as little latency as possible and with an external input. However, if you're just hacking at the software on your computer and don't necessarily care as much about latency and want something simpler (i.e., keeping pandora.com open and just having the Light DJ Software use that as it's source instead of an external input), you can leave PulseAudio installed on Ubuntu. You should also run the OpenJDK version of Java since it is integrated with PulseAudio in Ubuntu. If you're playing from a music player or music website and want to set that as the source to the LightDJ software, open the Pulse Audio Volume Chooser program and select "Monitor of Internal Audio" as the source for the Light DJ software under the recording programs tab.
So, in summary:
- The software is known to work in Ubuntu, so that's whats recommended
- Uninstall PulseAudio for lower latency
- Install Sun Java, and tell your Java IDE to use it when running the code
- If you're not running at a party (don't care about latency as much), you can re-install PulseAudio and use the OpenJDK java