Make a Big APE into Several Small, Tagged FLAC Files

You may recall with great excitement my post on splitting and tagging album length FLAC files into track length FLAC files.  It may come to pass that you find yourself staring at an album length APE file.

What?  What the hell is an APE file?

In short, some folks decided “hey, what the world needs is another media player and it’s very own lossless codec”.  In their defense, MediaMonkey looks like a pretty cool application (say “iTunes killer”), and it does support FLAC and OGG so I don’t dispise it.  Nonetheless, it is my advice to avoid specialized and proprietary codices wherever possible.  Unfortunately Monkeys, this means no APE files.

As fate would have it, if you are already set up to split and tag an album FLAC, you are nearly ready to do the same for an album APE.  You just need the MAC (monkey audio codec).

You have two choices.  This codec isn’t part of what Canonical normally provides, so you can either add a repository which includes it or you can download the codec directly.  I tend to prefer adding a repository, but the codec can be downloaded in this package.

http://members.iinet.net.au/~aidanjm/mac-3.99-u4_b3-1_i386.deb

(If you choose to download the .deb package, double-clicking on it once you have downloaded it and your system will run the installation.)

For those of you, like me, who prefer to add a repository, the Eudoxos repositories include MAC, so we can add this one.

http://ppa.launchpad.net/eudoxos/ubuntu yourubuntuversion main

Once you have added that repository Monkey Audio will appear in Synaptic.  To install the Monkey Shite open Synaptic and look for Monkey Audio. (Please note that newer editions of this repository no longer carry the MAC, yet I am using the repo for 8.10 in my 10.04 machine successfully.)

Now let’s get to the meat of it.  I have grown lazy and tend to rename my FLAC, APE, and cue files to the letter a, so my commands look like this:

shnsplit -o flac -f a.cue -t “%n – %t” a.ape

cuetag a.cue *.flac

(Please note there may be a copy and paste problem here.  The quotation marks are different.  So when you grab the part -t “%n – %t” you will have to replace the quotation marks by typing them afresh.  Failure to do so will yield an error—shnsplit: error: need exactly one file to process.  Alternatively you may copy from the  code section below.)

##

# Here are the two commands you will need

shnsplit -o flac -f a.cue -t "%n – %t" a.ape

# Note: you may substitute "%n - %a - %t" if you want artist names in your file names

# now you may move or remove the album APE]

cuetag a.cue *.flac

##

Unlike splitting a FLAC file into smaller flac files, you don’t necessarily have to send the album length APE to the trash (or remove it’s file extension) between performing these two commands.  But you can.

If this isn’t strait forward, you may want to read through my previous post to sort out the details of the conversion process and then come to this post for the APE specific information.

Thanks to this post for some information.

Share

8 thoughts on “Make a Big APE into Several Small, Tagged FLAC Files

  1. For those interested in such things, %p is for Performer and %a is for Album (in case you’d like those in the file name). I never use Album in my file names, but for a various artist type album I do like to use Performer. Usually like this instead:

    “%n – %p – %t”

    1. The repo isn’t working because eudoxos no longer includes MAC (as of 9.04). I was able to use intrepid (8.10) instead of lucid (10.04) on my machine and it seems to be working fine. I’ll keep seeking a better solution (and I’ll rewrite this post so it’s better too).

  2. James, can you steer me towards information on how to find the length of an APE file? I mean the length of the music in it, in seconds.

    I know how to do it for a FLAC file – there some bytes a little way into the file that give the sample rate and the number of samples. But I can’t find anything equivalent on APE.

    Thanks for any info

    RB

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>