Bytebots Assemble!

April 4th, 2016

Even I do not fully understand my robot fetish … but it does feel good to have a fetish!

A bunch of these little yodeling robo-pals were going to be my awesome 2015 Christmas presents. Instead, they are the prototypes for my even-awesomer 2016 presents. I call them Bytebots because the music they play is called Bytebeat — although really it’s a specific approach to computer-generated musicnoise that’s been around for a long time, and is currently experiencing a bit of a revival. More about Bytebeat later — it’s really interesting!

I didn’t actually write any of the music, I just chose existing Bytebeat compositions from the internet & adjusted them a bit. I picked ones that sounded “christmassy” to me. Playing them back through the piezo speakers in these perforated cardboard boxes gives them a distant-snowdrift-sleighbell quality, I think. Each robot has a single button. A short press changes tracks, a long press puts the hard-working robot to bed.

bytebot2

These came about last November/December, as in the midst of the fog and stress of the holiday season I pondered how I might whip up some nice little handmade present for all my friends — something Christmassy, like an ornament or a music box or something. Maybe a musical ornament? Maybe a happy Christmas-robot that plays pleasant melodies and hangs from a tree? Something like that … really it was just one more of the dozens of half-ideas that swim around in the aquarium of my head all day long. Nothing at all would have come of if if I hadn’t mentioned out loud at the DorkbotPDX meeting that I was looking for the right little board or chip, something battery-powered, programmable and cheap, with a speaker and a button and maybe a blinking light. I mentioned this to intrepid Dorkbotter Alex Norman, and before I knew it he’d given me a shopping bag with fifty little boards, left over from a one-time art project he did last year, involving musical helium balloons. Thanks to Alex, all of a sudden I had the hardware to make something happen, and this music-robot-christmas-present idea swam to the top of the fishtank & demanded attention.

Alex’s boards, which I’ve been calling ‘balloon boards’, are home to a very simple microcontroller, the Atmel ATTINY23. Speaking metaphorically, if you think of an iPhone as being about as smart as Steve Jobs, and an Arduino as being a clever 8-year-old girl, then the ATTINY processor in these robots is akin to that 8-year-old girl’s pet hamster. Speaking more technically, the ATTINY23 has 2k of program storage and 2k of RAM — about half of the computing resources of my first home computer from the late seventies. It has a clock speed of 8 whopping megahertz, and mathematically it’s really only good at adding and subtracting 8-bit integers.

balloonboard

But that turned out to be sufficient, only because Bytebeat is such an astonishingly simple approach to music. In fact, each Bytebeat composition in this robot consists of exactly one line of code. There are 8 compositions in total, so that’s 8 lines of the firmware dedicated to musical composition, whereas the other 480 lines are concerned with tedious stuff like booting, sleeping, waking, detecting button presses, setting clocks and flipping light switches. (Nerd-curious? You can see the latest version of the firmware on github.)

If you’d like to know how these sound, turn down your speakers and then click these links to a couple of the raw bytebeat compositions: la, de, da! This uses the amazing HTML5 Bytebeat explorer at greggman.com, which is my go-to tool for exploring the Bytebeat universe. But if your computer speakers are any good, these links will sound a lot louder and clearer and, well, crunchier than my robots sound. Bytebeat can get kind of abrasive, and while the piezo speakers in my robots are a little shrill and a little quiet by nature, they do take a bit of the edge off the high-end. In the future I’d like to use real dynamic loudspeakers instead of piezos, if I can find a source for them. (Just the sort of thing I used to get from Wacky Willy’s, back when they existed … ah, old Portland. If you happen to be sitting on a pile of small loudspeakers that you’d like to be rid of, please do get in touch.)

If you’re one of my friends who didn’t receive one of these for Christmas last year — that is, if you’re almost all of my friends — please don’t fret, because A) fretting is not sexy, and B) I got you next year, for shiz. My plan is to order a standard cardboard box, a standard button, a real loudspeaker and some kind of very modern, design-forward button. I’ll create a stencil for the robo-art, and set myself up a little north-pole-style artesianal robot factory in order to get 47 more of these guys out the door!

Meanwhile, I hope you did enjoy the holiday card I made instead:

Flags Of Christmas

One Response to “Bytebots Assemble!”

  1. steev Says:

    so cool! I look forward to Xmas!

Leave a Reply