Convert M4A into MP3 with GNU/Linux, recursive and multithreaded
On a similar thread as an old post, Convert M4A into MP3 with GNU/Linux, I needed to convert a bunch of iTunes M4A unprotected audio files into standard MP3 files. With iTunes’ fondness for sorting by artist first, then by album, I ended up with a ton of single-file folders, making any scripting a bit of a pain. Also, converting a bunch of M4A files to MP3 is something that should be done in parallel on a multi-core CPU.
Here’s a snippet using find and xargs‘ multi-threading support to recursively find all M4A files and convert them to MP3 with as many threads as you want.
First, here’s the convm4a script that is called from the find/xargs line. Call it with a single argument, the location of an M4A file. The script with change to that directory and convert the file to a similarly-named MP3 file. Put this somewhere on your PATH (possibly in ~/bin/) and be sure to chmod +x convm4a.
#!/bin/bash
DIRNAME=`dirname "$1"`
FILENAME=`basename "$1" .m4a`
#echo "$DIRNAME"
cd "$DIRNAME"
faad -o - "${FILENAME}.m4a" | lame - "${FILENAME}.mp3" &> /dev/null
Test out that script to make sure it works. Then, run this line from the top of the directory full of your M4A files:
find -name '*\.m4a' -type f -print0 | xargs -P 4 -n 1 -0 convm4a
The -P 4 means to use four concurrent executions of convm4a, and the -n 1 means to only pass one argument to each invocation of convm4a. Change the number 4 to reflect the number of threads you want to run. You probably don’t want to exceed the number of CPU cores in your computer.
NBC Chimes
The NBC chimes of the National Broadcasting Company (NBC) radio network in the United States were the first ever audio trademark to be accepted by the U.S. Patent and Trademark Office. It consists of a succession of three distinct pitches: G3, E4, and C4 (middle C), sounded in that order, creating an arpeggiated C-major chord in the second inversion, within about two seconds time, and reverberating for another two or three seconds. The intervals of this progression are up a major 6th from G3 to E4 and down a major third from E4 to C4.
Convert M4A into MP3 with GNU/Linux
I ripped some CDs with iTunes, but accidentally used their silly M4A format. Using the free FAAD program included in my debian install, I was able to use this Bash snippet to convert the files to mp3:
for i in *; do faad -o - "$i" | lame - "`basename "$i" .m4a`.mp3"; done
Be sure to include the double-quotes around the $i, otherwise filenames with spaces might cause errors.
Update: I figured out a way to add recursive multithreading support. Check it out!
Nature Sound Clips
Free, public domain sound clips available from the US Fish and Wildlife Service. Includes ducks, geese, loons, shorebirds, alligators, frogs, snakes, bats, bears, elk, wolves, and others. Pretty neat!
Floppy-ROM
Back in the early days of computing, common audio cassettes were used to store computer programs before hard disks were created. The Kansas City Standard for encoding binary data with audio signals was created to :
record data as “marks” (one) and “spaces” (zero). A mark bit consisted of eight cycles at a frequency of 2400 Hz, while a space bit consisted of four cycles at a frequency of 1200 Hz. A word, usually one byte (8 bits) in length, was recorded in little endian order, i.e. least significant bit first. 7-bit words were followed by a parity bit.
Someone took the “bits as audio” idea one step further, and decided to try pressing a data phonograph record:
Daniel Meyer and Gary Kay of Southwest Technical Products arranged for Robert Uiterwyk to provide his 4K BASIC interpreter program for the 6800 microprocessor. The idea was to record the program on audio tape in the “Kansas City Standard” format then make a master record from the tape. Eva-Tone made “sound sheets” on thin vinyl that would hold one song. These were inexpensive and could be bound in a magazine.
Bill Turner and Bill Blomgren of MicroComputerSystems Inc. worked with EVA-TONE and developed a successful process. The intermediate stage of recording to tape produced dropouts so a SWTPC AC-30 cassette interface was connected directly to the record cutting equipment.
The May 1977 issue of Interface Age contained the first “Floppy-ROM”, a 33⅓ RPM record with about 6 minutes of “Kansas City standard” audio.

Kansas City Standard: Floppy-ROM: Wikipedia, the Free Encyclopedia
VU Meter
![]()
A VU meter is often included in analog audio equipment to display a signal level in Volume Units.
It is intentionally a “slow” measurement, averaging out peaks and troughs of short duration to reflect the perceived loudness of the material. It was originally developed in 1939 by the combined effort of Bell Labs and broadcasters CBS and NBC, for measuring and standardizing the levels of telephone lines. The instrument used to measure VU is called the volume indicator (VI) instrument. Most users ignore this and call it a VU meter.
Volume Unit VU defined: The reading of the volume indicator shall be 0 VU when it is connected to a 600-ohm resistance in which is flowing one milliwatt of sine-wave power at 1000 cycles per second.
The typical VU scale is from −20 to 3. The rise and fall times of the meter are both 300 milliseconds, meaning that if a constant sine wave of amplitude 0 VU is applied suddenly, the meter will take 300 milliseconds to reach the 0 on the scale. It behaves as a full-wave averaging instrument, and is not optimal for measuring peak levels.