Building and Uploading the Rockit Firmware on Mac OS X

Like the Meeblip synth, the supported tool for Rockit development is AVR Studio which can only be used with Windows. It’s possible to build the Rockit code from the Mac OS X command line using the avr-gcc compiler and a new Makefile. The avr-gcc compiler is available for installation on Mac OS X through¬†MacPorts. You’ll also need to install avrdude which is also available from MacPorts.

I’ve adapted this Makefile to build the Rockit code. This Makefile may also work with Linux, although I’ve not tried it.¬†Simply place it in the directory with the Rockit source (make sure it’s named Makefile, not Makefile.txt) and type:

make
to build the source, then:
make hex
to create the Rockit.hex file for downloading. I’ve setup the Makefile to support the Sparkfun Pocket AVR programmer using avrdude so typing:
make install
will also upload the generated Rockit.hex file to the Rockit. If you’re using a different programmer, you’ll need to edit the writeflash target in the Makefile (line 199).
Alternatively, the avrdude command to upload the firmware is for the Sparkfun Pocket AVR programmer is:
avrdude -c usbtiny -p m644p -U flash:w:Rockit.hex

The avrdude options above can be modified to use your programmer.

The Rockit kit doesn’t ship with an AVR programming header, so you’ll need to solder your own header on the board. Here’s the correct way to connect the Sparkfun Pocket AVR programmer to the AVR header on the Rockit board:

Hackme Rockit with Sparkfun Pocket AVR programmer connected

Hackme Rockit with Sparkfun Pocket AVR programmer connected to the AVR programmer header. Note the orientation of the connector, with the wires facing toward the top of the board.

The header must be put on the top of the board so that the header pinout lines up with the AVR programmer connector. With a standard header on the board this looks like it will make it fairly tight against the case, although I’ve yet to try assembling a Rockit case.

 

Building the MeeBlip Firmware on Mac OS X

Here’s how you can build the Meeblip firmware on Mac OS X. For Windows, AVR Studio can be used to build the firmware. For Mac OS, the command line tool avra can be used, and presumably this will also work on Linux, although I’ve not tried this. Using avra to build the firmware was discussed on the MeeBlip forum, but I’ve summarised the steps below. This also includes the step to download the firmware to the MeeBlip microcontroller using the Sparkfun Pocket AVR programmer and avrdude. Full instructions for downloading the firmware can be found on the MeeBlip firmware page.
1. Download and build avra for Mac OS X and add it to your path
2. Install avrdude (one easy way is using Macports)
3. Locate the library file m32def.inc in avra (in avra-<version>/includes/) and copy it to your meeblip source directory containing meeblip.asm
4. Run the c pre-processor on m32def.inc to remove #define etc:
    cpp -P m32def.inc > temp
    mv temp m32def.inc
5. Remove the long comment in m32def.inc on line 465 as it is not compatible with avra.
6. Remove all comments (at the end of lines starting with a semi-colon) from meeblip.asm starting with a \ following the comment semi-colon and zero or more spaces as they are also not compatible with avra (these will be removed from future versions of the source). For example, remove comments from the end of the lines that have any of the following semi-colon backslash combinations below: 
  ;\
  ; \
  ;  \
  ;   \

7. Assemble the meeblip source with: 

    avra meeblip.asm
8. Download the assembled hex using avrdude: 

    avrdude -c usbtiny -p m32 -U flash:w:meeblip.hex

If you’re using a different programmer, you may need to replace the avrdude -c option with the one for your programmer. Here’s a picture of how the Sparkfun Pocket AVR Programmer should appear connected to the MeeBlip:

MeeBlip synth circuit board with Sparkfun Pocket AVR Programmer connected
Meeblip 1.31SE board with a Sparkfun Pocket AVR Programmer connected. Note the orientation of the connector, with the wires facing away from the audio and MIDI ports.

Theremin Style Music Controller

I’ve built a music controller that senses hand movements, in a similar way to a Theremin, for an interactive musical installation dorkbot bristol is exhibiting at the BV Open Studios 2011 this October. I’m hoping that people will be able to have some fun playing with the sounds of some music sequences being synthesized on a Mac by moving their hands in front of it. It has two sensors which measure how far your hands are above the box so you can move your hands up and down to control different aspects of the synthesized sounds. There are also four touch sensors that change the sounds being played when you rest a finger on them.
The aim is that the player should be able to explore the sound with their hand movements, the hand movements do not create the music itself. In this way, it should not require any special musical skill so anyone can have a go and make nice sounds, unlike a musical instrument like the Theremin which requires skill to play a tune.
The front panel. There are two IR distance sensors for the left and right hands and four touch sensors.

I wanted the hardware build to be as quick and simple as possible so the sensors are mounted in a cardboard box. The unit plugs into a Mac running Reaktor and controls the music being produced.

Inside the box.

The sensors are connected to an Arduino Uno, which has some code to send the sensor data as serial data over USB to the Mac. On the Mac, the control and routing of the sensor data is handled by some code developed in Processing to send the sensor data as MIDI and OSC to Reaktor.

The electronics components used in this project are:

  • Arduino Uno
  • Seeed Twig I2C Touch Sensor Controller and 4 Sensors
  • Seeed Stem Base Shield
  • 2 Sharp 2Y0A21 Distance Sensors

Arduino Uno and Stem Base Shield.

MeeBlip Hackable Synth

Meeblip open source synth

The MeeBlip is an open source hardware digital synth that was designed by James Grahame of Reflex Audio in collaboration with Peter Kirn of Create Digital Music.

The MeeBlip is designed to be hackable – easily modified to change the way it works. The MeeBlip seems like a good starting point for developing my own hardware synth projects so I ordered a kit to build with a view to doing some hacking…