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. Don’t install any extra software at this point. Just perform a standard, minimal Cygwin installation
3. Once Cygwin is installed, open a Windows command prompt and, in the same directory you saved the Cygwin setup file to, type the command:

setup-x86_64.exe -q -P wget,tar,qawk,bzip2,subversion,nano,lynx

Once those packages have been installed, open a Cygwin session and type the commands:

lynx -source https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg 

install apt-cyg /bin

From this point, you can install further software packages simply with the command apt-cyg install <name>

4. So now you can add a whole raft of required software to your minimal Cygwin installation with this command:

apt-cyg install xclip xorg-server flac lame vorbis-tools binutils gcc-core \
git make mingw64-i686-runtime yasm texi2html dos2unix curl xinit

5. Now you need to compile and install the ffmpeg program, for which no pre-built package is unfortunately available. Taking each command one step at a time, therefore, issue these commands within a Cygwin session:

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

Note that the “.configure” command may end with a warning about not being able to detect libraries correctly: ignore it. Be warned, too, 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: you only have to do this once, after all!

6. Switch off Cygwin ACLs for any folder in which you expect Cygwin tools to modify files. To begin with, for example:

mkdir /music

That will be the point where we expose Windows’ music folder to Cygwin. We need to make sure that Cygwin’s ACL file security does not apply in the /music folder. To do that, you need to edit the /etc/fstab file so that it mounts /music with a noacl attribute. So to start, you type:

nano /etc/fstab

By default, that will contain a line which reads:

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

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

C:\Users\hjr\Music /music ntfs binary,noacl,posix=0,user 0 0

That is, the Windows’ music folder shall be mapped to Cygwin’s /music folder. It is using the NTFS file system. And there are a bunch of parameters that control how the Windows to Cygwin mapping should be performed -principal amongst which is the ‘noacl’ one.

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.

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

8. In Cygwin, copy the ccdt.sh 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/ccdt.sh .
chmod +x ccdt.sh
ln -s ccdt.sh ccdt

8. 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 /music
startxwin &
export DISPLAY=:0.0
ccdt

The key point here is to always start an X server (if one is not already running) before running CCDT. If you don’t, you won’t be able to cut-and-paste properly, though no other CCDT functionality would be compromised.

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

Note that in native Linux, you would expect to be able to take CCDT’s option 2 and type Ctrl+Shift+V to paste in the name of the current working directory as the name for the composition being tagged. In Cygwin, the same functionality is obtained by typing Shift+Insert. There are no other differences between the way CCDT works on Linux versus the way it works on Cygwin+Windows.

9. As you type composer, performer or composition names, you may need to type foreign characters. This is most simply achieved by switching on Cygwin’s compose key functionality. Click on the little ‘C-with-green-arrow’ icon in the top left-hand corner of a Cygwin session window and select the Options menu. Select the Keys item in the left-hand part of the screen. Enable one of the compose key radio buttons at the bottom of the right-hand part of the display:

Here, I’ve chosen the Alt key to be my ‘compose key’. Click Save to make the change ‘stick’ for the future.

Once the compose key has been enabled, press it, plus two other key presses in succession, to type a single combined character. Thus Alt, E, will generate the character Ē; Alt, e, = will generate ; and Alt, s, s will generate ß …and so on.

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.