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.13 - Planned for around December 15th, 2024.

This is a significant release (I was thinking about calling it version 4.0 but decided against it). It fundamentally changes the look and behaviour of the program, with the aim to de-clutter the interface and provide greater and more convenient control of the music playback process. Primarily, the key feature is that you don't need a second Giocoso (or Mgiocoso) session to control the playback behaviour of the principal Giocoso session: playback controls, such as stop, repeat, pause and so on are now baked-in to the main music-playing window and can be accessed from that principal session's interface by simple key-presses.

The most significant changes from the earlier version 3.12 are:

  1. Tidy-up: Some diagnostic/debugging code that was left in by accident during the last release has now been removed/tidied up
  2. Mgiocoso demotion: Mgiocoso defaults to not launching automatically when the main program launches (reversing the Version 3.11 change in this respect). It can still be configured to launch automatically, but by default won't do so. Note that if it was configured to launch automatically in Version 3.11 or 3.12, it will remain configured to launch automatically. You'll need to use the Administration menu, Option 3 to edit your configuration file to switch Mgiocoso back into 'do not launch automatically' mode.
  3. The play window of the main Giocoso program finally acquires the ability to respond to control commands during playback. IE, tap P to pause/resume; T to terminate; S to skip; V to change the volume and so on. All the commands that were previously listed under the Control menu (and which are still listed in Mgiocoso) are now available during music playback
  4. The Control menu being therefore redundant within the Giocoso main program window, since it's functionally available during playback (from the 'Play' menu), the Control menu has been eliminated.
  5. Issuing any control commands within the main Giocoso program results in the relevant control option being displayed in 'inverse highlighted' and, if it's a toggle switch, the control remains thus highlighted until the command is rescinded. For example: here's the new control menu displayed within Giocoso whenever music is playing:

Suppose I now press 'P' to pause the playback:

