Now Playing In Game

I like listening to music while playing games, and I mostly play games that use the Quake engines, so yesterday while I was messing around with skins and things with Audacious I decided to set it up so that I could have a bind in Tremulous that would say the name of the song I’m currently listening to. I got the idea from all the the IRC and Pidgin plugins that say your currently playing song.

Here’s what I used to do it:

  • Audacious – SVN and packages for most Linux and BSD distributions
  • Song Change plugin – packaged with Audacious
  • Tremulous – SVN and packages/installers for almost any Operating System

First, download and install Audacious, or any other media player you like that lets you execute a command on song change. Then you need to enable the Song Change plugin, so start up Audacious and press Ctrl+P to open the Preferences, select “Plugins” on the left column, and then go to the “General” tab. In the plugin list look for the “Song Change” plugin and enable it by checking the box next to it. In the left column you now have a “Song Change” option, select it. Under command it says “Command to run when Audacious starts a new song.” and there’s a text box under it, this is where we put the command that Audacious will use to print to our game config file. My Tremulous base directory is located at “/home/tinman/.tremulous/base/” and I have a directory in there named “configs” that I keep my .cfg files in to keep things organized. For my command I put this:

echo “say /me ^2is listening to ^5%s” > /home/tinman/.tremulous/base/configs/song.cfg

  • echo – used to echo the text to a file
  • say – the command to say something ingame
  • /me – the command to say something as an action, in Tremulous many servers are running a patch that lets it be used like it is in IRC
  • ^2 – sets the following text colour to green
  • ^5 – sets the following text colour to cyan
  • %s – an Audacious format string that is substituted for the song name, %n also does this
  • > – tells echo to send the echoed text to a file
  • /home/tinman/.tremulous/base/configs/song.cfg – the location of the text/cfg file that the text is going to

Now we have Audacious echoing a saying with the currently playing song in it to a .cfg file that Tremulous can execute, but you may want to bind it to a key in your Tremulous config. Tremulous will execute a file named “autoexec.cfg” if it finds it in the “base” directory. An edited version of mine is available here: autoexec.cfg. In it I have the song configuration file bound to my keypad’s enter key with:

bind KP_ENTER “exec configs/song.cfg”

  • bind – sets a command to be executed when a key is pressed
  • KP_ENTER – is the name of the keypad enter key in the Quake 3 engine
  • “exec configs/song.cfg” – executes our song.cfg, which runs the command within it

Here’s a screenshot of the bind ingame:
Example

Mine is in the format of “Artist – Title”, you can change the title format of it in Audacious by selecting “Playlist” on the left column and then messing with the “Song Display” options.

— Edit —

Mac:

Many Tremulous players play on Mac and use iTunes as their main media player so I messed around with AppleScript for a while on my MacBook and came up with an AppleScript that can be found here: tremsong.scpt

— Edit —

Windows:

I had to see how this would be done, I got it working with Winamp using the Now Playing plug-in.

Install the Now Playing plugin and then start Winamp, press Ctrl+P to get to the Preferences. In the left column select “General Purpose” under Plug-ins. Select the Now Playing plugin from the General Purpose plugin list and click the button to configure it. A window titled “Config” should have opened, select the “General Options” tab and check the “Enabled” box, then change the “Song history” to 1 song. We want the config file saved locally, so go to the “Local Save” tab and check “Local Save Enabled”. Make sure you have a “configs” directory and then set the path to the path of your configs directory, I used

C:\Program Files\Tremulous\base\configs\

If you’re using a TJW backport binary then you may want to set it to your user’s Tremulous directory, which is

C:\Documents and Settings\<username>\Application Data\Tremulous\base\configs\

where <username> is your user’s name. Change the “Html-filename” to “song.cfg“. Now select the “Html Settings” tab and check “Use template” in the right column. The default template is “template.html”, that’s the default template and is full of HTML so you need to modify it. Click the “Apply” button and leave the “Config” window.

Open up an explorer window, Winlogo+E, and then navigate to your Winamp install directory, by default it’s

C:\Program Files\Winamp

The Now Playing plugin should have created a folder titled “np_templates”, open that up. The “template.html” file that Now Playing uses is in here, right click and open it with Notepad. Delete all the text from it and then paste the following text into it and save the file:

say /me ^2is listening to ^5[np:Artist1] – [np:Title1]

By default it updates the song every 5 seconds.

Note: Do not create the song.cfg file, the Now Playing plugin will create it for you.

Have fun, but don’t spam it! 😛

Bright Eyes

I saw a Bright Eyes concert yesterday and it was awesome. Most of the songs played were off of their latest album, Cassadaga, but some were older. It was at the Riviera Theatre in Chicago, which I expected to be large, but it wasn’t that big at all. Me and Corey stood the whole time, we heard most of the opening band’s performance and then waited on our tippy toes to see Bright Eyes take the stage and when they did the place went wild. There was a video behind the band playing in sync with each song which had hands doing random actions, such as finger painting with food dye, flattening flowers with a rolling pin, and scribbling with coloured pencils and then drawing a heart over the scribbles only to tear it apart and scribble all over again. For someone who has never seen a music video like Bowl of Oranges it would have seemed really weird, but for a fan of them it wasn’t that unexpected, just cool and amusing. Conor Oberst jogged the stage toward the end of each song so even though it was a standing show most people got a good view of him at one point or another.

I need to go to more concerts. 🙂

Feisty Fawn and a LAN

Ubuntu 7.04 (Feisty Fawn) was released on April 19th, 2007. As you can probably guess, I’m running it now and it’s good. The first thing noticed is the increased boot speed, it gets faster with each version. I’m finally running 64-bit with no problems, I even have plugins running on a 32-bit firefox thanks to a guide on Ubuntu Forums.

I switched to the Listen music player after I noticed that Rhythmbox had created huge XML files to use as song info databases and it listed a large amount of files to “ignore” that weren’t even in my music directory. It looked was worse than an iTunes database to me. Listen has .db files that are small and non-intrusive. I also like that Listen has Last.fm, Wikipedia, and access to lyrics built into it, I commonly use them when I find a great song.

At the LAN Party we played some Unreal Tournament GOTY, UT2K4, Tremulous, DPBall 2, and World of Padman.

The Setup The Toms
Oh Snap! Smiley
Smiley Spook
Spook typing on a distant computer Crash and a movie, 300

loudQUIETloud

“Got me a movie
I want you to know”
Debaser – The Pixies

loudQUIETloud: a film about the Pixies will have a limited theatrical release in September. The film will open at the Roxie Cinema in San Francisco and the Cinema Village in New York City on Friday, September 29th. New theaters and times may be added, so please check back to get the most up to date locations and showtimes.

I can’t wait for this movie to come out, the Pixies are one of my favorite bands. Debaser being such a great song that my computer is named Debaser.

tinman@Debaser:~$

I’m hoping that the Smashing Pumpkins (also reunited, and recording a new album) will produce a movie on the history of their band.

Ah, beautiful scripts and chords.

So, I’ve been tinkering with Fruity Loops Studio 6 for awhile now. Learning and making music. It’s a pretty nice program, and you don’t need a MIDI Keyboard to use it either. (Unlike Reason, which I use for drum loops).

So in the meantime of me learning, (and figuring out plans for the game) go listen to some of my scrap-ish work here:
http://www.newgrounds.com/audio/view.php?id=1007188

~vt