Monday, December 19, 2016
Reader Submitted: "How To DJ The DJ Tantari Way - Chapter One Part Two"
"This is my guide for how to go from a newbie to a moderately successful DJ on Second Life. ... If you do read it and have comments or corrections, I’d love to hear them. (Mail me at tantari.kim at gmail.com.)"
Continued from Chapter One Part One
* * * * *
How to Broadcast: Your Test Setup
Live Broadcasting (http://mixxx.org/manual/latest/chapters/livebroadcasting.html) is a complex topic with a lot of moving parts, so make sure you read this section in the manual if you run into any problems. The most important thing is to recognize the pieces and what they are called. When you broadcast, there are three important components, the Source, the Server and the Listener. (These can all be on the same computer or on separate computers.)
MIXXX is the Source. It provides the music, encodes it, and sends it to the Server.
The Server is the glue that ties the Source and the Listeners together. It must be a publicly accessible server. Usually this means it needs a DNS entry and open ports. The Source (MIXXX) connects to it by name and logs in with a username and a password. While you are playing music, MIXXX is continuously re-encoding what you hear as an MP3 and sending them to the Server.
The last piece is the Listener. Each listener connects to the Server and requests a copy of the stream. The Server grabs the latest chunk of music the Source has sent and passes a separate copy to each Listener. Each Listener decodes their stream and plays it for the end user so they can hear the music.
This is a lot to take in and there’s a lot that can go wrong, so we’re going to set up this whole thing in miniature on your home computer. This will allow you to test what is going on, make sure that everything is working, learn about the process, and practice debugging problems.
You’re going to need the SHOUTcast DNAS software. You already downloaded it. As a Windows user, I had to create a directory (c:\utilities\shoutcast) and uncompress the file there. You’ll see a sc_serv.exe (or just sc_serv for Unix and Mac) and some configuration files. Rename sc_serv.conf to sc_serv.conf.orig and create a new sc_serv.cong in your favorite text editor. Cut and paste the following into it: (of course, pick different passwords)
Then open a command prompt and change to that directory. To run it, type “sc_serv.exe sc_serv.conf” (or “./sc_serv sc_serv.conf” for Unix and Mac). If everything is working properly, it should dump a lot of text to the screen and then just wait. This means it’s up and running. Don’t close that window! It’ll keep running until you press Control-C.
Next open your favorite web browser and connect to your Server’s address (http://127.0.0.1:8000). If it doesn’t load, it means your Server isn’t running. If it's working correctly, it should show a SHOUTcast logo and say “Stream Status: Stream is currently down.” That means its working correctly so far.
SHOUTcast Is Running
Next we’re going to configure the Source (MIXXX) to connect to the Server. In MIXXX, open Preferences and select the Live Broadcasting line. Enter the following settings:
Password: DJLoginPassword (or whatever password you put in the config file)
Stream Name: DJ Tantari (or whatever your DJ name is)
Description: (anything you want)
Genre: Live Mix (or anything you want)
Bitrate: 192 kbps (or higher)
Leave everything else as default and click OK. When you get done, it should look similar to this:
MIXXX Preferences For Test Broadcasting
Now you’re ready to stream! Click Options -> Enable Live Broadcasting to activate it. It should pop up a message box that says “Mixxx has successfully connected to the streaming server.” if it worked. Go to your web browser and refresh it. It should say “Stream Status: Stream is up at 192 kbps with 0 of 64 listeners” if it is working properly. Start playing some music and refresh the web page. Next to “Current Song:” you should see the artist and title of the song you’re playing listed here.
Listening is the final test. Open VLC and Click Media->Open Network Stream. Enter your address (http://127.0.0.1:8000) and click “Play”. Within a few seconds, you should hear two copies of your music playing, one through MIXXX and one through VLC. If you refresh your web page, you should see that you have “1 of 64 listeners”. It’s time to celebrate your first listener!
SHOUTcast Connected With One Listener
If you want to take this test to the next level, you can use another computer in your house. First try to open the web page in the browser to make sure there aren't any firewalls blocking the connection, then use VLC to listen. You’ll have to use the real IP address of your computer, not the loopback address (127.0.0.1). You can even let people outside your house listen, but you’ll have to open ports on your firewall (8000 and 8001/TCP) and give them your outside IP. They’ll be able to listen to you with VLC also. It’s a fun test and you can have your first outside listener.
Using a Real Server
Broadcasting for real is the same thing, except you need to use a publicly accessible server. Since I love all the geeky stuff, I set up a SHOUTcast server on my personal publicly accessible server. It has a public DNS entry so people can find it easily. I’m sure that’s too much for most people; you’ll want to rent a SHOUTcast server. These are available at many places in Second Life and elsewhere. You pay them a small fee each month. If you’re lucky, the club you’re playing at will have one that’s available to all the DJs who work there. However you get it, you’ll need the username, password, hostname, and port.
First, access the stream with your web browser. It’ll be in the form of http://hostname:port. Make sure that loads properly. More importantly, make sure no one is using it. If you log into it while someone else is using it, it’ll either fail or you might kick them offline and interrupt their set!
Then open MIXX and its Preferences to the Live Broadcasting tab. You’ll want to keep everything the same and only change the Host, Port, Login, and Password. Then try to connect. If it connects, play some music and refresh the web page. Try to tune in with VLC. You should hear your stream. Now anyone on the Internet who knows the Server’s URL (it’s hostname and port) can tune in and hear you!
How to DJ in Second Life
Now that you know how to broadcast to a public server, how do you get it into Second Life? You may have noticed that certain pieces of land have music. If you click the play icon (which varies from client to client, but usually looks like a music note in the upper right hand corner of your screen), you are tuning in to that SHOUTcast stream. All that is necessary is to assign your SHOUTcast URL to the land parcel. There are a number of ways to get your SHOUTcast URL into the land. First, to see what it’s currently set to for the land that your avatar is in, click the name of the land on top of your screen to get details about it, then click Sound. It’ll show you the current SHOUTcast URL for the land. You can copy and paste this into your web browser if you want to learn more about it; I use this all the time to troubleshoot music problems or just to get information about a DJ that’s currently playing. If you own the land, you can paste your URL right here and you’re done. Most of the time, you’ll be playing in clubs, so this isn’t an option. For this, you’ll need to use the DJ board.
Land and Sound in Second Life
The DJ board is a special scripted item that looks like a big sign. It tells the audience what song is playing. It also allows DJs who work for that club to sign in and switch the stream. (Setting one up is rather complicated. Luckily you don’t have to do this; usually it’s the club owner that takes care of it.) You’ll use it to start your show, and then to switch it to a regular radio station afterwards if there isn’t another DJ after you. By far, the most common one you’ll find is the SNX brand (http://www.shxonline.com/en/). To control this, you’ll need to set up your DJ Cards.
Set up your SNX DJ Cards using the online wizard (http://www.shxonline.com/src/ncwiz/). Fill out the form with your information. Make sure you choose SHOUTcast 1 or SHOUTcast 2 depending on your Server. (The Server’s web page will tell you what version you’re running.) Once you hit submit, it’ll spit out some text that you need to copy into Second Life notecards with very specific names. You’ll want to keep these handy and give a copy to your DJ manage who will put them in the club’s DJ board for you. You’ll need to generate a different set of cards for each club you play at.
When it’s time for a live set, you’ll need to change MIXXX’s Live Broadcasting preferences for the particular club, check Server’s web page with your browser to make sure you’re not conflicting with anyone, turn it on (which connects the Source to the Server), then click the DJ board and click the log in button. The DJ board will examine your cards and push your Server URL to the land. When customers arrive at the club and turn on the music, it’ll automatically load your URL into their Listener software (built into the Second Life client), connect to the Server, and they’ll hear your sweet tunes. Time for you to rock out!
But do you have anything good to play? Check out Chapter 2
Continued in Chapter Two Part One.