News Archive

Hammer Synthesizer!

Thursday September 6, 2012

Let me tell you about ‘Hammer Synthesizer’, a multi-channel 1bit sound synthesizer inside a log of birch wood. It is played by hitting felt balls with a hammer. The device is made so simple, that I think it is worth to go a bit in detail.
So this will be a longer post, with codes and schematics, to help you to build your own funny synthesizer. – If you want.
There’s also a video of the thing in action at the end of this post.

Hammer synthesizer with duck hat

Please recognize the felted duck hat on the photo above. It is an integral part of playing the hammer synthesizer. Who plays it has to wear this hat. The hat doesn’t serve any technological function, but audience always appreciates proper stage outfits of musicians. Just think of Lady Gaga.

Close up of the electronics

I also want to tell a bit about where I made the synth: My girlfriend has recently been invited for a residency at Serde, an interdisciplinary art space in the little town Aizpute, which is in Latvia. Besides a ceramics studio, photo laboratory and many other nice workshops, Serde also has its own brewery. This was an additional good reason for me to visit my love there. And I have to say the beer at Serde is fabulous!
As soon as I arrived in Latvia, I took over the wood shop and started to work on a log of birch wood which eventually became the case of the synthesizer. My girlfriend and some other artists got meanwhile obsessed by the crafts of felting, which they’ve learned from the locals. That explains the felt ball interface and the duck hat.


I enjoyed the basic woodworking a lot. A physically demanding process, if you work without power tools! Fortunately, the home brewn beer gave me the required energy to carve the log into shape.

proudly presenting a wooden log

What you can see above is the cut out ‘container’ for the felt balls. Below is a picture of the electronics that I used inside the synthesizer.

battery and chip

It is basically an Atmega8, running on its internal 1MHz resonator. The electronics also has a 5V linear regulator, so it can be powered with a 9V battery. Later, I added a transistor as amplifier for the speaker.

But it can be built even more simple. On the drawing below, you can see a minimal circuit which will also work fine. Except the microcontroller, you only need a 100nF capacitor between +5V and ground. For the sound output, I’ve drawn a piezo speaker, as this won’t require any amplifier. As a power supply, you can use three or four 1.5V batteries (in my experience, the Atmega8 can handle anything between 4V and 6V).
For playing the different tones, the according input on PORTD has to be connected to ground. In my setup, I connected the metal part of the hammer with ground, while each felt ball was covered with conductive yarn. The felt balls were then connected via wires to the PORTD inputs of the controller. But of course, here you can be creative. The possibilities to build those switches are endless.

simple synthesizer schematic

The code is so short, that I’ll post it straight here. It’s written in AVR GCC but it will compile with minimal adaptations also on an Arduino.

//simple synthesizer published by niklas roy under beer ware license rev.42
//runs on atmega8 with internal 1mhz clock

#include <avr/io.h>
#include <stdlib.h>

uint16_t freq[8]= {3822,3405,3033,2863,2551,2272,2024,1911};
uint8_t  button[8];
uint8_t  play[8];
uint32_t count[8];
uint8_t  general_count;
uint8_t  pind_in;

int main(void)

  DDRD= 0;           //all portd’s are inputs
  PORTD=0xff;        //all inputs are pulled up to 5v
  DDRB= 0b00000010;  //speaker is connected to b1

    pind_in=PIND;    //get all bits from PIND register

    for (uint8_t i=0;i<8;i++){
      if((button[i])&&(play[i]<255))play[i]++;                     //hit
      if( (!button[i])&&(!(general_count))&&(play[i]>0))play[i]—;  //sustain
      if((count[i]&(1<<14))&&(play[i])) {PORTB=0b00000010;}else{PORTB=0;}

Finally, here’s a video of the instrument in action:

Credits to the duck hat go to Jonathan Cremieux. The felt balls were made by Kati Hyyppä. And Pauls Rubena is the hammer performer in the video.

Back to main page