The 'Pause/Resume' text goes bright inverted -and stays that way until another press of the 'P' key untoggles the pause and playback resumes as normal. The same applies to any control option as it is taken, and 'sticky' options (Autostop, Pause, Repeat) remain highlighted until rescinded by a second press of the relevant control shortcut (A, P and R keys respectively).

  1. Since the control commands are issued on the now-playing screen, and since the menu options themselves indicate their status as either 'on' or 'off' (see the previous screenshot for an example of Pause/Resume being 'on'), no more 'X message sent/rescinded' confirmation messages are displayed within the Giocoso program itself. They continue to be displayed within Mgiocoso if Mgiocoso is used to control a separate playing session, of course.
  2. Typing 'M' when music is playing launches Mgiocoso in a separate window (or re-launches it, if it's already running). This option is not listed in the control menu options, but is consistent with the 'tap M on every menu' feature that was introduced in Version 3.11.
  3. Typing 'B' when music is playing launches the Sqlitebrowser database query tool (if it has been independently installed on the system). This option is again not listed in the control menu itself, but extends the functionality introduced in Version 3.11, whereby 'B' (or 'b') was offered as a listed option on the Reporting menu.
  4. The Giocoso 'playing pane' is now re-designed to display information about the currently-playing recording in a more structured format, similar to (but not identical to) what Mgiocoso displays as a result of the 3.12 release.
  5. Ctrl+C as a means of exiting the program is now prohibited. Terminate to stop music and then 'x' to quit is now the only 'approved' way of exiting the program.
  6. Every main menu now accepts a press of the [Enter] key to mean 'select first item on this menu': in other words, highlight the Play Music menu and press [Enter] and you've just done the same as manually typing a '1' for the 'Play music with defaults' menu item. Similarly, pressing [Enter] on the Database Management menu now means the same as selecting the 'Create a music database' menu item, and so on.
  7. Menus have been 'tightened up': there is no longer an attempt to use line spacing to convey some sort of information. For example, the old Administration menu looked like this:

The space between options 3 and 4 was trying to convey a distinction between editing text files (the first three options) and other, more 'admin-y' type operations. The new version of this menu simply lists all options without spatial distinction, as follows:

  1. In general, the re-formatting of menus has resulted in no change to the content or ordering of the menus themselves. That is not true for the Administration menu shown above, however. On that menu, the 'Check for program updates' has become Option 1 (previously Option 4); and 'Create or Edit the Configuration file' has become Option 2 (previously Option 3). The re-ordering of options is intended to reflect the importance of these two options to continued, healthy operation of Giocoso. Some other menus have dropped down a number or two in consequence. This is the only re-numbering/re-ordering of menus that has taken place.
  2. All previous versions of Giocoso have approximated the time that a recording will conclude by counting seconds since play began (and doing some maths with that number and the known time you started playing). Thus, if the duration of a piece is 120 seconds, and we know you started playing at 11:00:00, we know play will conclude at 11:02:00. Fine: but the problem with this method of calculation was that if you paused playback, the number of seconds since play began would continually increase (because time doesn't stop still!). So if you pause that play at 11:01:00, and are away for 5 minutes, when you resume at 11:06, Giocoso would not be able to work out that play is now due to finish at 11:07. Instead, it would fudge the calculation by monkeying around with the number of seconds since play started for as long as play was paused. This was OK as an approximation, and for short pauses, you may never have noticed that the resulting 'Ending at' time was not quite right. Pause a play for several hours, however, and the inaccuracies mounted up: you'd find a recording concluding with multiple minutes apparently still left to play. That was 'correct': playback always ended when the recording reached its actual end. It was simply that the 'ending at' calculation was 'off' by virtue of massive approximation. All that is now fixed. Giocoso now knows at all time how far through the playback process it is, accurately. It uses this information to deduce 'time left to play' as 'duration - amount of recording played'. It can therefore always add 'time left to play' to 'known current clock time' and compute an accurate concluding time, regardless of whether and for how long the music is paused. It should be noted that this change introduces a new software dependency on gawk (rather than plain 'awk'). This software dependency is sorted automatically during a fresh Giocoso installation of Version 3.13, but upgrades to Giocoso will not resolve it automatically [This needs checking!!]. On Arch, Fedora and OpenSuse, the gawk package appears to be part of the standard OS install anyway, so nothing needs to be done on those platforms; on Ubuntu and Debian and their derivative systems (such as Linux Mint), a manual install of gawk is likely necessary: sudo apt install gawk will achieve the desired result.
  3. There are some consequence of this new time management computation. Principal amongst them: when you pause, the 'Ending at' time in the header area of the main program display now increments (previously, it would display an asterisk), whilst the 'Played' figure stays fixed. For every second of pause, a second is added to the 'Ending at' time. When you resume, the 'Ending at' stops incrementing and the 'Played x of y' figure resumes incrementing. The other main consequence is that the 'Ending time' may adjust itself by an amount, up or down, as play progresses: this is largely down to the fact that it takes a finite amount of time to compute things as the play progresses, and the playback proceeds regardless ...so the two can get out of sync. It's also because Ffmpeg computes things to the millisecond and Giocoso simply truncates those off: if you do enough truncating, eventually the error compounds sufficiently to need correcting! If the computed ending time drifts from the previously computed time by more than 2 seconds, then the ending time will be adjusted. Minor variations within that limit won't be acted on, however.
  4. The configuration parameter "Pause between plays in a cycle (in seconds)" is now ignored and is always taken to be set to 0, even if it's actually set to something else. The newer parameter "Seconds to wait before playback starts" is now the operative way to introduce gaps between successive plays. The 'Pause between plays' parameter will be physically removed in a future release, but is functionally inoperative right now.

Giocoso Version 3.12 - Released November 11th 2024

This is a major release, bringing big changes to the Mgiocoso control panel that manages a separate, independent, music-playing Giocoso session. The interface has been completely re-designed and significant code changes now allow Mgiocoso to display full details about what is being played. Additionally, substantial changes to the main Giocoso interface have been implemented, along with under-the-hood improvements in the way Giocoso handles quitting and terminating music playback and child-process windows.

Major Mgiocoso changes are:

1. Self-refreshing. Mgiocoso now picks up on changes in the main Giocoso session every five seconds, so if Giocoso starts playing a new piece of music, Mgiocoso will eventually, after up to five seconds, know about it. Previously, a manual refresh menu option was provided: the new self-refresh capabilities sees that particular menu option removed in its entirety as being now redundant.

2. Menu mnemonics. Mgiocoso had numbered menu options (as the Giocoso control menu still does). 1 meant 'switch on Autostop', 3 meant 'skip the currently-playing track', 5 meant 'pause or resume' and so on. These are now replaced with alphabetic mnemonics: A for Autostop, S for Skip, T for Terminate, P for Pause and so on:

For backwards compatibility (and for those with a muscle memory!) the old numeric shortcuts still work, but they will likely be removed in the future. Note that 'R' used to mean 'refresh the display', but now means 'ask for a repeat play of the currently-playing recording'.

3. Status Reminders. Mgiocoso now reminds you of the major options that may have been taken in the past. A 'P A R' reminder displays whether Pause, Autostop and/or Repeat options are in effect:

Here, all three options have been taken at some point in the past. Suppose I press the 'R' key again, thereby rescinding the earlier repeat request:

Now the 'R' reminder disappears, but you know that the autostop and pause options are both still 'on'. The aim, of course, is to be able to see the complete state of Giocoso's play options at a glance.

4. Information display. Mgiocoso now better displays the full details of what's currently being played:

The green text now displays composer, composition name, distinguishing artist name, other performers, recording date and the number of previous plays. This display always, of course, depends on the quality of your tagging, but if you follow this site's Axioms of Classical Music Tagging (and/or use Semplice to do your tagging), you should be good to go. Note that the 'other performers' line will not include the distinguishing artist name, since that gets displayed on a line all of its own. If you have tagged Tchaikovsky's Symphony No. 3 as being performed by "Leonard Slatkin, Detroit Symphony Orchestra", for example, but have also said that the distinguishing artist was "Leonard Slatkin", then for the 'other performers' line, only "Detroit Symphony Orchestra" will be displayed, exactly as you see in the above screenshot. In the general case, if PERFORMER tag is set to X, and the COMMENTS tag is set to A, B, X, Y, Z, then Mgiocoso will display "X" on line 3 of the green text, and "A, B, Y, Z" on line 4.

The 'Ending at' time now auto-updates whenever pauses are switched on and off: when a pause is initiated, the display will show '*' ; when a pause is revoked, the display will show the updated 'ending at' time, which it did not previously do.

5. Note-taking in a separate window. In prior versions of Mgiocoso, if you tapped the 'N' key, you would be able to enter notes about a recording within the Mgiocoso window, like so:

Here, Mahler is playing in the main Giocoso window and I've tapped 'N' in the Mgiocoso window on the right. The display width constraints of Mgiocoso mean that it can be quite tricky to type notes in the resulting in-program editing window. New in Mgiocoso 3.12, therefore, is the ability to do this:

The notes editor now opens in its own window, independent of the rest of Mgiocoso -and with a default width that should be sufficient to make review and editing of notes much easier. There may be a significant pause between you tapping the 'N' key and the new window displaying, especially if you are running Giocoso/Mgiocoso remotely over a network: the X protocol that makes remote display occur over a network can be slow to initiate new windows like this. Be patient, therefore!

Note that the new editor window will only open if the DISPLAY environment variable is set to something specific. If the DISPLAY environment variable is set to null or is empty, then the text editor will continue to open 'in-program', as it did previously. When I connect to my music player via ssh from my desktop, for example, I always connect using 'ssh -Y hjr@musicbox' connection strings. The "-Y" bit ensures 'X Forwarding' is enabled for this connection and that automatically sets an appropriate DISPLAY variable, without manual intervention. When I tap 'n' or 'N' within Mgiocoso, therefore, these desktop connections always spawn a standalone text editor window, as shown in the screenshot above. If I connect to my music player via ssh from my mobile phone, however, I use a program called 'JuiceSSH' to handle the connection -and it can't do X forwarding. Connections from my phone therefore do not set a DISPLAY variable and tapping 'n' or 'N' from within Mgiocoso therefore automatically opens the text editor within the Mgiocoso display panel, as it always used to do:

If your DISPLAY variable happens to be set, but set to the wrong value, then the text editor won't open at all (because it's being told to display its screen somewhere that isn't actually accessible). That's a configuration of your operating system problem, not an Mgiocoso one! Remember, however, that you can always edit the notes file in whatever external text editor program you care to launch manually (it's just an ordinary text file stored in $HOME/.local/share/giocoso3/txt/classical_music_notes.txt).

Major Giocoso changes are:

1. New main program interface. Prior to this release, the main Giocoso program display looked like this:

It now looks like this:

Essentially, all the text 'help' on the right-side of the program display has been replaced with a Giocoso logo with a version number indicator and a program thumbnail. The logo will also scroll into place as the program first launches: the scrolling can be cut short by merely pressing a key. The help text was never terribly helpful and was no substitute for reading the program User Manual in any case! The program window remains the same size as before, since so many different screens used by the program need to display long paths and file names, or prompt for lengthy textual entries and so on.

2. Technical changes to the way music playback is terminated. When you took the 'Terminate all plays" option from the Giocoso Control menu (or from Mgiocoso's only menu), any ffmpeg session playing on the PC would be killed with a 'pkill' command. That was a risky and overly broad-brush approach to doing the necessary task of stopping music playback. New in this version is a subtly modified way of achieving essentially the same thing that restricts the kill command to ffmpeg processes owned by the current Giocoso session, and performs its work with slightly more effective syntax.

3. Control Menu refresh. Since Mgiocoso presents the options needed to control another music-playing session of Giocoso, it is appropriate that Giocoso's own Control menu mirror the options displayed by Mgiocoso. In Version 3.12, it does so: the layout of menu options is different (vertical, rather than horizontal), but everything Mgiocoso lets you do is now possible to do from Giocoso's own Control menu, too:

The alignment of Giocoso with Mgiocoso means, of course, that the Control menu's options are now accessed via alphabetical characters (A=Autostop, P=Pause, etc) rather than numbered items. However, the old key bindings have been retained for backwards compatibility, though they are not displayed. If your muscle memory means you tap '5' for Pause/Resume, tapping 5 on the new menu will still trigger Giocoso's pause/resume behaviour, for example, even though that option is not actually displayed on the screen.

4. Fix skipping a play bug. Version 3.07 introduced awareness of the different syntax used by ImageMagick Versions 6 and 7 when converting and resizing JPG or PNG images. Unfortunately, the code for skipping the current recording (pressing 'S' on Giocoso's Control Menu or in Mgiocoso) failed to include this modified code and thus produced an ugly-looking warning message on distros that use ImageMagick Version 7:

Version 3.12 corrects this oversight and adds the appropriate 'ImageMagick version handling code' into the skipping process, so that the 'convert command is deprecated' warning message should no longer be displayed.

5. Fedora 41 software dependencies issues resolved. Giocoso likes to display album art and other graphics goodies within the confines of a terminal session. It uses the img2sixel program to do so, obtained by installing the libsixel package. Fedora 41 introduced a new software dependency meaning that libsixel was no longer enough to do all that was needed: new in this version, the Giocoso installer correctly installs the libsixel-utils package which allows everything Giocoso wants to do run successfully.

If you've already installed an earlier version of Giocoso and are now merely updating to Version 3.12, this additional package is not automatically installed for you. Launching Giocoso in this state will therefore generate the following on-screen error:

To fix this after the upgrade to Version 3.12 is quite easy, however. Simply open a terminal session and type the command:

bash $HOME/.local/share/giocoso3/bin/aboscheck.sh install

...and follow the prompt to type in your sudo password. A scan of all Giocoso's software dependencies will then take place and the missing libsixel-utils package will be spotted and installed for you. You can then launch Giocoso normally after that installation is complete and no errors should be displayed. To reinforce the point: the only affects Giocoso running on Fedora 41, and only if a prior Giocoso version already exists before an upgrade to Giocoso Version 3.12.

6. Improvements in how Giocoso quits. If you happen to launch multiple Giocoso sessions, quitting one of them would make music playback in the other stop. Now fixed: as Giocoso quits, it only kills off child processes it itself launched. Another Giocoso session has a completely different set of child processes and those will therefore be left unaffected by the first session quitting.

Giocoso Version 3.11 - Released October 20th 2024

This release brings three main enhancements:

      • Recall previous Advanced SQL
      • Auto-launch Mgiocoso Control Panel
      • Launch SqliteBrowser GUI and open the current Giocoso database directly from the Reports menu

In detail:

Recall Previous Advanced SQL: If you use the Play Music menu, Option 4 to type in complex SQL statements to select the music you want played, you may end up selecting dozens or even hundreds of possible play candidates. Having listened to a few of them, you may want the playback to cease: you'd therefore take the Control menu, Option 1 in a second Giocoso session (or an mgiocoso one) and make the playback of music stop after the currently-playing selection has completed. Fine: there's no change in functionality there, at all. The next day, however, you may want to continue with the same SQL selection as before, but can't remember precisely what SQL term you typed the previous day. Or maybe the SQL statement was exceedingly long and complex and you simply can't be bothered to re-type it!

The new feature in Giocoso Version 3.11 is that you can now tap the letter K when sitting on the Play Music menu and your previous complex SQL statement is immediately rekalled. The place where you'd previously have been asked to type a selection WHERE clause will then be automatically populated with your last Advanced SQL Selection: you can then edit that statement to make it slightly different from before, or just click [OK] and have the same SQL statement re-submitted as before.

Here it is in action. First, I make an advanced selection for a combination of the work of multiple composers:

Notice that the screen is asking you, in green, to 'Type a WHERE clause'. I then submit this query by selecting the OK button and pressing [Enter]:

Suppose after playing one or two of the selections thus made I decide I have had enough music for the day: I terminate playback. The next day, I tap the letter 'K' whilst sitting at the Play Music menu and see this:

It looks much the same as before, except that the screen now says 'Previously-used WHERE clause': the main body of the selection form has been automatically filled-in for me and I can just re-submit the same query as before or start typing additional clauses to modify it before submitting it.

It's a minor convenience at the end of the day, but you might find it useful. It works because every time you submit an advanced SQL query now, Giocoso stores it on disk. This means each new use of the old Play Music menu, Option 4 over-writes the previous advanced SQL. If I take option 4, type composer like '%bridge' and submit; then take option 4 again and type composer like '%mozart'; then tap the 'K' option... the selection form will display composer like '%mozart'. The earlier selection for music by Bridge is wiped by the later selection for music by Mozart. Putting it in different words, the K option can only recall the immediately previous advanced SQL selection.

So: if you want to make a new advanced SQL selection, use Play Menu, Option 4 and start typing. If you want to recall the immediately-prior advanced SQL selection, use Play Menu, tap K.

Note that the K option recalls the previous SQL, not the previous selection of recordings. For example, if your previous SQL selection had been 'everything by Vivaldi I haven't played before and which lasts less than 15 minutes', on Day 1 that might match 48 different recordings. You play 18 of them, then terminate playback. Next day, you use the K key to recall the previous SQL: you'll now match just 30 different recordings, because your SQL says 'play things which haven't been played before' but you played 18 of the prior candidates the previous day, so today they don't meet the 'not played before' search criterion. The SQL is recalled, therefore; but the results of applying that SQL selection might vary. Also, be aware that Giocoso always randomises the order of its selections -so even if the number of results don't change, the order in which the recordings it has selected are played will not match the previous days' efforts.

Auto-launch Mgiocoso Control Panel: Every time Giocoso is launched, it will automatically launch mgiocoso, the control panel for Giocoso proper, in a separate xterm window. The second window can be closed if you prefer: it's entirely independent of the main program. Closing the main program window will, however, automatically close the secondary mgiocoso window. This behaviour can be turned off by setting an appropriate value for the new 'Automatically launch Mgiocoso' configuration parameter (see Administration menu, Option 3). It's a yes/no parameter, so will appear on the third page of configuration options. The default value for the parameter has been set to be 'yes', but an explicit 'no' will take precedence.

Note that if the new mgiocoso window is allowed to launch, it survives only as long as the main Giocoso window does: if you quit Giocoso proper, or close its window by clicking its 'X' button in its title bar, or type Ctrl+C to terminate the program ...then the mgiocoso subsidiary window will automatically close too. You can, however, manually close the mgiocoso control panel independently, on its own, and that won't cause the main Giocoso window to be closed. If you've closed the mgiocoso window and wish to re-open it, just tap the letter 'M' from any of the main Giocoso window's menu options.

Launch SqliteBrowser GUI: On the Reports menu, a new option ('b' or 'B') will allow you to launch the sqlitebrowser GUI program to inspect the contents of your Giocoso database. For this to work, of course, the sqlitebrowser program needs to be installed on your system -but Giocoso doesn't demand that the program be installed at all for its own functionality. It's therefore up to you to install it at your leisure (something like sudo apt install sqlitebrowser will work on Debian- and Ubuntu-based distros; an equivalent sudo dnf install sqlitebrowser will do the trick on Fedora and so on). If the program is not independently installed by you, tapping the Reports menu 'B' key will do nothing. If it is installed, then the currently-selected Giocoso database will be opened in Sqlitebrowser for you. Please note that this option is potentially dangerous: the database is opened in full read-write mode and is thus capable of being modified by an accidental mouse-click! It's also the case that if you open the database whilst Giocoso is playing music, sqlitebrowser may conflict with Giocoso and thereby prevent Giocoso recording its plays properly. Only use this mode of viewing your database if you are comfortable poking around with powerful relational database tools, therefore.

Giocoso Version 3.10 - Released September 7th 2024

Giocoso has to be able to derive its 'play candidates' from two distinct sources: either a database containing details of which recordings exist and where; or from a simple, direct instruction to 'play the contents of this folder', without a database being involved. When a database is involved, the database stores details of the duration of the music within a folder: that duration can then be simply read and used when Giocoso has to display (for example) the countdown timer in the program's main header area (i.e., 'Played 00:05:43 of 00:07:21' ...the '7:21' total duration is simply read from the database). When a 'play the contents of this folder' instruction is received, however, as a result of taking the Play Music menu, Option 3, then no database can be read to deduce the music's duration and instead a summation of the lengths of each FLAC found within the specified folder is undertaken to determine a total duration for all music within the specified folder. Giocoso knows when to use one calculation method or the other depending on the value of a variable called DIRECT_PLAY: if it's '0', then durations are database-sourced; if it's '1', then durations are calculated and summed by inspecting the FLACs themselves.

Unfortunately, I recently noticed that the DIRECT_PLAY variable was not actually being set correctly. Only Option 3 of the Play Music menu should ever have set it to '1', but that was not the case: other play options (specifically, option 4, which is the one I was using when I noticed the problem) would incorrectly set it to 1, too. Practically, this may not have made a lot of difference: it would just mean that computation of the duration of plays would take place when no computation was needed (because the database already knew the right answer). Version 3.10 is thus a minor bug-fix to make sure the correct value for DIRECT_PLAY is set when appropriate menu options are taken.

In pursuing this slight bug, I noticed another, slightly more serious one: if your music folder names contain a double-quote (for example, Symphony No. 3 "Heroic"), that gets inserted into the database incorrectly (in the example, it would be inserted as Symphony No. 3 ##@##Heroic##@##). This prevents plays of that music from being recorded correctly (or for its duration to be computed/displayed correctly). Now fixed. Note that the incorrect folder names remain stored in the Giocoso database, even after the upgrade, until such time as you perform a fresh fast or full scan for music files (Database Management menu, Options 2 or 3). The next such database refresh will correctly update all affected folder names.

Giocoso Version 3.09 - Released August 29th 2024

For abstruse, technical and internal management reasons, a completed 'play' of a recording may end up being documented in the Giocoso database's PLAYS table twice, with a 1 second difference between the two rows of data. See this blog post for a detailed explanation of the problem.

This release creates a slightly modified version of the 'before insert on plays' trigger mentioned in that blog post to stop this doubling-up of plays taking place. A proposed play-completion will have one second taken off its proposed completion time; that modified completion time is compared to existing completion times already in the database. If the adjusted completion time, composer, composition and dirname (i.e., full path and file name) of the proposed play-completion matches that of a completed play already in the database, the insert is failed, silently. The second row of data that differs from an existing row by just one second thus never makes it into the database.

Please note that this patch does not go back to prior records and check whether any such 'out-by-one-second' duplicates exist: it only prevents future duplicates. You can do a manual check of whether or not such 'fake duplicate completions' exist by taking Giocoso's Reporting menu, Option 5 ("Advanced Reporting by SQL") and pasting the following query in:

with faulty_records as (select t1.id as orig_id, t1.playdate, t1.composer, t1.composition, t2.id as adj_id, datetime(t2.playdate,'-1 seconds'), t2.composer, t2.composition from plays t1 inner join plays t2 on t1.dirname=t2.DIRNAME and t1.playdate=datetime(t2.playdate,'-1 seconds') order by t1.playdate desc) select adj_id from faulty_records

If any rows are returned by that query, previous fake duplicates exist. The IDs returned by the query are those belonging to the fake 'play completion' inserts. You could then issue a 'delete from plays where id=xxxx' statements to remove the fake duplicates from the database. That can only be done by using a tool such as sqllitebrowser, however -and I'd only recommend bothering doing it if (a) you are comfortable with issuing SQL against a relational database and thus know what you're doing; and (b) if there is a large number of 'fake completion' records. I had 16 in a database recording 17,000+ plays: I wouldn't bother trying to delete those 16 records, given only 0.09% of recorded plays were affected.

Giocoso Version 3.08 - Released August 1st 2024

I can't quite decide if this release fixes a bug or adds an enhancement! The problem was that when Giocoso was playing music, it would display a cursor marker (indicated by the red arrow in the screenshot):

The 3.08 release now fixes that and no cursor marker is displayed:

Tiny, but necessary! (Entirely incidentally, it turns out I released this on 31st July 2024, but got the date wrong and it's marked as being an August 1st release. I'm not altering that now!)

Giocoso Version 3.07 - Released 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 mgiocoso3.sh, 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 mgiocoso3.sh, 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 ]