I was getting ready to release version 3.36 of Giocoso yesterday: it contained a tiny, but significant bug fix, whereby anyone using a comma as a decimal delimiter (as they do in Europe, say), rather than a period/fullstop (as they do in the UK, for example) would have their music playback garbled when the new ReplayGain feature was in use:
The problem is that ReplayGain is invariably stored, by whatever tool that puts it there, in the form “-1.43”. Confronted with that decimal point, European Giocoso installations declare the ReplayGain value to be 'not a valid number' and do what you see above. A quick fix was thus implemented that forced the use of a decimal point delimiter, whatever a user's general PC's locale would say, and thus guarantee that a ReplayGain would be seen as a valid number, despite the '.' rather than the usual (for them) ','.
Anyway: as I say, that fix is “in” and ready to release… but a bit of mission creep, er… crept in and thus I've deferred the release of version 3.36 until late next week.
The mission creep is to do with a problem I've tried to tackle several times in the past: how do I get music playing on multiple devices around the house, essentially following me as I move about it?
Things started off nice and simply, after all: I have a PC in a drawer connected via optical out to a Douk DAC/Amplifier and a nice pair of speakers in my listening room. Since it's in a drawer, that PC is headless. I therefore tell it what to play by ssh'ing into it from my iMac desktop and tell it to start playing from there. Music comes out of the speakers, sourced from a NAS elsewhere in the house which the drawer PC has mounted. The iMac runs nothing itself but merely tells the 'drawer PC' what to do.
But now I move out into the conservatory. It's no good my 'drawer PC' playing anything now as it will play to the listening room speakers, not anything in the conservatory. I'm also not sitting at my iMac, so I can't really ssh into anything conveniently to initiate play. Previously, I got 'conservatory music' by fitting a little Raspberry Pi in there and attaching it to some speakers. With a small 7 inch monitor, I could log in to that Pi directly and launch Giocoso and start playing music, thanks to the Pi having an NFS connection to my music storage server.
This is not terribly scalable. If I now want to play music in my bedroom, I have an old laptop there, which is again NFS mounted to the music NAS, has Giocoso installed, and can be logged on to directly and I can therefore tell Giocoso to start playing music via the laptop speakers or (more usually at 1AM) via the BlueTooth headphones the laptop can connect to. I mean, it works… but it's three fat PCs, each with their own installation of Giocoso, each requiring direct access to start and stop playback. I at least invented Giocoso Pro so that whatever each of the three PCs did, there would be a single record of who played what, wherever the play took place. Giocoso Pro however makes no difference for the need for three independently-usable, fully-fledged PCs, complete with keyboard, mouse and monitor, in the first place.
The thing is, I have ready access to a device that could SSH into any and all of these PCs: my mobile phone. I could simply have three headless Raspberry Pi 3Bs in each room, each connected to the music NAS, each with Giocoso installed. Whip out my phone, ssh into whichever one I want to start playing music and… and then? Therein lies the perennial problem. Let me give you a clue as to what happens when I try that and launch Giocoso:
It reminds me of the Rosetta stone, only somewhat less translatable! You might just be able to pick out the standard Giocoso main menu: Play Music, Database Management and so on. But the rest of the display is just junk, for the simple reason that there's no Android or iPhone terminal emulator I know of that knows how to display sixel graphics properly. What you';re seeing here, therefore, is how a non-sixel-enabled terminal handles displaying the Giocoso program logo. The same thing happens if you start playing a recording and Giocoso tries to display its album art in-terminal.
Apart from the graphical glitch, the other problem with Giocoso on a phone is that phones are mostly portrait in orientation, whilst Giocoso is definitely a landscape kind of app: wide than it is tall! Hence, on this screenshot, you can see the one-line top bar menu has wrapped onto two lines. Phone screens just aren't wide enough!
It is, of course, for this reason that I invented mgiocoso ('m' for 'mobile'!): it was designed to be a 'portrait' app and it didn't display any graphics, so the terminal wouldn't fill up with nonsense:
Much better! Intelligible output, displaying what the main Giocoso running on the machine I've ssh'd into is already playing, and giving you the ability to pause, skip, terminate or repeat that play, too, all contained within the device you probably already carry with you everywhere. What's not to like?!
Well… you'll notice that you can't initiate play with mgiocoso. You can control an already-playing Giocoso session, but you can't start playback from your mobile device. In my three-room scenario earlier, therefore, I'm doomed to require a screen on each room's PC, or to access all of them from one PC with a screen, via ssh.
So the mission creep for Giocoso version 3.36 is this:
It's in portrait mode, so fits a mobile display. It doesn't have any graphics, so doesn't scramble a mobile display with hieroglyhics. And, drum roll please, it has a 'Play Music' menu option. This is the new Giocoso “mini-player”, which will be part of the next 3.36 release. It can run on a mobile phone, displays OK and will let you initiate playback. So, now I could have three headless PCs, each with access to the music NAS, each with Giocoso installed; I can ssh into each of them as needed, invoke giocoso-player.sh and then start music playing on whatever PC or Pi I've ssh'd into:
I don't see any album art, true enough: but I wouldn't want to on my mobile phone. I do at least get comprehensive data about what's playing and when it's due to end -and I still can control the playback to some extent, with options to Autostop, Terminate, Skip and Repeat available as they would be in a 'normal', full-fat Giocoso session.
The only slight fly in the ointment is that each of my PCs still has to be beefy enough to have an NFS mount capability, to have all the Giocoso dependency packages installed and to be able to run Giocoso (and ffmpeg) without glitching. The new mini-player mode gives me control via my mobile phone device, but it doesn't in itself alleviate the need for the PC its controlling to be reasonably powerful enough to play FLACs by itself.
Fixing that requirement is another bit of mission creep that has delayed the next Giocoso release a little… and I'll discuss it in some detail in Part 2 of this post, in a couple of days: for now, this post has gone on quite long enough!