3D Printer Printers

We have 3D printers that can take a description and print an object. Some 3D printers are capable of printing everything needed to make another 3D printer.

3d printer operation

This reminds me of programming language implementations.

An interpreter takes a description (a program) and prints some output. A meta-circular interpreter is an interpreter written in the same language that it inteprets.

program interpreter

With programming languages we also have compilers that translate a program into another program that does the same thing but better (smaller and faster).

program compiler

What's the equivalent for 3D printers? I think it'd be a 3D printer that prints another, more specialized printer. That specialized printer might work faster or produce higher quality output or work with materials that a general-purpose 3D printer can't work with.

3D printer that prints 3D printers

The analogy isn't perfect but I'd like to see 3D printers that print more specialized printers.

Labels: ,

Annotating MP3 files with BPM

I wanted to tag my music library with the BPM of each song. There are commercial products for doing this through iTunes, but I wanted to do it from the command line, because I also use my music library outside of iTunes, and I don't want to be tied to iTunes anyway.

The bpm-tools package can calculate bpm for a song. On Mac, it's easy to install with Homebrew. The base package only includes the analyzer; I wanted something to tag my MP3 files too, so I used the =-with-bpm-tag= option. It ends up installing dependencies: mad, sox, id3lib, id3v2, flac, libogg, libvorbis, libao, vorbis-tools.

brew install bpm --bpm-tag
cd Music/iTunes\ Music/
find . -name \*.mp3 -exec bpm-tag '{}' ';'

However, the id3v2 command (on Mac/Homebrew, anyway) doesn't work the way bpm-tag wants, and for some reason sed wasn't cooperating with me, so I changed one line of /usr/local/bin/bpm-tag from

BPM=`id3v2 -l "$FILE" | sed -n 's/^TBPM.*: \([0-9\.]\+\)/\1/p'`


BPM=`id3v2 -l "$FILE" | sed -n 's/^TBPM.*: //p'`

This made it skip files that already had a BPM tag.

It took a while to run, but now all my MP3 files have a BPM, and iTunes picks that up too. Yay!

Labels: ,