At FUDCON 2007, someone brought a Buddha Machine, aka Buddha Box. It was very cool, and I was pleased to see that the sound tracks are available for download.
However, Track 1 has some nasty high-frequency distortion in the wave file that renders it extremely not zen. I decided to run a filter over it to clean it up, and turned to my usual go-to sound program (which I dislike) called Audacity. Audacity wanted no part of Buddha:
audacity: layer3.c:2633: mad_layer_III: Assertion `stream->md_len + md_len - si.main_data_begin < = (511 + 2048 + 8)' failed.
Aborted (core dumped)
So I turned to the new kid on the block, Jokosher. It actually worked quite well. Sometimes it was difficult to know when to right click, when to left click, and when to doubleclick, but once I figured that out I was able to apply a lowpass filter and an EQ to clean up the audio. I feel much calmer now.
Here's the resulting ogg file: buddamachine01.ogg (fixed)
These files (transcoded to ogg with oggenc) play great inside my sonata activity on the olpc. Add one of the files to the playlist, right-click the playlist and select "repeat."
answers: Right click on timeline of audio file instrument to import file; doubleclick on an effect to open effect properties
Chris Blizzard let me know a while back that Red Hat Magazine was coming to the olpc offices to shoot some promotional video, and that they might want to interview me. So I dropped on by after work and gave them some good bites.
They’ve posted the edited video, which is a pretty nice peek into the place where the magic happens. It’s not my best on-camera appearence ever, but luckily they cut away from me pretty quickly 🙂
PenguinTV actually has a good search feature, but it’s rarely used because it requires PyLucene, and installing PyLucene is extremely hard. Here’s the HOWTO for Ubuntu Edgy:
Continue reading “Building PyLucene on Ubuntu Edgy”
My work is doing a silly contest around the whole NCAA thing. Back in high school kids used to run around comparing their brackets and arguing over every detail, and I hated it. I don’t follow basketball at all, and other than knowing that Duke ususally does well I have no basis upon which to make any choices except the seeds.
So I decided to write a bracket-generating algorithm that uses the seeds to generate weights for a random function and pick teams that way. The algorithm works as such:
- for a pair of teams, take their seeds and invert them (make small numbers big)
- divide each seed by the total of the two seeds to get values 0 < = x <= 1
- get a random number 0 < = r <= 1. If team a’s chance is >= that value, they win
The actual code isn’t as nice as that explanation, but it should be mathematically equivalent. Any errors in programming only make these results more my own. I took the results from the first run that (a) worked, and (b) had Wisconsin (my alma mater) not getting knocked out in the first round.
Based on brackets.py, the final four will be: Arizona, Kansas, Texas, and Ohio St.
Kansas will win.
Source code after the break:
Continue reading “March Madness — nerd style”