Giocoso Version 3 - Changelog

The Changelog will record code changes to the release version of Giocoso Version 3 as they are themselves released.

Changes are listed in reverse chronological order (i.e., the most recent releases appear first).




Giocoso Version 3.07 - July 14th 2024

This release was necessitated by the realisation that ImageMagick (the program Giocoso uses to display and manipulate album art when music is played) comes in two versions. Version 6 uses a program called "convert", for which a command such as "convert -resize 450x450 image.jpg" would be valid. Version 7 puts up a warning message if the 'convert' command is used, saying that its use is deprecated. It also changes the syntax requirements so that the replacement program, "magick", now requires that the commands come in "image - task" order. Issue a command such as "magick -resize 450x450 image.jpg" therefore, and you'll get an error message saying that no image file called "450x450" could be found. Instead, you have to say, "magick image.jpg -resize 450x450": get the image mentioned first, then say what tasks you want applied to it.

The syntax variation means that you can't just alias convert => magick. You literally have to issue different commands, depending on which version of ImageMagick you're working with. Up until very recently, Version 6 was the one all the distros Giocoso was tested on used by default. The recent release of KDE Version 6, however, means that I noticed some distros are now shipping ImageMagick Version 7 by default.

This release therefore adds code to (1) identify which version of ImageMagick is installed; and (2) issues an appropriate convert or magick command (using different syntax ordering as needed) depending on what version is detected.

In Giocoso Version 3.06, if you were using the 'wrong' version of ImageMagick, the results would be very ugly indeed:

Error messages everywhere, completely scrambling the program display! Version 3.07 now works correctly in exactly the same environments.

Note that you don't have to worry about what version of ImageMagick is installed but it turns out that Giocoso has to ...and Version 3.07 is where it acquires the capacity to do so.

A tiny functional enhancement has additionally been made to, the mini-script that allows you to control a playing instance of Giocoso proper. A new menu option has been added: "N to make notes":

Tap the N key as music is playing and mgiocoso will open a new terminal editor, runnning the nano text editor, with a pre-populated date & timestamp, plus an indication of the piece of music currently playing. You can then just add any observations about the recording you like, press Ctrl+X to save the lot, and the terminal window will then close and return you to the mgiocoso menu pane.  For example:

Each new note is appended to any existing notes, again date-and-time-and-composer-composition stamped, and are all saved in the one file: $HOME/.local/share/giocoso3/txt/classical_music_notes.txt. Added as a quick way of making observations about the need to re-rip or otherwise process a recording whilst it's playing and without having to use different programs or different text files scattered across my file system to do so!

Giocoso Version 3.06 - Released May 1st 2024

This release includes fixes for two small bugs.

In the Play Music menu, there are various ways of getting Giocoso to initiate music playback: Option 1 does random selection; Option 2 allows you to fill in selection filters and then a random selection of music that matches those filters is made; Option 4 lets you type in a SQL statement to select matching music; Option 5 lets you play from a playlist and so on. The principle bug fixed in this release is that all options except number 1 set their own 'SELECTIONS' value. SELECTIONS is the number of pieces of music to play in one Giocoso session. If it's set to 5, for example, then Giocoso plays 5 random selections with a pause between each, then stops playing anything at all. There is a default SELECTIONS set in the Giocoso configuration file: this is read when you first launch Giocoso and sets the 'default' number of plays-per-session... until something changes it. As I've just mentioned, all play options except number 1 set their own value for the SELECTIONS, over-riding that set in the configuration file. This is usually fine: if you take Option 2 and say 'play Britten choral music that lasts less than 20 minutes', you may well get 56 matches: SELECTIONS will thus be set by that option to 56, and 56 recordings will be played in succession, no problems. The trouble starts if you interrupt that play sequence. Say, you've listened to 5 pieces of short Britten choral music and now you'd like a change of pace and scenery. You thus visit the Control menu and issue an 'Autostop' request. Eventually, playing of music in the main Giocoso session will stop, allowing you to take Option 1 to initiate a new series of completely random plays. Again, that will all work well and new music recordings will begin to play without drama. Except that there will be 56 such plays, not the number you might have expected given the setting in the configuration file.

Option 2's count of music plays has set SELECTIONS to 56. Option 1 did not re-read the configuration file to discover that the default number of plays-per-session was 10 (say). Option 1 thus picks up whatever value for SELECTIONS the other Play Music menu items may have set.

The bug-fix is that Play Music music Option 1 now does explcitly re-read the configuration file every time it is used and will thus re-apply the configured number of plays-per-cycle found there. Changes to that number that are triggered by taking any other Play Music menu option do not now therefore over-ride the setting in the configuration file.

