Build a Giocoso Pro Server

1.0 Introduction

A Giocoso Pro Server is simply a PC (or virtual PC) that runs a copy of the MySQL database (or MariaDB). Such a computer does not need to be particularly powerful or well-resourced: a single CPU, 1GB RAM and (say) 40GB of hard disk space should be more than adequate, though of course more of any of these things is always welcome!

Since it is a server, there is no need for a fancy graphical desktop to make things look 'nice': a Linux distro that provides the bare minimum of computing capabilities whilst managing to run the database is all that is really required: so Arch, or Ubuntu Server or Fedora Server are ideal candidates, because they ship 'out-of-the-box' without GUI bells and whistles. Personally, my Giocoso Pro Server runs in a FreeBSD jail, so not even Linux is a necessity! [...] 

Continue Reading

Giocoso Default Search Algorithm

1.0 Pre-Version 3.30 Default Search

To understand the significant changes that Version 3.30 brings to the Giocoso music search algorithm, it's perhaps a useful thing to understand how the earlier version search algorithm worked. Underlying it was a belief that every composer should have an equal chance of getting the next-ranomised 'play', no matter that he or she only had 5 recordings in the collection whilst the likes of Bach and Mozart had hundreds (if not thousands!). The size of your contribution to the music collection should not determine the likelihood of you being selected for the next random play.

So, pre-Version 3.30 search had a two-stage selection process: first pick a composer, at random, from a list of all available composers, one row per composer. That meant every composer 'counted' as much as any other and had an equal chance of getting picked. Second, knowing the composer, find a recording by that composer. [...] 

Continue Reading

Uniqueness in Giocoso v. Giocoso Pro

1.0 Defining Uniqueness in Giocoso

Giocoso uses synthetic primary keys for its local database tables: each new insert is assigned a guaranteed-to-be-unique sequence number that is totally meaningless except for the fact that it's guaranteed to be unique. The reason for doing that was because the natural primary key for music is (as this article explains at length) a combination of Composer Name+Extended Composition Name and those things together can be very long strings, making searching and thus guaranteeing uniqueness rather slow (searching Jean-Joseph Cassanéa de Mondonville + In decachordo psalterio (Higginbottom - 1987) is always going to be slower and harder than searching for the number '5123', for example). When Giocoso was first designed, speed and lightness of touch were considered key design goals -and, indeed, remain so. If you run Giocoso Version 3.30 and above in local-only mode, your primary keys are still going to be synthetic sequence numbers.

Giocoso Pro introduces new design considerations, however: it requires the use of a 'proper' relational database (MySQL or its cousin MariaDB), probably on semi-dedicated hardware, so maintaining 'lightness of touch' can't really be considered a major issue any longer. Accordingly, Giocoso running in Pro mode uses new GLOBAL_PLAYS and GLOBAL_RECORDINGS tables which do use natural primary keys -though somewhat indirectly! If you take a recording's composer and concatenate it with its extended composition name, you can pass the result through a hashing algorithm to produce a 'hash value' which is guaranteed to be unique for those particular textual input values. For speed of computation Giocoso Pro uses the MD5 hashing algorithm to derive these 'semi-synthetic' key values. If you feed that algorithm the value "BeethovenSymphony No. 5 (Karajan - 1962)", which is a mash-up of one example composer+extended composition name, you get a return value of "8bd561c329191dc779d7b607ccfa6a03", which certainly looks ugly and synthetic, but actually counts as a natural key, because its source data are two completely natural key values. Feed the same algorithm the value "BeethovenSymphony No. 6 (Karajan - 1962)" and you get a return of "c22e22b360def939f694033cc78f18db": you get a wildly different result from simplying changing the text value of the symphony name from '5' to '6', so the hash value is truly unique per composer+composition data. [...] 

Continue Reading

How to Build a Giocoso Pro Server with Arch Linux

1.0 Introduction

Giocoso Pro is the name given to a MySQL (or MariaDB) database that provides details of what music files exist and what plays of them have taken place, shared amongst all your computing devices that might be involved in playing classical music. It is a very lightweight implementation of a relational database, with just two tables and not a lot of relations between them! Running such a database therefore requires very little in the way of hardware resources: it's recommended to have a dual core CPU, 2GB of RAM and 20GB of hard disk space, though more of any of these resources is always handy 🙂

Since it is a server, there is no need for a fancy graphical desktop to make things look 'nice': a Linux distro that provides the bare minimum of computing capabilities whilst managing to run the database is all that is really required -and that makes Arch an ideal distro for implementing Giocoso Pro, because it starts out about as barebones an operating system as it's possible to get. You choose what to add to it (not much, as it turns out!) and the end result remains extremely minimalist, yet fully functional. As such, this article sort-of reproduces my earlier article on how to build an Arch desktop, but simplifies things dramatically, as no desktop environment is involved. [...] 

Continue Reading

Running Giocoso Remotely

1.0 Introduction

Giocoso is my own digital music-playing software. It was always intended for local installation: the PC you install it on is assumed to be the PC you'll run it on and play music on. Giocoso's installation script is pretty careful, after all, to install icons, launchers and fonts that a local PC would need to be able to launch and run the program properly.

