The Classical CD Tagger (CCDT) has been updated today (to version 3.10)
The usual slew of bug-fixes and code optimisations are this time accompanied by a brand-new feature: auto-volume maximisation and auto-composition-at-once.
Briefly, Volume Maximisation is what my MAXV program does when confronted with a folder-full of FLACs. It analyses each in turn to find out its peak volume; if the loudest track is more than 0.5dB away from the theoretical distortion-free maximum of 0dB (sound levels being calculated on an inverse scale, where 0dB is much louder than 10dB!), then MAXV boosts the volume of all tracks by the amount that would make the loudest track sound at 0.5dB. Composition-at-Once is an entirely separate process whereby if my CAO program spots more than 1 FLAC in a folder, it can combine them into a single 'super-FLAC' plus an embedded cuesheet. The individual tracks are still identifiable 'within' the super-FLAC, but now there's a single large FLAC to work with, rather than potentially dozens of little ones.
So, the new CCDT feature is that (1) if you have installed MAXV and CAO separately; and (2) you ask CCDT to do so; then when you quit CCDT after using it to tag up a bunch of FLACs in a folder, it will automatically invoke MAXV and CAO for you, in turn, to create a single-file, volume-maximised super-FLAC that is appropriately tagged and contains an embedded cuesheet.
You install CAO and MAXV as you do any of my other software: as yourself, issue the following commands at a terminal prompt:
cd wget https://absolutelybaching.com/abc_installer bash abc_installer --cao bash abc_installer --maxv
How you tell CCDT to use these tools is equally straightforward: you set two environment variables, called CCDT_AUTOMAXV and CCDT_AUTOCAO to have values of 1. If those variables are not set; or if they are set to some value other than 1; then the auto-post-processing won't be done by CCDT, even if the software programs are present on your system.
To set an environment variable in most Linux shells temporarily, you usually type something like;
export CCDT_AUTOMAXV=1 export CCDT_AUTOCAO=1
...though the specific syntax depends on your default shell (the above commands work for Bash shells). To set those environment variables permanently, the best bet is to edit your .bashrc (or possibly your .bash_profile, depending on distro). My .bashrc looks like this, for example:
Spot the three 'export...' lines in the middle of that lot, and note that two of them are setting the new environment variables. Opening a new terminal after making and saving that change to your .bashrc will mean the new variables get set automatically and will affect CCDT behaviour accordingly.
When you then launch CCDT after the new environment variables taking effect, you'll see this:
Note that the header section now highlights whether the auto-maxv and auto-cao functionality is enabled or not. The 'on' and 'off' for each are independent and appear in blue text. That's to say, if you like, say, CAO but don't like messing around with music volumes, it's perfectly fine to set CCDT_AUTOCAO =1and set CCDT_AUTOMAXV=0 (or not set it at all, in fact). Or vice versa. Switching one on doesn't force you to switch the other on too. If you have such mixed-settings, the header area of CCDT will still, in blue, remind you which feature is on and which is off.
That last screenshot also highlights another new, consequential, feature in the new version of CCDT: there are now two ways to quit the program. The 'q' option is still there as it always has been, but it's now additionally accompanied by an 'x' option. Both will quit the program, but only the 'q' option invokes CAO and MAXV if those environment variables are set to be '1' (i.e., on) and the relevant software packages are installed. If you take the 'x' option, then even if the environment variables are set on, and even if the CAO and MAXV programs are installed and capable of working, CCDT won't invoke them.
(If you don't set the new environment variables, by the way, then there's no functional difference between the 'x' and 'q' options: they both apply tags, both clean files, both make sure the FLACs being worked on are internally free of corruption. It's just that the 'q' option can do more than those things *if* the extra software is installed and the environment variables are set).
Why would you ever want to switch on auto-cao and auto-maxv and then not have them invoked? Well, consider what happens when you tag up a 2-CD opera box set. Each CD's tracks probably starts off living in their own folder (let's call them CD1 and CD2). You probably cd to CD1, run CCDT, quit and then cd to CD2, run CCDT there, and quit... and then create a third folder into which the two separate CD folders can be combined into a single opera 'composition'. But if maxv and cao were to be run as you quit CD1 and CD2, then you'd end up with two 'composition' super-FLACs, each with different volume boosts applied.
What you actually want to do in that situation is to be able to quit CD1 without maxv or cao kicking in; quit CD2 without maxv or cao kicking in; combine CD1 and CD2 into a whole-opera folder, and then quit CCDT in that whole-opera folder: only at this last point would you really want cao and maxv to kick in, to create a single whole-opera super-FLAC whose relative volume is consistent across the entire composition.
Hence, for two runs of CCDT you do not want auto-maxv or auto-cao to happen; for a third run, you do.
Well, now that is possible: for the first two runs of CCDT you type 'x' to quit. When you quit out of CCDT the third time, you type 'q' -and, at that point, the auto-post-processing takes place.
Of course, for single-CD compositions that don't span disks, the 'x' option will probably never be needed. But it's there for multi-CD compositions, really.
The short version: whilst auto-cao and auto-maxv are potentially good things to have happen automatically, there will definitely be times when you don't want them to happen automatically. And for those times, there's the 'x' option. For all other times when the auto-post-processing is desired, the 'q' option does the trick.
Apart from all that, note that auto-CAO won't kick in until there's at least two FLACs in a folder to work with. If a folder already contains an entire composition that consists of a single FLAC anyway, there's little point in CAO turning it into a different single FLAC! Only when two or more FLACs exist can they meaningfully be combined into a single super-FLAC.
Similarly, if auto-MAXV determines that the loudest track in a folder is already as loud as it can safely go, it will run... but it won't do anything. This will usually be true for rips from ordinary CDs. It will usually not be true for rips from SACDs or similar high-resolutiion audio sources (because they tend to be deliberately mastered at significantly lower volumes than ordinary CDs to avoid the quantisation errors that occur at high volume due to their high sampling rates).
As ever, updates to CCDT are best and most easily achieved by running ccdt --checkver, if you already are running a reasonably recent version. Failing that, type these three commands:
cd wget https://absolutelybaching.com/abc_installer bash abc_installer --ccdt
Or, if you prefer, simply download the script and install it manually.