A second minor bug-fix is that when parsing the configuration file, Giocoso was setting a variable called CYCLES, rather than one called SELECTIONS. It didn't really make any difference if you had a properly-constructed configuration file, though issues would have arrived if SELECTIONS were not set to anything at all in that file. The new bug fix now resolves the issue by consistently inspecting and setting the value for SELECTIONS and ignoring CYCLES, which was never actually used in Giocoso code after that point anyway.

Giocoso Version 3.05 - Released March 6th 2024

This release is triggered by the addition of a new feature.

Giocoso has always paused between separate 'plays' in a cycle of plays. That is, in the configuration file, you configure 'plays per cycle' (say, 10) and 'pause between plays in a cycle' (say, 5). That means Giocoso plays something, then waits 5 seconds, then plays something else, then pauses 5 seconds, then plays a third thing and so on, until the 10th recording has been played. The pause configured in this way is literally a halt to Giocoso doing anything, other than giving itself time to clear its memory buffers, write the details of the last play to its database, and so on. It also gave your ears a chance to rest between plays, so you didn't have Philip Glass immediately blasting your ears the moment some Vaughan Williams died away to nothingness in a sea of tranquility!

That 'pause between plays in a cycle' is still there and hasn't changed in functionality at all.

The problem with it, however, is that it means that though one piece of music has stopped playing, nothing at all is happening in Giocoso, so the next play in the cycle hasn't yet been selected, let alone started to be played. That's a problem if you are the kind of person that likes to follow along with a recording using a music score. Since you don't know what Giocoso is going to play next, because Giocoso itself hasn't made that selection yet, there is no way to grab the right score before the next selection is eventually made and almost immediately starts playing.

Version 3.05 thus introduces a new 'seconds to wait before playback starts' configuration parameter (at the bottom of this screenshot):

As configured here, it means Giocoso will pause 5 seconds after a play has completed, then it will make a new music selection and (the important new feature!) then it will wait another 20 seconds before commencing playback of the newly-selected recording. That means Giocoso has made a new music selection and knows its name and other details. It can therefore display those details in the main program, so that you can see what will be played, well before it actually starts playing:

At the bottom of the main program display, you'll see a line of text that contains a 'countdown' timer, indicating how many of the configured seconds of wait are left before play commences. In this way, I know that Casella's Paganiniana is going to be played -and prepare myself accordingly. In real life, 20 seconds is going to be too short a time for that to be useful, of course -but the new parameter can be set to any number of seconds from 0 upwards.

If you've set the original 'pause between plays' to 5 seconds and, as in this example, the new 'wait before playback' to 20 seconds, you'll now end up with 25 seconds of total pause between plays, 20 seconds of which you'll know what's due to play next.

The two 'pause' timers can happily co-exist, therefore. The new one defaults to 0 seconds, so unless you specifically go in to edit your configuration file (Administration menu Option 3), you won't experience it at all. Personally, I've left my 'pause between' set at 5 seconds, but have the new 'wait before' timer set to 200 seconds. That gives me nearly three minutes to grab the correct score and turn to the right page before playback starts, which I generally find adequate.

It can be argued that having two separate 'pause timers' is a bit redundant -and I don't disagree. This is definitely a development of functionality I hadn't realised the need for when I first wrote Giocoso, and thus the original 'pause between' timer seemed fine at the time, but is now seen to fail to convey useful information. The original 'pause between' may be deprecated in a future release as a result. For now, however, the two are independently configurable, do different things and co-exist perfectly well.

Giocoso Version 3.04 - Released on February 22nd 2024

A minor bug fix and the addition of a new remote control option.

The bug fix is to deal with how Giocoso responds to the case of a file of the right name appearing to be a music database, but internally the file isn't a database at all. Giocoso has always checked that, if you tell it in the configuration file to use a database called (say) 'my music', a file called "my music.db" exists in the $HOME/.local/share/giocoso3/db folder. If it didn't exist, then you'd get a nicely-formatted error telling you that the program is configured to use a database that doesn't exist, and to fix this situation before trying to play music again.

The trouble starts if you cd to $HOME/.local/share/giocoso3/db and manually issue the command touch "my music.db", for now you've created a file of the right name which isn't, internally, a database. Giocoso responded to this situation by believing it was using a proper database and attempting to query it for music to play. That would result in this:

The searches would error out, but not before making a mess of the display as it scrolls off the top of the terminal window. The bug fix is to handle that situation and instead display a nice, tidy error message:

