Ubuntu – Ape files (Monkey’s Audio): How to create them under Trusty and Xenial

14.0416.04batchconvert

I have seen plenty of useful information on Ask Ubuntu about how to play Monkey's Audio or APE files. However I would like create these files from a collection of wav files using either command line or GUI.

Best Answer

Best way under Trusty Tahr or Xenial Xerus is to use the Monkey's Audio Console Front End of Matthew T. Ashland. mc3man holds a package in his PPAs for either Trusty or Xenial. Add the required PPA and install this application as follows:

1. Installation for Trusty Tahr

Use the following commands from a Terminal window to add this PPA and install the monkeys-audio package:

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install monkeys-audio

2.Installation for Xenial Xerus

Use the following commands from a Terminal window to add this PPA and install the monkeys-audio package:

sudo add-apt-repository ppa:mc3man/xerus-media
sudo apt-get update
sudo apt-get install monkeys-audio

3. Usage

Installation instructions are fairly basic and can be seen by running mac -h. For a single file the following would work well:

andrew@ilium~$ mac luckynight.wav luckynight.ape -c4000
--- Monkey's Audio Console Front End (v 4.11) (c) Matthew T. Ashland ---
Compressing (extra high)...
Progress: 100.0% (0.0 seconds remaining, 1.2 seconds total)          
Success...
andrew@ilium~$ 

And for a collection of wav files the following loop would also work quite nicely:

mkdir ape && \
for j in *.wav
do 
mac "$j" ape/"${j%.wav}.ape" -c4000
done

And now enjoy your Monkey's Audio music :).

References: