The Classical CD Tagger (CCDT) on Windows

1.0 Introduction

I will assume in this article that you already know what the Classical CD Tagger is, what it does and how it does it. Please read the main CCDT article now if that’s not true for you!

In this article, I’m going to run through the commands needed to get it working on Windows 10.

There is plenty of GUI software on Windows which will tag your music files for you, of course. I just don’t think they all do it efficiently, effectively …or very accurately. That’s why I like using CCDT for tagging purposes, no matter what operating system I’m running. But if you prefer the GUI way of working, by all means keep on using programs such as MP3Tag to do the deed. For everyone else… keep on reading!

2.0 The Quick Version

If you aren’t familiar with Cygwin, go read the long version of how you get it running on your Windows PC, which I’ve documented with lots of screenshots. But if you are sitting there thinking “Just tell me how to get CCDT running on Windows”, here’s the short version.

1. Download and run the Cygwin setup-x86_64.exe
2. Install the following packages:

  • flac
  • xorg
  • xclip
  • binutils
  • gcc-core
  • git
  • make
  • mingw64-i686-runtime
  • subversion
  • yasm
  • texi2html
  • diffutils (may already be installed or selected, ignore if so)
  • dos2unix
  • curl
  • wget

3. Run the Cygwin environment (Start → Cygwin → Cygwin64 Terminal) and download ffmpeg from within it, with the commands, issued sequentially and only moving onto the next when the previous one has fully completed:

git clone git:// ffmpeg
cd ffmpeg
dos2unix configure
make distclean
./configure --enable-shared --disable-static
make install

Note that the “.configure” command may end with a warning about not being able to detect libraries correctly: ignore it. All will be fine in the end.

Also note that the “make” command will take an extremely long time to run (20 minutes on my i7 laptop). Just be patient and let it complete in its own good time.

4. Edit the /etc/fstab so that it mounts your music folder with a ‘noacl’ attribute. By default, Cygwin’s /etc/fstab will contain a line like this:

none /cygdrive cygdrive binary,posix=0,user 0 0

You need to add an additional line to that file that reads something like:

D:\Music\classical /music ntfs binary,noacl,posix=0,user 0 0

In this example, I’ve said that all my classical music flac files are stored on the D: drive, in the Music\classical sub-directory. I’m saying to mount that at Cygwin’s “/music” folder -which needs to exist (and can be made to exist with a simple mkdir /music issued at the Cygwin command prompt beforehand). Then I mention that the source folder is formatted with the NTFS file system. And then I mention the crucial mounting options, chief amongst which (for these purposes) is the “noacl” one.

Without the ‘noacl’ option, Cygwin will attempt to set its own security on files stored on that mountpoint which Windows will expect to be using it’s security model -and the incompatibilities thus introduced can make files impossible to edit or access meaningfully. With the noacl option, only the Windows security model is used, which Cygwin can work with, without introducing unnecessary complexities.

Note that after having changed the Cygwin /etc/fstab in this fashion, you are best advised to reboot your entire PC to make sure the correct mount options take effect. Once you have rebooted, your Windows music folder will be automatically mounted under Cygwin’s /music directory. All modifications to music files should then take place within that /music context.

5. Download CCDT in Windows by clicking this link. Save it to somewhere standard, such as your Downloads directory.

6. In Cygwin, copy the from the Windows directory you saved it in to the Cygwin /bin directory and make it executable. For example:

cd /bin
cp /cygdrive/c/Users/hjr/Downloads/ .
chmod +x
ln -s ccdt

(The last command there creates a shortcut to the shell script that lacks the “.sh” extension. It’s there so you can run the script just by typing “ccdt” instead of “”. It’s optional.)

7. In Cygwin, move to a directory that contains some flac files and invoke the script. For example, if you’ve got some flacs in your Windows’ Music directory, you’d type:

cd /cygdrive/c/Users/hjr/Music

At this point, you should see the CCDT main menu appear, exactly as it would have done on Linux. Job done!

Note that in Linux, with xclip installed, you would be able to take Option 2 (to provide the name of the work being tagged) and then press Ctrl+Shift+V to paste the current directory’s name as the Composition name. This makes sense when you’ve already created all the physical directories to store a CD’s tracks correctly and the directory name thus correct describes the composition’s actual name. On Windows, however, this functionality doesn’t work.

Fortunately, there’s a couple of workarounds. In the first place, the current directory name is still displayed at the top left of the screen when you take Option 2, so you could simply use your mouse to manually highlight and right-click+copy then right-click+paste that into the appropriate entry field when prompted.

But the rather subtler fix is as follows:

  • Start a background xserver before launching any instances of CCDT (i.e., type startxwin & as the first thing you launch in a Cygwin session)
  • Set a DISPLAY variable correctly (i.e., type export DISPLAY=:0.0 so that Cygwin knows how to connect to your new xserver
  • Now launch CCDT as normal
  • When you take option 2 to provide the composition name, press Shift+Insert to paste in the current directory’s name

Note that this Shift+Insert key combo only works if you’ve switched them on as a Cygwin shortcut. That means you need to click the Cygwin logo at the top-left of a running Cygwin terminal session, click Options and then click Keys:

The first checkbox shown in the ‘Shortcuts’ section there needs to be switched on, basically. If it is, then you can use Shift+Insert as a quick way to paste. If you’ve launched an xserver and set the DISPLAY variable before running CCDT, then your current directory name is auto-copied into the clipboard… at which point Shift+Insert can paste it whenever is appropriate.

If much of the above was gobbledygook to you, fear not! A much longer version of the process is documented, in depth and at length, complete with lots of screenshots in this article, so please go read that and follow the steps explained there in great detail.