Daily Archive for December 30th, 2011

473nm 10mW DPSS Blue Laser

So I was digging through some of my old electronics and I came across a device I bought a while ago but never really played around with. It’s a blue DPSS laser that I bought for practically nothing on eBay (I think the seller didn’t quite know what he was selling — they’re typically expensive). It’s not very powerful, but it’s certainly an interesting device.

It seems to have been ripped out of some old lab equipment, as there are lots of clipped connections. Furthermore, the construction is really interesting. There was a lot of reworking of standard components. For example, this DB-9 connector was modified to have two extra lines come out of the back.

I fired it up. It had a 5 second delay before it turned on (I believe this is supposed to be a standard safety feature according to government regulations).

I also tested it out on my laser power meter. I’m not really sure how accurate this meter is because I’ve had problems with it in the past, but according to it, the laser is outputting around 5mW stably.

flacsync: Automatically Sync FLACs to MP3s

In an effort to make organizing my music collection suck less, I wrote a script to automate the process of converting my FLAC files to MP3s for when I want to listen to them with my MP3 player.

Previously, I had no way to do this in an automated way. My music collection changes rapidly, so I needed a way to convert FLACs that haven’t yet been converted (or have changed since the last conversion) to MP3s. The first step of this process is to decode the FLAC and then pipe that to an MP3 encoder.

Next, I had to extract as much tag information as I could out of the FLAC and convert it into ID3 tags. Finally, if there are image files in the directory containing the FLACs, the script automatically embeds those images into the MP3 file (and tries to determine what type of image they are).

It also has a configurable number of worker threads, so you can process the files in parallel. It keeps a database of hashed files in ~/.flacsync/db, so when you re-run it, it will only retranscode new or changed FLAC files.

You can find it here. It uses some Unix commands like find. It requires Python 2, Mutagen, FLAC, and LAME.