In this situation, the 'not actually a database' condition is being triggered. The bug-fix is thus cosmetic in nature, primarily: you still end up with a Giocoso system that can't play any music, either way! It's just it now ends up in that state more 'attractively'!

The new feature added to the program is an entirely separate script called, which can be launched whilst another, standard Giocoso session is busy playing music. It will give you a cut-down view of the normal Giocoso Control menu:

From here, you can pause, resume, terminate or adjust the volume of what's playing in that other Giocoso session. The menu is 'cut-down' in the sense of being narrow: it's designed to be displayed on a mobile phone or other equivalent mobile device, allowing you to control a remote PC that's playing music via an ssh connection over wi-fi, for example.

Giocoso Version 3.03 - Released on January 23rd 2024

A single, relatively minor and cosmetic bug-fix in this release, related to pausing and resuming music playback (Control menu, Option 5). In earlier versions, the pause/resume toggle didn't actually check whether anything was playing before attempting to pause it (bizarrely, it did check that something was paused before attempting to resume it. Why I remembered to do the one and not the other... go figure and mea culpa!), with the result that attempting to pause music playback that didn't actually exist resulting in a slew of ugly-looking (but benign) operating system error messages, like this:

The error messages cause the main program display to scroll upwards and thus to scramble the intended display appearance. If you type 'a' and 'c' at this point, you trigger the re-display of the Administration and Control menus and thus get back to a semblance of normality -but it's messy and shouldn't happen.

The bug-fix in 3.03 is that a check is now made that playback is taking place before an attempt to pause it is made. Should it be the case that nothing is currently playing, the output in exactly the same situation as before now looks like this:

A discrete message briefly appears to tell you that you're trying to pause something when nothing is actually playing... but that message disappears after three seconds and the program is left otherwise as if no menu options at all had been taken.

Giocoso Version 3.02 - Released on January 11th 2024

Two small enhancements are introduced in this release. First, Giocoso now displays the number of times a recording has been played as it starts playing:

That 'Previous plays...' bit of text at the lower left of the screen will now display the count of all prior plays of the selected recording in cyan/light blue. The count is determined by performing a unique count of the folder name in which the recording physically resides, as stored in the PLAYS table. This does mean that if you were ever to rename a folder (say, change its name from "Symphhony No. 1" to the more correctly-spelled "Symphony No. 1") the recording will appear 'new' to Giocoso: previous plays will be recorded with the old, incorrect name, so when the newly-named folder is first played, there won't be matches for it in the PLAYS table and the previous play count will therefore be 0.

More significantly, the second enhancement kicks in whenever the 'Only play previously unplayed recordings' option in the Giocoso configuration file (accessible via the Administration Menu, Option 3) is switched on. That option now causes the initial random selection of a composer to play to filter out any composer who does not have any unplayed recordings attributed to him or her. Technically, the composer selection is now 'select distinct composer from recordings where dirname is not in (select dirname from PLAYS)'. Thus, all composers with previous plays are excluded from the sub-select, and thus only composers with at least one un-played recording become selectable at this point. Since the composer selection process thus only selects composers who have candidate un-played recordings available, the subsequent selection of an unplayed recording by that composer is guaranteed to produce a successful result. Some more detail is available in this blog piece.

The net effect is to make random selections of unplayed recordings much faster than before when the great majority of recordings in a collection have already been played: instead of literal minutes waiting for a random selection to just happen upon an unplayed recording, Giocoso is now guaranteed to select an unplayed recording first time of asking, within seconds.

Giocoso Version 3.01 - Released on December 29th 2023

A single, simple fix of a quite major bug. When playing multiple pieces of music from a playlist, Giocoso would add the new piece's duration to that already reached. If the playlist had instructions to play pieces that were (say) 5, 20, 13, 12 and 15 minutes long, the first piece would have been (correctly!) recorded in the Giocoso PLAYS table as having lasted for 5 minutes. The second piece, however, would have been recorded as having played for 25 minutes (i.e., the 5 minutes of the first piece plus the 20 minutes of the second piece actually played). The third piece would similarly have been recorded as having played for 38 minutes: 5+20+13, rather than just the actual duration of 13 minutes, and so on. In short, the program was storing the cumulative duration of the entire playlist as it progressed through it, rather than the duration of each piece found within the playlist.

See this blog piece for more details.

The bug fix in this version is simply to zero the duration variable as each new playlist item is reached. The variable thus only stores the duration of the piece actually being played, and only that value is then recorded in the PLAYS table, which is what should always have been happening.

[ User Manual Home ]