[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

Overy 0.1

Filed under: Hacking,morituri,Music — Thomas @ 23:41

2010-11-19
23:41

I' m finally making some progress on one of my 2010 goals - making a Lego robot that can take CD's and feed them to my computer to rip.

What am I trying to do ?

I'm making a computer-controlled robot out of LEGO that will allow me to rip multiple cd's onto my computer, using morituri.

The goal is:

  • to use Lego Mindstorms for the robot
  • only use regular lego pieces, like Technics, for everything else
  • work with my computer, but preferably with any
  • rip 50 cd's or more in batch

I've been asked a few times why I'm doing this. The main reason is because by now I own over a thousand CD's. I have most of them ripped by hand to Ogg Vorbis, but disks are big enough these days that I really want to rerip all of them just once to FLAC. I've spent quite some time writing an accurate CD ripper for Linux, and I want to have all my audio CD's in correct digital bytes on a computer, so I can use the files to transcode to whatever format is useful for whatever player I'll have.

This probably sounds strange, but a while ago I got to wondering what I would not like getting stolen from my apartment, and my CD's are pretty high on that list, if not number 1.

Some people ask 'why not just do it by hand? You'll probably get it done just as fast as it would take you to make the robot.' I guess people who ask that question don't understand the joy of making something. But there's another reason to do a robot - I'm planning to offer my friends a remote digital backup of their music. Ideally, I could drop this robot off at a friend's house with a Live CD and some instructions, and I would then transcode their music for their iPod or whatever they have. And keep an offline copy at my place purely for archival reasons, of course.

In any case, I am working on my first attempt at robot after building two of the sample ones from mindstorms.

The base mindstorms set is a bit limited piecewise, so I started by getting a really big Technics set that has sawtooth pieces (because that's the mechanism I wanted to try to use for the CD loader)
71173

After looking at a few other approaches out there, I decided I wanted to try one of my own before trying to reproduce someone else's.

After lots of thinking and discussing with some friends, the following ideas fell into place:

  • If I want 50 cd's at once, grabbing one is going to be a problem. After considering pneumatic pumps, arms, some fingers going through the middle and opening, or a wheel at the top of a stack, I went for a simple approach using the sawtooth pieces to space the cd's, and a little axle going through the middle
  • Peter had a great idea to use a USB drive - this way the robot is self-contained and should work anywhere with any computer
  • I wanted to use the CD drive itself as much as possible, so I came up with the idea of rotating the CD drive, so that I can drop ripped CD's by ejecting the CD when it's 180 degrees rotated. I also want to insert the CD when the drive is either at 90 degrees (facing down) or some other angle, before loading it.
  • Mindstorms has 3 motors, so you can roughly (without weird tricks) create three kinds of movements. So I'm using one to pull in the CD rack, one to rotate the first CD 180 degrees into the drive, and one to rotate the drive after ripping.

Here's the CD loader I made; it doesn' t fit 100% but rubber bands finish the job for now. I'll need more sawtooth pieces if I want to load 50 cd's - anyone know where to get some ? The LEGO site doesn't sell those pieces individually.
71177
This was with 2 motors but without CD drive; it already has the mechanism to pull in the CD rack, and the axle (with wheel rim) to pick up the first CD in the rack. It's mounted on a touch sensor so I can stop pulling in the rack when the rim hits a CD. The motor will then rotate the disc 180 degrees around the axle of the sensor, and drop it into the CD drive.
71180
This is the first complete build that I finished tonight. The CD tray is mounted and opened so you can see where the CD is supposed to go. After loading, the CD drive would rotate back to horizontal, then eject the CD the other way around to get rid of it.

I thought I was ready to start trying it for real, but when I went through the process by hand, I noticed two pretty fundamental problems...
71183

First of all, the external drive I used is one of those where you have to firmly press down on the CD so that it fits tight around the round bit in the center. My robot cannot press down. It would be very wobbly anyway because at the point where it hits the tray the CD reader is floating at an angle.

Second, it seems this external USB CD reader has no way of triggering a load electronically, something I had not thought of. It turns out most external drives don't, and again, my robot cannot press on the tray to close it.

So, I guess tomorrow I'll try to shop around for external USB CD readers that can eject and load electronically, and that have a normal tray in which I can drop the discs, like my desktop PC's have.

Backup plans are:

  • Getting one of those hoover CD readers, that suck in and spit out CD's. There again I don't know if you can spit out electronically.
  • Getting one of those 3.5 inch carcasses and put in an internal CD drive. That will probably make it really heavy though, so that might give stability problems with the robot.

If any of you out there know about an external USB CD reader that has computer-driven eject and load, please let me know! For example, this LaCie Lightscribe drive looks like it might be one that would work - if you have it, let me know.

morituri 0.1.1 ‘Dead’ released!

Filed under: Hacking,morituri,Releases — Thomas @ 23:30

2010-04-16
23:30

For some unfathomable reason it's been a rather productive two weeks of short ##morituri hacking sessions.

I was wondering why I wasn't getting any feedback or trac tickets, until I found out that a) I had five month old patches lying around in my trac and b) I forgot to configure the ticket mails properly.

That, spurred with actual bug reports from blizzard who seems to have ripped 600 CD's with this piece of code already (more than me, in any case), kept me going towards a new release.

So, this new release adds, among other things:

  • 'rip image encode' to encode a lossless image to a lossy one (vorbis, mp3, ...)
  • tagging tracks with MusicBrainz id's
  • 'rip image retag' to apply up-to-date musicbrainz info (including id's) to existing rips. I did this one specifically for Chris when he found out none of his rips had the MusicBrainz id's and I felt guilty.
  • added an auto-generated man page.
  • Generate a complete list of known drive offsets to try with 'rip offset find' based on the AccurateRip database.
  • improved the basic Task code I wrote for abstracting asynchronous operations that can be hooked into a GLib mainloop or Twisted reactor. Exception information is now more useful.

A bunch of bugs were fixed too, and I especially want to thank Peter Oliver who provided me with three patches that I sadly overlooked. I hope he comes back.

In any case, enjoy the code and start ripping!

As for the next release, I've already started on ripping the data track (which ended up being easier than I thought, using dd and wrapping it in a Task parsing the output). However, I haven't yet been able to write a full image back to a CD, for various reasons. First of all, the .cue files I generate have multiple FILE statements, which doesn't seem to be supported by wodim, and only recently was added to cdrecord. Second, actually writing the data track so far has given me only errors.

It has been possible to rewrite the .iso file into one that can be mounted, and I might have to actually do the writing of discs by first decoding to a single file then writing from that. We'll see.

On the other hand, with tag reading and writing tasks now written, I might start using those in a separate application to finally start managing my music across my different machines.

morituri 0.1.0 “Youngblood” released!

Filed under: morituri — Thomas @ 16:57

2009-09-26
16:57

This is the first release of hopefully many.

Morituri is a cd ripper that aims for quality over speed, offering features similar to Exact Audio Copy on Windows to make as perfect rips as possible.

For more information, see the trac page

The tao Fedora 11 repository has the release and dependencies.

Enjoy!

FEATURES
--------
- support for MusicBrainz for metadata lookup
- support for AccurateRip verification
- detects sample read offset of drives
- performs test and copy rip
- detects and rips Hidden Track One Audio
- templates for file and directory naming
- support for lossless encoding only for now
- tagging using GStreamer
- for now, only a command line client (rip) is shipped

REQUIREMENTS
------------
- cdparanoia, for the actual ripping
- cdrdao, for session, TOC, pregap, and ISRC extraction
- GStreamer and its python bindings, for encoding
- python musicbrainz2, for metadata lookup
- pycdio, for drive identification (optional)

« Previous Page
picture