The irony is, however, that this is not how I run it myself! [...] 

Continue Reading

Giocoso Version 3 - Changelog

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

Changes are listed in reverse chronological order (i.e., the most recent releases appear first). For the most part, the main user manual for Giocoso will not be updated to take account of program changes that the Changelog details. You need to read the user manual in conjunction with this Changelog to get a full understanding of the current program functionality and its capabilities. Sometimes, I may go back and modify the user manual when changes appear to me to represent significant differences from the way the program was behaving when the documentation was originally written, but this is definitely not guaranteed. [...] 

Continue Reading

Giocoso Version 3 - User Manual

These links take you to the various sections of the Giocoso User Manual. If you are new to Giocoso, I'd strongly advise reading the whole lot in sequence; if you are in a hurry, at least read Section 4 (installing the program on various operating systems/distros) and Sections 5-9 (where each of the program menus is explained in some detail).

Users familiar with earlier versions of Giocoso should at least read Section 2, which describes what's new in this version compared to earlier versions. Section 3 is also pretty essential for such users: it explains how Version 3 migrates a Version 2 database during the installation process and what might go wrong in that process, together with workarounds. [...] 

Continue Reading

Play and Scan Locks

1.0 Introduction

Starting with Giocoso version 2.01, locks are placed whenever Giocoso is used to play music or scan music files for inclusion in a database. The lock prevents a second music-playing or music-scanning session being launched whilst the first is still running -because to do so means files needed by the first session would be over-written by the new session, resulting in both sessions getting completely confused!

Prior to version 2.01, for example, launching a second music-playing Giocoso session would cause the music already playing to be immediately halted, but the second session wouldn't then start playing music either. Result: total silence! Similarly, before version 2.01, if you launched a new database refresh process whilst the first was already running, the result would be that your music database would end up completely empty (of recordings, not plays): neither session would complete correctly. The new locks prevent this sort of 'collision'. [...] 

Continue Reading

Resuming, Repeating and Terminating

1.0 Introduction

Starting with Giocoso version 2.01, it is now possible to (sort of!) pause and resume music playback. It is also possible to request a repeat of the currently-playing recording or to request that all playback terminate immediately (again, both features of Giocoso version 2.01 and above only).

The pause/resume and repeat options are made available by two new runtime parameters (--resume and --repeat). [...] 

Continue Reading

Giocoso 2.01 - The Simplified Menu Interface

1.0 The Giocoso Menu Interface

Giocoso version 2.01 introduces an entirely new (and optional!) way to interact with and control the program: a menu interface. It consists of a simple screen of numbered options that you can take to achieve particular outcomes:

All these options are simply new ways of achieving what, in earlier Giocoso versions, would have been possible only by constructing potentially lengthy and typo-prone command line sequences of runtime parameters. To autostop in Giocoso version 2.0, for example, you'd have to open a new terminal and type giocoso --autostop. To re-display album art, you'd again have had to open a new terminal and type giocoso --artwork. With the new menu interface, you simply type '5 -> Enter' or '8 -> Enter' to achieve the same results, respectively. [...] 

Continue Reading

Giocoso - Changelog

This page describes the changes made in each point release of Giocoso since its first release as version 2.00 in July 2022.

Release 2.04 - 23rd April 2023

  • Enhancement: Added the sampling frequency to mini display output (eg, "44100Hz" etc).
  • Bugfix : Various issues arising from requesting no album art be displayed now resolved.
  • Bugfix : Added a test for reachability of absolutelybaching.com: don't fetch updated messages if the site is not accessible.

This release includes a slew of very minor tweaks and improvements. The most visible one is that the sampling rate and bit-depth are now displayed in the mini display window. That is, if the previous version displayed 1996 - Vocal - 00:42:23 (meaning 'this recording was recorded in 1996, it's genre is 'vocal' and it lasts for 42 minutes 23 seconds'), the display will now show 1996 - Vocal - 00:42:23 - 44100Hz/16-bit, with the "44100Hz" (in this case) indicating the recording was ripped from a standard CD, and the "16-bit" part indicating similarly. On music ripped from an SACD, though, you might see "192000Hz/24-bit" or "88100Hz/24-bit" and so on. [...] 

Continue Reading

Giocoso Playing across a Network

1.0 Introduction

This is a little bit out-of-scope for a set of documentation articles about how to install and use Giocoso, but I wanted the chance to document what I think is a really cool way to use Giocoso: to have it run on a small PC somewhere inconspicuous (in my case, it's the loft, and it's a Raspberry Pi 4) and send its audio signal across the home network to my desktop PC, which happens to be hooked up to a relatively decent set of audio gear and speakers.

To be fair, it's not really Giocoso that's able to do this (which is why this is a little out of scope!): it's actually the PulseAudio sound system, which has network playback built-in (rather as x11 has the ability to send graphical data across a network). All Giocoso does is to hook in to these PulseAudio features... and exploit them, mercilessly! [...] 

Continue Reading