Wednesday, May 29, 2013

Integrated Media

Last weekend I did some traveling, and spent some quality time with the zipit at the airport and on the plane.  During this time I realized that I really wanted an mp3 player integrated into gmenu2x in much the same way as the internet radio player.  Rockbox and gmu have their place, but it's sorta nice having the music playing in the background on tty4, while still maintaining some control over it in gmenu2x.

The first thing I did was modify the mpg1234 script that's the heart of the radio app to handle mp3 file names with spaces.  This made it possible to create an mpg123 app for gmenu2x that works pretty much the same way as the radio app.  You can select a whole directory of mp3s with the space bar and view the "now playing" info without ever leaving gmenu2x.  However it was still a bit of a pain switching over to tty4 if I wanted to skip a song or pause it briefly to listen to the plane departure announcements.  I needed a way to send an f or a space character to the mpg123 process running on tty4 from within gmenu2x.  Fortunately we have the internet and it provided the basics for this tiny sendtty program, which I used to create 4 handy new media control utility apps in gmenu2x.

The Pause and Stop buttons should also work just fine with the internet radio app.  Eventually I plan on making yet another gmenu2x release with hot keys for the media control functions, as well as a w hot key for the wifi.  But I haven't decided yet whether to make the minor release numbers for iz2jffs V5 go to 11, or if I'm ready to start calling it V6.

Anyhow, here's the mpg123 app, including a sendtty executable for iz2s.

mpg123-iz2jffs-app.tgz

I might have to rework that a bit because the shiny new french version of iz2jffs seems to have replaced the underused terminals and utilities tabs with some more interesting stuff.  So the media buttons will have to go in settings instead.  I can live with that.


Before hitting the road, I did some work on the funkgold tracker program, fixing bugs and making it fit better on the the tiny zipit screen.  Here's a zip file with an IZ2S executable and modified sources.

funkgold-iz2s.zip

If you compare this screenshot to the one in the previous blog post you'll get some idea of what I did to make it workable with the default iz2s console font size.  For example, on this screen the Length field is hidden until you move the cursor off the Sample Name field.  Then it appears and obscures the right half of the sample name.  Some of the other fields use shorter abbreviations, so the whole thing just barely fits.

Enjoy.