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:

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.


Rockit Kit Build

After a few sessions of building, the Rockit is finished and working!
Rockit synth kit by HackMe Electronics

The Rockit has 2 digital oscillators, a 2-pole analog filter with low-pass, band-pass and high-pass modes, and 2 LFOs that can be routed to different control inputs of the oscillators and filter. From first impressions of playing the Rockit, the analog filter sounds nice. The band-pass mode of the filter is especially good, and offers something different from standard low-pass filtering, which can give the Rockit a nice ‘vocal’ sound when played in this mode.

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 in avra (in avra-<version>/includes/) and copy it to your meeblip source directory containing meeblip.asm
4. Run the c pre-processor on to remove #define etc:
    cpp -P > temp
    mv temp
5. Remove the long comment in 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.

SX-150 MIDI Interface

Gakken SX-150 MIDI interface
Gakken SX-150 synth, with MIDI interface circuit.  A Sparkfun AVR programmer was used to program the attiny2313 microcontroller used in the circuit.

The Gakken SX-150 synth has a stylus which is touched on a continuous strip to control the pitch of the sound. It’s hard to play tuned notes using the stylus and so a MIDI interface for the SX-150 is a good mod to make the synth more usable. For this reason, several MIDI interface designs have been developed, including designs by RJ, Stray Technologies, Narbotic Instruments and Mrbook. All of these interfaces convert MIDI to a voltage (MIDI to CV interface) which is connected to the stylus.

The Narbotic and Mrbook design are both Arduino based, the others microcontroller based standalone circuits. I’ve had a go at making RJ’s design, prototyping it on a breadboard. The circuit works well, although as RJ points out, the accurate tuning range is about 2 octaves. Beyond that, the tuning needs tweaking to the higher octaves using the pot included in the circuit.

SX-150 MIDI interface breadboard

The circuit uses all the components described by RJ, except I swapped the TLP552 optocoupler for a 6N137. I used avrdude to program the attiny2313 microcontroller using a Sparkfun AVR programmer.

One gotcha that’s worth pointing out in getting this circuit to work is that the attiny2313 ships programmed to use the internal clock oscillator at 1MHz, but the circuit is designed to work at 20MHz using the connected crystal. The serial interface to the MIDI input is set up in the code to work at 20MHz, and will not work at 1Mhz. This is because, roughly speaking, the UART in the attiny2313 cannot be set to run quickly enough to accurately receive MIDI at 31.25kHz baud for a system clock of 1MHz in asynchronous receiver mode. The clock can be set to use the external 20MHz crystal by programming the ‘configuration fuses’ using avrdude. The oscillator configuration is set in the lower fuse bits. These can be read using avrdude as follows (this is for a Sparkfun programmer, option -c may need to be changed for other programmers):

avrdude -c usbtiny -p attiny2313 -U lfuse:r:-:h

Avrdude shows the default lower fuse configuration as 0x64. To use the external 20MHz crystal, the following avrdude command can be used:

avrdude -c usbtiny -p attiny2313 -U lfuse:w:0xE8:m

The attiny2313 should be ready to be programmed with the hex code provided by RJ. This can be uploaded using avrdude using the command:

avrdude -c usbtiny -p attiny2313 -U flash:w:SX150MIDI.hex

Update: I prototyped the MIDI interface onto a stripboard to have a permanent version of the circuit, here it is:

SX-150 MIDI interface prototype

SX-150 MIDI interface circuit board
The prototype stripboard. A programming header (top centre of board) is included for programming the attiny2313 microcontroller with the Sparkfun AVR programmer.

Gakken SX-150 Synth Kit

The Gakken SX-150 analog synth kit, distributed by Make, came in stock again recently and so I ordered one. Here’s the finished article:
Gakken SX-150 synth

This is a nice kit for anyone starting out making, it simply screws together (no soldering needed). The SX-150 is played with a stylus with a continuous contact strip, there are no individual contacts tuned to notes, unlike the Stylophone. This makes it hard to play notes, but is good for sliding pitch effects. However, because it has a small but fully analog synthesis circuit, it can still make usable sounds. Make have published a hack to allow it to be controlled by MIDI which should make it usable for playing notes and sequencing.

The instructions for the SX-150 describe the principles behind the analog synthesis circuits so it’s potentially a good starting point for creating analog synth circuits or maybe even hacking the SX-150 itself. One hack could be to add more synthesis controls such as LFO depth and resonance level, amongst others.

Gakken SX-150 circuit board top
SX-150 PCB front, the controls and synth circuit capacitors are mounted here.

Gakken SX-150 circuit board bottom
SX-150 PCB back, most of the synth circuit components are surface mounted here.

The kit comes with a chronicle of synthesis which includes a section on hacking projects. I guess it would help if you can read Japanese… although a few ideas can be got just from the images.

Gakken SX-150 synthesizer chronicle
Gakken Synthesizer Chronicle

Gakken SX-150 synth box
SX-150 Box

Meeblip DIY Kit Build

My Meeblip DIY kit is now built and making noise!
Meeblip synth kit

The hardware of the Meeblip is perhaps about as simple as a digital synth could possibly be: a microcontroller (with a good number of switches and knobs connected it), a MIDI interface to get notes in, a digital-to-analog convertor, and just enough audio circuitry to get sounds out. All the subtractive synthesis is done in the microcontroller, so it sounds like a simple soft-synth plugin. Except of course it lives in its own hardware, where the audio output circuit seems to add a bit of pleasing grunge to the sound.

Reflex Audio/CDM are steadily developing new versions of the Meeblip. The circuit board of this one is revision 1.31 SE which has some changes to previous versions: it’s now red, has a power switch, there is no USB power, and the connectors are mounted on the bottom to make positioning a front panel easier. There’s no case with the DIY kit (the quick build kit has a case), although there’s the option of the new SE case becoming available at the end of August, or even a home brew case…

The build instructions are easy to follow, although they are yet to be fully updated for the 1.31 SE board. So if you have a go at building this revision, one gotcha is that in order to check the power (step 3), all the power supply components need to be soldered in first, including the power diode, regulator and new power switch. One other thing to note is that the Meeblip needs a good low-noise external power supply, otherwise it can get some hum on the audio.

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…