Tuesday, July 26, 2011

MP3 player with Jack output

When we're rehearsing a (new) cover-song with the band we sometimes need to listen to the song while rehearsing it (but only on the rear occasions -cough!- that one of us did not find the time to do his homework ;-)
We have our mixer and speakers set up, my laptop connected, so whats the problem ?  Just play the darn MP3 !  Well, no...


With the band we use Hydrogen for a number of songs.  Obviously Hydrogen uses the Jack audio server, but my default music player (Banshee) does not.  And even though there are options to connect Banshee to Jack with a little hacking, I wanted a plain and simple solution.
After giving up on the Banshee hack i took a look at the other obvious choices, but they all needed the same hack to get to work (most use the same gstreamer backend).
At some point i got VLC to work with Jack, but the problem with VLC is that it only enables it's jack outputs when a song is actually playing.  As soon as the song stops, the jack outputs are gone.

Finally i stumbled upon a very simple player that has been around for a while and does just what i need it to do. Alsaplayer is the name.











Alsaplayer has a number of 'output modules' that allow it to be connected to several audio systems, including Jack.  Installing the 'alsaplayer-jack' package automatically installed everything i need :-)

I added a shortcut on my desktop that starts up Alsaplayer with some extra options :

   alsaplayer -o jack -d system:playback_1,system:playback_2 -s MY-AlsaPlayer


-o jack makes sure that alsaserver starts with the Jack output module
The -d option specifies the outputs that it has to connect to (in my case this is system:playback_1 and _2 : the main system outputs)
-s MY-AlsaPlayer just gives alsaplayer a decent name in Jack.
(There are lots of other options that can come in handy > check the man pages)


After installing alsaplayer and creating the shortcut I launched alsaplayer and created a playlist containing all the songs we need for rehearsals.  As a nice bonus alsaplayer seems to remembers the last openen playlist and reopens it automatically whenever you launch alsaplayer :-)


I like simple apps like alsaplayer.  

No comments:

Post a Comment