All music databases have to be created in the first place: the Database Management menu Option 1 will first prompt you to supply a name for the database you're about to create. The name can be anything you like, though it's case-sensitive and spaces will be converted to underscores:
If you were to supply what you see above as the database name, for example, you will eventually end up with this physical outcome:
You'll note that all created databases end up in the $HOME/.local/share/giocoso3/db folder, with a .db extension tacked onto the end of their name (and, as I say, with underscores used to replace spaces, but with any upper/lower-case letters preserved).
Since a database name maps to a physical file on disk, if you try to create a database with a name that already exists, you'll be told about the problem:
The only thing you can do at this point is press [Enter] and try typing a new name that doesn't conflict with that of an existing database.
As soon as you've supplied a unique database name that doesn't already exist, Giocoso will prompt you to point at the folder which sits at the root of the folder structure which contains your music files, so that a scan of them and their metadata can take place -and the scanned data will then be loaded into the new database:
This screen can be tricky to use properly! The general idea is that you use the upper 'pane' to move around your hard disk's folder structure, whilst the second low-height panel records the full path currently achieved. The tricky bit is that the two panels are inter-linked, so if you simply type a path in the second panel, the upper panel's contents will change to reflect that, just as if you press [Space Bar] on a folder name in the upper panel, that counts as 'entering into' the highlighted folder whose name thus gets added to the path appearing in the second panel. It takes a bit of getting used to, is the short version!
As mentioned, your job is to point to the 'root' or top-most folder in your music file storage structure. For example:
From this screenshot of my file manager, you can see I keep all my music inside the /sourcedata folder -but that, within that, there is quite the forest of folders and sub-folders! Thus you see a particular FLAC file stored inside a folder whose full path is /sourcedata/music/classical/C/Camille Saint-Saëns/Ballet/Ballet from Henry VIII... So the question is, what folder would, when pointed at, imply 'catching' all my FLACs in one go. It's no good me pointing at /sourcedata/music/classical/C, because though that would mean scanning Saint-Säens, Dittersdorf, Abel, Weber, Nielsen and others, I would not end up scanning and Aaron Copland or Benjamin Britten! Meanwhile, if I pointed at /sourcedata, that would catch too many FLACs -because I don't want anything in 'backups' or 'audio' to be catalogued as part of my music collection.
I should point out here that there's an implicit truth being touched on here: a good music catalogue is also a good physical folder structure! Ideally, your physical folder structure will mirror your logical data structures as contained within your FLAC metadata. Having physical and logical structures mirror each other like this means you can easily navigate your music collection using both standard tools (like a file manager) and logical tools - such as a selection filter in a music player! If the two are fighting each other, life gets much more complicated than it needs to be 🙂
Anyway: I digress. For my purposes, the correct folder to point to would be /sourcedata/music/classical. That captures all the A, B, C... and so on sub-folders (and everything they in their turn contain). Having used the folder-choosing dialogs to point to that location, Giocoso goes off to scan it for any possible FLACs, which can take a long time for a large music collection -and nothing much happens as it searches, so it can look like Giocoso has frozen: be patient with it! Eventually (after a couple of minutes, perhaps), you'll see this sort of thing:
You can see that it has worked out how many folders within the file storage hierarchy you pointed to contain FLACs... and it visits every single one of them in turn to inspect the FLAC files themselves. The percentage bar in the middle of the screen will gradually increment as the file inspections take place. Again, for a large music collection, this inspection process can take a long time: my 15,388 folders get scanned by an asthmatic 2012 i5 CPU in about an hour, for example.
This process is actually a 'full scan' refresh of the database contents -something that you can trigger yourself, without the initial database creation bit, by selection Database Management menu Option 3.
A full scan wipes every table in the database (apart from the PLAYS one, which obviously at the point of database creation has nothing in it anyway!) and populates it from scratch by extracting the metadata tags from every FLAC inspected, then aggregates the individual tracks into per-recording entries in the RECORDINGS table. When considering what data Giocoso takes from the FLAC files and stores in its database, it helps to think about what use it will eventually put that data... and the best example of that I can think of is the Play Music menu Option 2 search filter:
When you search for a 'Composer Name', you're actually searching what Giocoso calls 'Composer' -and that is extracted from the FLAC's ARTIST tag. Similarly, the 'Composition Name' search field is internally called 'composition', and that's extracted from a FLAC's ALBUM tag. The complete set of search field, Giocoso internal name and source FLAC tag is as follows:
- Composer Name = composer => ARTIST tag
- Composition Name = composition => ALBUM tag
- Genre = genre => GENRE tag
- Performer = comment = COMMENT tag
- Distinguishing Artist = performer => PERFORMER tag if present, otherwise the COMMENT tag, truncated at first comma, colon or open parenthesis
- Duration = duration => computed by adding the per-track durations of all FLACs housed in the same folder
It's important to note that Giocoso's composer is derived from the ARTIST tag; the composition name is derived from the ALBUM tag; and the complete list of performers on a recording is derived from the COMMENT tag (all exactly as explained in my Axioms of Classical Tagging article, in fact).
Confusion may arise between 'Performer' and 'Distinguishing Artist'! In Giocoso's world, 'performers' are the complete set of people performing on a recording: Herbert von Karajan, the Berlin Philharmonic Orchestra and Christa Ludwig would all be 'performers' on a recording of Mahler's Rückertlieder ...and would all be listed in the COMMENT tag of those FLACs. Only one of those artists counts as the 'distinguishing artist', though: the one artist whose presence distinguishes this recording of those songs from any other. Many people might think Christa Ludwig is that person; many others might regard Karajan as the more readily-identified person of significance: there's no rule of the Universe that says it should be one or the other... but it can only be one!
Well, in an ideal world, you'd pick one and write it into a PERFORMER tag: and if a dedicated PERFORMER tag is present, Giocoso will extract the data from that and stick it in a column it internally also calls 'performer' and which the search filter references as 'Distinguishing Artist'.
If you don't have a dedicated PERFORMER tag, though, then Giocoso improvises: it again looks to the COMMENT tag and grabs the first name it finds before the first comma and assumes that first name is the most important or 'distinguishing' artist.
So, if you've tagged your Mahler songs with COMMENT=Herbert von Karajan, Berlin Philharmonic Orchestra, Christa Ludwig (mezzo-soprano), and there's no dedicated PERFORMER tag present, then Giocoso will grab Herbert von Karajan (the first name before the first comma) and use that as what it calls the 'performer' and what the search filter refers to as 'Distinguishing Artist'.
Obviously, that makes a difference as to what fields you'd search if, one day, you fancied listening to something being sung by Christa Ludwig.
The automatic determination of a PERFORMER tag uses three bits of punctuation to determine where names stop and lists start: commas, colons and open brackets. For example, if your COMMENT tag was Utrecht String Quartet (Eeva Koskinen (violin), Katherine Routley (violin), Sven Arne Tepl (viola), Sebastian Koloski (cello)), the performer value in Giocoso's database would end up being 'Utrecht String Quartet', because the 'chop' at the first open bracket would break the whole string at that point. Another example: a COMMENT of Rinaldo Alessandrini, Concerto Italiano, Akademia: Ensemble Vocal Regional Champagne & Ardenne, Deborah York, Patrizia Biccire, Sara Mingardo would result in the distinguishing artist being Rinaldo Alessandrini, because the first comma kicks in as the delimiter at that point. Finally, Robert King: The King's Consort in COMMENT would become Robert King as distinguishing artist, because the first colon acts as the only available delimiter.
Generally, it's not a great idea to have to guess what a program has interpreted as the distinguishing artist if you're intending to use that data later on! It's therefore best if you make sure your tagging software creates proper, dedicated PERFORMER tags (as my own Semplice does, for example), long before Giocoso gets to look at the metadata. Then all you have to remember is COMMENT is all the performers, and PERFORMER is the one, special performer that makes this recording particularly memorable.
Anyway: once the analysis of the discovered FLACs has completed, the progress bar will disappear and be replaced with this message:
Press [Enter] to submit an 'ok' response, and you'll be returned to the main menu:
You might notice that the blue text at the top of the display now says you are using (in my case) 'Main_Classical_database': that indicates the newly-named database has been created and populated correctly and is ready to use: you could press P, then tap 1... and music chosen at random from your database will then begin to play. Be aware, however, that unless the Persistent Configuration File (see Administration menu, Option 3) lists (again, in my worked example) 'Main_Classical_database' as the default database, then the next time you launch Giocoso, this is not the database that will be used for other plays automatically.
In Summary, therefore: Creating a database means (a) providing a unique name that doesn't already exist; and (b) pointing Giocoso to a folder within which the music you want Giocoso to catalogue can be found, after which (c) Giocoso performs the equivalent of a 'full refresh' of the new database. Metadata tags embedded with each discovered FLAC are used to populate the Giocoso database with values that can subsequently be searched and filtered by, thereby making Giocoso play music you want to be played. A freshly-created database can be used immediately to play music, but won't subsequently be used automatically unless the Persistent Configuration file mentions it, by name, as the 'default' database.