Wednesday, August 21, 2013

Running Background Music & Sound Effects over a Remote Gaming Session

OK, so maybe this is something fellow gamers will actually want to read about.

Our current gaming group is run on-line; in fact, despite our successes (the ultimate measure being fun -- it's to the point where waiting for our weekly game night puts me in a tizzy) I've yet to meet a single fellow party member in person.  We use Skype for vocal communication, e-mail between sessions and MapTools for just about everything else.  Sometimes visual aids (a picture of what the characters are looking at, for example) are used by passing around image URLs over chat.  I don't know what the DMs use to create maps, though I know there are several options.  Anyway, a more recent addition was supplied by me:  A BGM/SE track.  In my opinion, this greatly enhances the experience.

The actual setup is crude, but it took a while to strike the right balance with what I had.  If you want to do something similar, you may have better options.  If you want to copy me, though, here's what you'll need:

A lot of instrumental music (a LOT of it)
A lot of sound effects
TWO computers run side-by-side (so one is preferably a laptop)
Computer 1: Session software - MapTools, Skype, your favorite browser
Computer 2: The BGM/SE files, Flash Media Live Encoder, WinAmp (or other audio player), IrfanView
A or other live streaming account
Earphones & microphone for Computer #1
A "dummy" mini-plug (you can just plug in speakers that are turned off)
Pinch of salt (oh wait never mind wrong recipe)

The music needs to be pre-sorted into FOLDERS, not playlists.  They also need to be thoroughly reviewed so that two pieces in the same folder don't differ too dramatically in style or loudness -- this takes a surprising amount of work.  Pieces that change too dramatically in tone or volume are unusable unless edited; this means invariably most of your clips are going to be either stock music or video game BGM -- basically, stuff specifically written for this sort of purpose.  The folders themselves are sorted by situations/events (combat, tragedy, travel, etc.), locations (dungeon, castle, city street, etc.) and tones (suspense, comedy, romance, etc.).  This is very labor-intensive work involving a lot of trial & error.  For example, after countless hours of listening & sorting I found I lacked a folder for "neutral" ambient music when the players are preparing for a dungeon crawl.  Modifying the folders is a constant work in progress.

The sound effects will include generic effects, like a door opening, to campaign-specific effects like gunshots (for a modern game) or melee weapons (for a pre-industrial game).  I use looping effects like wind or fire sparingly as they can get annoying fast.  I also wouldn't get session/adventure-specific because you won't be able to keep up and the SE folder can get unmanageable.  This will also involve some trial & error as you find you're missing a number of effects and never use others.  A lot of clips can be found on YouTube, but I got my start pulling effects from video games.

Computer #1
This is the gaming computer running MapTools & Skype; hook the earphones and mic to it.  Both Skype and the audio stream (i.e., the player run in your browser) will run from this machine, meaning you hear what the other gamers hear.  I also like to keep a Notepad file open, for taking notes and storing skill check strings that I can paste into MapTools.  For all intents and purposes it'll be indistinguishable from whatever machines your fellow gamers are running.  As such you can also keep your character sheet open on this machine, but in my case I use a junky hand-me-down laptop that doesn't even have office software, so for no other reason the sheet is kept on. . .

Computer #2
This is the "radio station".  FMLE is run with video disabled to optimize bandwidth for the audio, and pushes the stream to your live streaming account.  A file management system (typically Windows Explorer) showing the pre-sorted folders (in the directory tree) is kept open on the SE folder.  The BGM folders are right-clicked into WinAmp (which is set to shuffle & repeat playlist) using its context menu; the effects are dragged & dropped into IrfanView.  This allows me to mix the two rapidly and intuitively; the music plays in the background and the effects are provided as the situation calls for it.
The dummy plug is plugged into this machine; it's used to suppress this machine's speakers.  (This does mean you'll have to pre-adjust the main, WinAmp and IrfanView volume controls.)  You want to listen to the stream through earphones on the gaming computer.  Otherwise you can create a feedback loop as the Skype mic picks up the music from your own speakers; the other gamers in my group use earphones as well.

The "secret sauce" is how pre-sorting the music allows
for easy, simultaenous playback of BGM and sound effects.
The reason why I wound up using two machines is because without special software, you get a positive feedback loop that quickly overloads the stream.  For example, Skype ties your mic signal to audio input (duh).  Guess what FMLE uses when you're trying to stream music?  Audio input!  You could turn off the mic in Skype and stream your voice as well, but some gamers can't access the stream due to bandwidth limitations (bear in mind the BGM is ultimately optional) and the stream has a lag of several seconds.  That's not the only problem, anyway.  To create the audio stream I have FMLE monitoring "line", meaning, audio input = whatever audio output is coming from WinAmp and/or IrfanView (basically, "line" is whatever you happen to be listening to at the moment).  But where are the voices of your fellow gamers using Skype coming from?  Audio output!!  Also, you can't monitor the stream in your browser (also going to audio output) without creating a nasty feedback loop, for the same reason.  You can get around all these problems by using something like Virtual Audio Cable, but I've found these solutions typically involve software that's way more sophisticated than what my needs require.  Second, for audio balancing and tracking lag, it's important to monitor the stream as others hear it, not how it sounds at the source.  Honestly, running two machines was the most elegant solution, and it's not like a secondhand laptop is unaffordable to a middle-class nerd these days.  Lest anyone confuse me for a 1%-er, my "gaming computer" is an old office laptop I got for free when my previous employer junked the thing.

More on that lag I mentioned.  It's typically a few seconds, which may not sound like much, but try having a conversation with a friend where everything you say is deliberately delayed 3 seconds and you'll find it's longer than you think.  So, the main reason why I only listen to the stream through the gaming computer is to monitor that lag, so I know when to play a sound clip.  For example, most RPGs resolve attack and damage rolls sequentially.  Based on the attack roll result I can determine whether to play a "miss" or "hit" SE; if it's a miss I just play that SE as quickly as I can drag it to IrfanView.  If it's a hit, I try to time it to coincide with the damage roll.  It's never perfect (it's up to the gamer to decide when to roll for damage) and it doesn't need to be, but tracking the stream's delay can prevent the timing of the effect from getting too awkward.  Also, as mentioned before the BGM (folders) will repeat, but when I change folders due to a change in mood, I try to avoid abruptly clipping a track; knowing the delay helps here as well.  Finally, sometimes FMLE needs to be re-started if the delay gets excessive.

Is it a lot of work?  Yeah, but it's hella rewarding work.  Setting up a system that worked took a lot of experimentation because most live streams don't consider mixing it into a conference call, but honestly 99% of the time spent on this project was collecting & sorting audio clips.  My first few sessions running this were pretty awkward as well.  Sometimes I'd forget to change folders; and timing the audio clips so they enhance the DM's descriptions instead of stepping over them took practice.  Getting the other players saying "whoa" on a well-timed effect made it all worth it, though.

No comments:

Post a Comment