How play music in Second Life: the definitive guide

Ok, now that I have caught your attention i can say: there is no definitive guide to audio in Second Life. Programs and solutions available for this activity are so many that it would take a book to talk about it. But there are some fixed points, and we will focus on them.

Goal: i would like to play a sound event (any type of music, self-produced, DJ, audio for a show, everything that comes to mind talking on audio) in Second Life, how can I do?

in any case, we will need four mandatory elements: the audio to be played, a program that plays the audio files, an interface to an audio server, an audio stream to be connected to the sim or parcel where we want to play the audio. Each audio event to be played requires a parcel to associate the stream URL with. Each parcel can only play one stream at a time, so when you hear about double or triple streams it’s just nonsense.
For simplicity, let’s pretend that we want to play music for our friends like a DJ.

What we need

Music

First, the music. We need good music, of course. But by good music i don’t mean the musical style, but a good quality audio file. So first of all prepare an optimized library of audio files, at least make sure that all the songs you play have the same volume. Cut the empty start and end parts, assign to files clear and correct metadata because these will be shown to listeners. There are many utilities that can help you in this challenging but qualifying job.

A classic example of audio editor is Audacity, open source and free, or you can try paid software like Sound Forge. Or, for the lazy, you can try a program like Platinum Notes, which in one fell swoop optimizes an entire folder. Both open source and commercial solutions are many, find the one that seems most suitable for you

The important thing is that before presenting yourself to the public your library be clean and tidy, or everyone will think that sloppy DJ, and you don’t want it, true?

There is one important thing to take into account though: then you will have to choose with which quality to send your audio to the listeners (audio formats: https://en.wikipedia.org/wiki/Audio_file_format), and here opens a somewhat complex speech.
In any case, know that an MP3 format 128 kbps 44.1 khz is the most used format and constitutes an acceptable balance between sound quality and load on listeners (we will soon see what this load on listeners is).

When we get to have to tell our DJ program where and how to send the audio stream and to which server, we will also have to indicate at what quality. The audio formats available in SL are many, but we will have to deal with our main enemy, lag, and find the right balance between audio quality and user experience.

A player

Second step: the player. We have our own optimized library, now how do I get someone to listen to it in Second Life?
Any program you use to listen music on your PC can be used to send music to Second Life (this is called audio streaming). There is no need for sophisticated DJ programs or special equipment that you may not know how to use. The simple Winamp compared to the other desktop players has an advantage, it has a dedicated Shoutcast DSP that allows you to connect the player to the Shoutcast server and play, and then i will use it as an example. But whatever program you use you will still be required to establish a connection with a server, and this server will provide you with the URL that you will have to apply to the sim or parcel where you are going to play.

Don’t be afraid, it’s simpler than it seems. If your favorite player does not have a Shoutcast interface (iTunes for example), do not worry. Download BUTT and you can broadcast your music in anycase. Butt capture any audio signal running on your pc and send it to a Shoutcast server, simple. But remember, any signal running on your audio card. If you are talking on a messenger with a friend, also your talk is sent with the music. Careful!

Typical client/server connection scheme for audio

A web service: Shoutcast

Third and fourth, how I connect the server, my player and the parcel

This is a somewhat technical step, which requires understanding what the relationships between a server and a client are, but nothing scary. You use clients and servers daily, for example if you are reading this post the browser is the client of a server that responds to your requests from the address (called the URL) slendowmentforthearts.wordpress.com. When you click on a link, the server receives your interaction and responds by sending new information to the browser. When you read your emails from web, is the same: a mail server send to your browser the emails you received. If you respond, your client (the browser) send the message to server, that take care to deliver the message.

So, nothing you haven’t already seen many times.

Any information you want to distribute via the internet requires a server that contains the informations and know how manage them, and a client that receives and interprets it. In the case of music, we will need a Shoutcast type server (there are different types of audio server, but the most used and certainly working is Shoutcast).

The most simple manner for get a Shoutcast server for broadcast your audio is rent it on Second Life Marketplace. Just do a little search for “Shoutcast server” and you get any sort of results.

The Second Life Marketplace offer Shoutcast Services

You will notice that the services offered are numerous and of different types. Look at the numbers: the number of listeners indicates how many users will be able to listen to your stream at the same time, not the overall total. For how many days, and with what audio quality.

Choose the type of service that seems most suitable for your purpose (remember that in a sim more than 100 people is impossible to have, and that for a decent quality audio MP3 128kbps 44.1mhz is enough) and buy it. After the purchase, you will receive all the infos needed to connect your stream to Second Life! Finally we are almost there.

What you will receive will generally is a notecard containing the essential information. Something like this (the example show a stream i rented time ago from a provider, data are not real and just for example):

Datacenter : EU
Shout login page : http://eu.down.net:2199
Land URL : http://eu.down.net:8199
Shout username : bb_kbass
Shout admin password : WChgxnpY16
Stream IP : 207.23.11.64
Stream port : 8399
Stream password : biMGlqySbY
Software : ShoutCast2
Listeners : 200
Bitrate (kbps) : 192
AutoDJ : false
Expiration date : 2022-07-22 05:46:16

Some infos are generic (datacenter, expiration date, software, autodj) but others are essentail for can broadcast our music. Let’s look at them one by one.

Login page is the web page that allows you to start, stop and restart your Shoutcast server. Type the address into your browser, enter the admin password and here is the server management panel.

Land URL is very important: this is the URL (the address of a web page) that connects the server to the parcel, the server to which all clients (listeners viewer) will connect when the user clicks on Play.

This is a very important point to understand: the listener does not connect to your computer, but to your Shoutcast server. You will notice that between when you as DJ click on the Connect button of your DJ program and the sound actually arrives at the listener in Second Life there can be a high delay, even 30 seconds. Second Life viewer use some libraries from FMOD for play audio (while for other media is used a little internal browser called Dullahan). Then the trip start be enough long: you send your music to Shoutcast server, that start play your music on server. Then the listener click the Play button on his viewer, the viewer ask the server, FMOD interprets audio signals coming from server and sends them to the listener’s sound card.

At this point the listener’s viewer will begin to play the audio, and this will produce continuous traffic on his PC (for this it is important to balance audio quality and user experience). On our example case, is generated a continous a stream of 128 kbps, until the listener stops the audio. This “audio” traffic is added to the normal sim traffic generated by visitors, scripts and so. A too much high audio quality can kill the user experience, take care of this

This important info must be inserted in the Sound tab of About Land window (World > Parcel Details).

Stream URL in the Sound tab of About Land window

In this way the parcel is ready to receive messages from your server. Second Life side we are done, now is time to take care of our player, connecting him to our server.

Every Shoutcast interface from any program ask you this data:

Stream IP: address of your server

Stream port: every server can have many ports, sort of house number

Username : your username as reported in the notecard

Stream password: your password as reported in the notecard

Plus, information about the audio quality of the stream you have rented for set what encoder use, format (MP3 the most common case) and bitrate, that you find in Bitrate (kbps). Bitrate value mean the max bitrate you can use, lower values are accepted, biggers can raise troubles.

Settings in ShoutCAST DSP in Winamp.

The same infos on Mixxx Live Broadcasting panel

Click Connect, play your music and magically the rave happen! 🙂

For who need a space for try, feel free to use our Soundbox at SLEA MusicLAB at:

http://maps.secondlife.com/secondlife/SLEA4/26/1

ps: this is just a first try, please feel free to send me any correction addendum as notecard in world (livio korobase). Featured Image: Party illustration vector created by pikisuperstar – www.freepik.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: