Semplice Version 2: SuperFLACs

1.0 Introduction

Back at the beginning of January 2021, I wrote a blog post in which I deplored the tendency of classical music to be presented (on CDs, the radio and so on) as a series of 'tracks', rather than as a 'whole composition'. I pointed out back then that 78s didn't come with 'tracks' (though they were short-playing enough probably not to need any!), and that quite a lot of 33⅓ LPs also didn't. Tracks didn't really become a 'thing' until the invention of the CD -and they are (in my view) totally inappropriate for classical music, anyway. By this I mean: Beethoven didn't write four separate 'things' he threw together to make a symphony. He wrote a single symphony that happens to be comprised of four distinct, but related, movements. Accordingly, I would want my music collection to have a single 'item' for 'Symphony No. 5'. I might well be cognizant of the fact that it has 'sections' within it with names such as 'Allegro con brio' or 'Andante con moto', whose existence might be acknowledged by some piece of logical metadata; but I certainly wouldn't want to organise my physical music structures around the existence of movements. It's a bit like quarks in physics: they have no separate existence and cannot (should not, in the case of classical music!) be accessible individually. Those are highly personal opinions, of course: you're welcome to disagree and to listen to your music however you deem best for you!

Apart from such 'metaphysical' opinions about the non-tracky nature of classical music, there are practical matters to deal with, too. Computers store digital music on some sort of disk storage; disks require a file system; most file systems perform better when you present them with a few large files, rather than with lots of small ones. Therefore, turning a 4-track symphony into a single file called 'Symphony No. 5' is better for your file system than making it store 4 separate files, one per movement, on it. In the case of a Handel oratorio, you might even have over 80 or 90 separate 'tracks' on a double CD set, so there the advantage into storing the work as a single 'work' and not 90 separate sub-works is even more pronounced.

Another practical reason for thinking in this way is that some digital music players cannot do 'gapless playback', where one movement is supposed to play seamlessly after the previous one ends, in attacca style. I discussed this in some detail in an old review, containing audio examples, of Windows media players. If you present such a player with a single FLAC which is comprised of all the music that the four separate tracks on a CD contained, then there are no transitions between different digital files to be managed -and thus even players incapable of doing proper gapless playback now cope just fine, because they've only got a single file to worry about.

It is for these various reasons that Semplice Version 2 offers you the ability to combine separate per-track FLACs into single per-composition 'SuperFLACs'. The name 'SuperFLAC' is one I kind of cooked up, I'm afraid, and has no real validity outside these pages! It simply means 'a single large FLAC file that contains concatenated audio from multiple, individual source files, with an embedded cuesheet that describes where each source file began and ended'. Four files, each representing different movements of a symphony, are thus combined into a self-describing single file which contains the music for the entire symphony.

Semplice also offers you the chance to split a SuperFLAC back out into its component per-track files. To do this, it simply reads the embedded cuesheet (which describes when each original source file stopped and started) and uses the stop/start times to cut the SuperFLAC up into smaller pieces. A single file containing all the music for an entire symphony can thus be broken out into the four files, each one representing a separate movement, which were on the original source CD, should you ever want or need to do so.

Finally, if you buy your digital music in the form of FLAC downloads, you may occasionally come across vendors that supply the download in the form of a single giant FLAC, but with an accompanying external cuesheet which describes where each component 'track' stops and starts within the single file. Semplice therefore also has the ability to split a single FLAC out into component tracks based on the contents of an external cuesheet.

All these capabilities are made available under the 'SuperFLAC' menu option in Semplice. You do not need to have used any other Semplice menu options (with one exception which I'll describe in Section 2 below, in the comments about the names of SuperFLACs) before using any of these Cuesheet options, but you do need to have launched Semplice from within a folder full of FLAC files in the first place, or to have tapped the W key to set a working folder that contains a bunch of FLACs.

2.0 Configuration Options

In the Semplice configuration file, there's only one parameter that controls how the SuperFLAC functionality behaves:

The parameter Auto-delete per-track FLACs after SuperFLAC creation controls whether or not source files are deleted after they've been combined into a SuperFLAC. The default is 'no', and that's the setting I'll employ in what follows, too.

2.0 Creating SuperFLACs

Let us step through a worked example. Suppose you have a folder containing FLACs ripped from a CD, like this:

We see the folder consists of music belonging to a single composition (Britten's Mont Juic suite), and has been ripped from a CD in the form of four separate tracks or movements. Semplice is going to be asked to combine these four individual files into a single SuperFLAC that contains all the music for the suite in just one file -but with an embedded cuesheet that describes when each movement within the single file stops and starts.

I therefore launch Semplice from within this folder, or tap W to set this folder as the working folder, and take the SuperFLAC menu, Option 1 to merge these tracks into a SuperFLAC. The program immediately responds:

The 'Merging files...' text and spinner indicates that work is being done. If you were to watch progress in your file manager, you might see something like this:


That is to say: any embedded album or cover art found in the first FLAC in the folder is written out to the folder as a file called 'albumart.jpg'. An analysis of all the FLACs in the folder is then performed, working out their durations: that information is written into a text file called cuesheet.cue. Finally, Semplice starts concatenating the per-track FLACs in the folder into a new FLAC which has a '-superflac' temporary name: it's this part of the proceedings that (a) can take quite some time; and (b) means that you temporarily need double the space to house both the per-track FLACs and the -superflac equivalent. Incidentally, it's because the main part of the file name for that '-superflac' FLAC is derived from the ALBUM tag found in the first FLAC's metadata that, if you haven't tagged up your files at all before attempting to create a SuperFLAC such that the ALBUM tag is empty, you'd see this error message:


If you use Semplice's own tagging menu to add tags to files, it's the COMPOSITION tag that you want to fill in at this point. Ideally, however, you'd create SuperFLACs after carefully tagging the per-track FLACs, not before... so this shouldn't be an issue that affects you!

Anyway: once the concatenation process is complete, you'll see this message:

Here, you are prompted to delete the per-track FLACs that have now been merged into a new SuperFLAC. You can say 'no' here, in which case control returns to the SuperFLAC menu and the folder on disk will be left containing both the original per-track FLACs and the new per-composition SuperFLAC: creating SuperFLACs is a non-destructive process, right up until the moment you choose for it not to be!

If you say 'yes' at this point, however, then the per-track FLACs listed in the dialog are deleted from disk and the SuperFLAC is renamed to remove the '-superflac' designation:

As you can see, any PDFs or other files that might have been in the folder remain in the folder: the merging process only ever affects FLACs, nothing else.

You can see from this, I hope, that creating SuperFLACs is not exactly difficult!

3.0 Checking the Metadata

If we now took Tagging menu, Option 7 to review the metadata associated with the FLACs in the working folder, we'd see something like this:

This is the first part of the metadata, at least: you can see from the '58%' indicator that the data scrolls off at the bottom. We'll see that in a second. For now, note that all the 'standard' tags are present in the new SuperFLAC: composer, album, genre, performer and so on. Where did that data come from, given the FLAC we're looking at has only just been created? From the first of the original FLACs. If that was tagged correctly, its tags are taken to 'stand for the whole' and are thus saved and applied back to the SuperFLAC once it's been created. More interesting, perhaps, is Tag [:10]: CUESHEET... because that's the start of the embedded cuesheet which describes the internal contents of the new SuperFLAC. Let's take a look at its main contents, since we can only see the first line of it in that screenshot above:

The cuesheet is constructed with a modest amount of metadata description (ARTIST, PERFORMER, FILE... and so on). Then there's the crucial stuff: each 'component' track is listed in turn, with a start time only. You have to look at the next track's start time to work out how long this track lasts. For example: Track 02 is said to start at 2 minutes 56 seconds (and a bit); Track 03 at 4 minutes 42 seconds. Therefore, we can deduce that track 2 lasts for 4:42-2:56 = 1 minute, 44 seconds. Compare that to the CD track listing:

...and we're pretty close. The difference between 1:42 and 1:44 is a bit of lead-in plus a bit of rounding, mostly on the part of the record company when printing the CD booklet! Absolutely no music signal (including silence) is actually lost when creating SuperFLACs, put it that way.

Each of the tracks listed in the embedded cuesheet can be thought of as a 'virtual track' within the SuperFLAC: we know when it starts and we can work out how long it lasts. Some music players can actually use that data to present a SuperFLAC to you as if it was literally a bunch of individual FLACs sitting on your hard disk:

That's the DeadBeef music player (stupid name, excellent player!) displaying four 'tracks' and allowing each of them to be selected and played individually, if that's what you wanted to do (and again, note that DeadBeef has done its own maths and rounded to achieve different apparent timings again: the differences don't represent anything real or audible). Alternatively, of course, you could play this SuperFLAC in my own Giocoso music player (excellent name, excellent player!):

...and this makes no attempt to display or play tracks, but is simply going to play the entire piece as a single composition. The choice is yours: creating a SuperFLAC doesn't mean you can never access individual movements again in the future. It just means they are not front-and-centre in your way of thinking about music unless you want them to be.

4.0 Splitting SuperFLACs

Having experimented with SuperFLACs, you may decide that you don't particularly like them and wish to reverse the merging process that created them. That's easy to do, fortunately. It's what Semplice's SuperFLAC menu, Option 2 will do for you. As usual, before taking this menu option, you either need to have launched Semplice from within a folder containing a SuperFLAC you wish to dismantle, or tap the letter W to set as a working folder a directory that contains a SuperFLAC.

Let's start, once more, with this state of affairs:

That's a single, 50MB SuperFLAC, plus a PDF booklet that is irrelevant for current purposes. When I take the SuperFLAC menu, Option 2, this immediately happens:


The 'splitting masterfile asunder' message appears at the bottom of the program display area, along with a spinner to indicate that work is being performed: as is to be expected, if you were splitting a SuperFLAC of Wagner's Ring, you could expect to be sat watching the spinner for quite a long time! For smaller compositions, much less time needs to elapse -but be patient anyway! One way or another, you'll eventually see this:

Click [OK] or press [Enter] to dismiss that message and you'll be returned to the SuperFLAC menu once more. And that's pretty much all there is to un-SuperFLACing a SuperFLAC!

If we check the results of this work in our file manager, we'd initially see this:


The first thing we spot is that the original 50MB SuperFLAC is still present on disk. Semplie never deletes a SuperFLAC it has been asked to split: that means you need double the disk space, at least temporarily, of course. It also means that, again, Semplice is trying hard to be non-destructive when doing these FLAC manipulations: if you don't like the result of the de-merger, you've always got the original SuperFLAC to fall back on. The second thing to note is that a new sub-folder has been created for us, called 'split'. If we drill down into that, we see this:

...and now we have four individual FLACs once more. You'll notice that they've all been named nicely and that all appear to have embedded album art (given that the file manager icon for each file is a representation of the cover art for this work). That's all been extracted from the original SuperFLAC and then re-applied back to the per-track files. Again, we can check that with Semplice's Tagging menu, Option 7:


I've positioned things here mid-scroll: Track 1's metadata is disappearing off the top of the screen, with Track 2's coming in to view from below. You can see that the 'canonical' tags are all there, safe and sound, right down to the existence of 'good album art'.

5.0 Splitting with External Cuesheets

The SuperFLAC splitting or de-merging feature is primarily intended to work when the cuesheet describing the 'virtual tracks' making up a SuperFLAC is embedded or stored within the SuperFLAC, as was described in Section 4 above. However, it can also work on files which only have an external cuesheet. Sometimes, you may purchase a single FLAC download, accompanied by an external cuesheet, like this one:


Here you see the 250MB+ FLAC accompanied by a standalone .cue file. If you launch Semplice from within such a folder (or use the W key to set it as the working folder) and attempt to split the FLAC using the SuperFLAC menu, Option 2, this happens:

...which is exactly the same as what happens when the cuesheet is embedded! The 'splitting masterfile...' message appears and is eventually followed by a confirmation message. Looking back in the file manager, we see:

That tells us the split per-track FLACs are sitting in the 'split' sub-folder, as usual. It also tells us that the cuesheet has been deleted from disk. This is not a drama however: it's disappeared off the disk because, as part of the split process, Semplice actually embedded it within the SuperFLAC! You can look in any metadata viewer and see it there:

So that's the metadata for the original single FLAC file: it has a CUESHEET tag, clicking on which (in Kid3 metadata editor) reveals its full contents. Back in the file manager, if you were to inspect the 'split' sub-folder, you'd see:

The per-track FLACs are there, in good health. Generally, you will find that the metadata embedded into these per-track files won't be very extensive, because the source cuesheet is usually missing a lot of usable information. However, that's easily rectified by changing Semplice's working folder to the 'split' sub-folder and working your way through the Tagging menu!

Anyway, the point is: Semplice's SuperFLAC splitting capability doesn't really care whether the cuesheet driving the split is external or embedded. It will handle either with equal ease.

There are a couple of scenarios where things might not go so smoothly, however. The first one is if the external cuesheet is in a weird format: if Semplice cannot parse it correctly, it will either bomb out with an error, or the split folder it creates will end up not containing anything. There's no real fix for that: it's up to you to obtain a cuesheet that parses correctly because it uses the correct syntax (which is rather convoluted!) One common error I've encountered, however, is that the cuesheet is often prepared by someone who was obviously using Windows. Windows ends lines with a carriage return and a line feed character (CRLF); Linux generally ends lines with simply the LF character. Some text editors let you swap between the different line endings, so sometimes its enough to find your text editor's line-ending setting and flip it from one to the other and save the resulting change. Here's the option in Kwrite (and Kate), for example:


Most GUI text editors I can think of have equivalent options buried somewhere in their menus!

A second scenario arises where your FLAC contains an embedded cuesheet and the file system has an external cuesheet to hand: the natural question is which one to use when splitting the SuperFLAC? Well, Sempice can't guess, so it asks:

You simply pick one or other of the buttons and hit [Enter] when the one you like is highlighted: Semplice then splits using the selected cuesheet, ignoring the other.

A final situation I could just about envisage might also arise: what if your working folder has two FLACs in it? Well, Semplice's seen that one coming, too:

I mean, the whole definitional point of a SuperFLAC is that it is one FLAC which contains within itself 'virtual tracks': it literally makes no sense to have multiple FLACs each wanting to be treated as a SuperFLAC! Of course, the fix at this point is to put each of the FLACs into its own sub-folder and split each in turn there.

Other than these edge cases, however, I hope you can see how easy it is to join and split FLACs and SuperFLACs at will: you have immense flexibility in how you want your digital music files to reside physically on disk, basically!

6.0 Editing Cuesheets

I was actually a bit dubious about adding this capability to Semplice at all, because cuesheets, as previously mentioned, have a very precise and subtle syntax that it's easy to mangle... but there have been many occasions on which I've tagged a recording and its separate track-FLACs as, say, 'Symphony No. 5 (Bernstein - 1967)' and then converted the nicely-tagged track-FLACs into a lovely SuperFLAC... only to then read the CD booklet and notice that the recording was actually made in 1968. I've also been known to tag things as 'Bernstien' and not notice the typo until after the SuperFLAC has been created! In the old days of Semplice Version 1, the way to fix these sorts of typos was, potentially, to split the SuperFLAC, re-tag the tracks, then re-create the SuperFLAC, which was a pain. So, on the understanding that the capability is there just to tweak little bits of a cuesheet with minor typo corrections, the Semplice SuperFLAC menu Option 3 has been provided.

Take that menu option when the working folder is set to a folder that contains an embedded cuesheet and you'll see this sort of response:

Semplice has, essentially, extracted the embedded cuesheet to a temporary file on disk, called tmp_cuesheet.txt, and presents it to you in the text editor of your choice (configurable in the Miscellaneous menu, Option 1, and set to nano by default). You make the minor textual edits you need to make... and then you save the resulting file. You then have to manually close down the xterm window that launched the editor in the first place. That triggers the write-back of the modified cuesheet into the SuperFLAC so your edits take effect. Here's another screenshot of the same thing, after I've set my editor of choice to Kate:

Again, the way Semplice spawns an xterm window which then itself launches the text editor means that closing this all down is at least a two-stage affair: save the edited text in the editor, using whatever key combinations or mouse clicks are standard for that editor, then close the editor if necessary, then close the xterm window. Only then does control return to Semplice -and only at that point are your edits saved within the SuperFLAC.

I'll stress once more: don't muck about with anything numeric within the cuesheet: track numbers and timings should be considered verboten unless you really know what you're doing. But a mis-typed track title, or a composer's name, or a missed accent on the conductor's first name... fine.

Incidentally, I hope it doesn't need stating, but external cuesheets can be edited at any time by a standard text editor, simply pointed at it on disk. It requires no special abilities, whereas Semplice is entirely concerned with editing embedded cuesheets, which is an entirely different proposition.

7.0 Conclusion

I hope the above has shown you that there are good technical reasons for minimising the number of music files you store on a file system and that there are good 'ideological' reasons for wanting compositions stored as single units which you have to listen to completely, rather than as separate 'bits' which you can pick-and-choose to listen to. To accommodate the need for turning per-track rips into per-composition single file SuperFLACs, Semplice's Option 11 makes merging FLACs together a painless, non-destructive process. The only definitive requirement before creating SuperFLACs is that your source files are tagged with at least an ALBUM tag: that will be used to name the resulting SuperFLAC.

Semplice also provides the ability to split single-file FLACs back out into per-track FLACs, regardless of whether the single-FLAC's 'descriptor' cuesheet is embedded within itself or is stored as an external file. All file-splitting options are, again, non-destructive.

Finally, a cuesheet that's been embedded can now be edited and saved back to the SuperFLAC from whence it came, using Semplice's SuperFLAC menu, Option 3 capabilities.

You may decide never to bother with SuperFLACs and cuesheets, but should you wish to do so, the capabilities are definitely there.

|[Back to Front Page]|[Tagging Home]|[Audio Processing Home]|[Ripping Standard CDs]|[Ripping SACDs]|[All About SuperFLACs]|