Manual

Arduino Piggyback Synthesizer Manual

The Arduino should at least support 5V PWM and have 3 timers

Verified Arduino models which are compatible:
Arduino Uno rev3
Arduino Duemilanove
Arduino Nano

Verified Arduino IDE versions:
1.0.1
1.0.5
1.5.6-beta

Hooking up the hardware

The first step is to connect the piggy PCB to the Arduino.
On the side of the two potentiometers there are two pins that are left over (stick out).
On this side there there is a big gap between the headers.

On the side of the trimpot (the blue thingy) there are no pins left over, but on the right side are are two pins not present.
On this side there there is a small gap between the headers.

View from the side of the midi ports:

Now hook up audio (mini jack marked “X1”). The mini jack is a line-out, NOT a headphone connector.

..and connect MIDI in (middle connector marked “X2”):

Hook up USB to the arduino.
A fully hooked up piggy+arduino (even including 9V external power supply) look like this:

Installing the firmware

  • Download and install the firmware.
  • Make sure you install the libraries to your Arduino IDE’s library directory.
    This should be Documents/Arduino/libraries or whatever is the convention on your OS’ version of the Arduino IDE.
  • Use the Arduino IDE to import the new libraries : under Sketch->Add library..
    • midi
    • envelope_control
    • FrequencyModulator
    • vco

    Note: older firmwares need less libraries to be installed.

  • Now load the sketch piggy_aciiid.
    This is a stand-alone tracker, no MIDI involved yet.
    It’s good for testing.
  • Now upload the sketch to the arduino and after a few seconds you should hear a bassline.
    If that doesn’t sound anywhere near the example, it might be that a pin is not pushed in far enough.. try pushing down a bit harder.
  • When it does sound correct, then the piggy_midv sketch can be tried.

MIDI in

Now you should be able to send midi notes and pitch bend to control your piggy.

By default, the Piggy responds to MIDI channel 1, but this can be easily be modified by changing a single constant midi_chan in the piggy_midv source code.

ADSR and modulation are supported by the hardware and firmware and can be controlled by MIDI control change packets.

Piggy command MIDI control number (hex, dec) Value information
Modulation depth 0x01, 1 0: no modulation, 100: full modulation, >100: over modulation
Relative modulation frequency 0x0C, 12 127 = 0.99 * note pitch, 64 = 0.5*note pitch, 0 = off
ADSR attack time 0x49, 73 0=0.0s .. 127=4.0s
ADSR decay time* 0x4B, 75 0=0.0s .. 127=4.0s
ADSR sustain level* 0x50, 80 0:Mute .. 127:Max
ADSR release time 0x48, 72 0=0.0s .. 127=4.0s

*) Firmware 1.2 onwards

Use the modulation wheel or stick to control modulation depth.
FM is a pretty brutal affair and adds a lot of depth to the sound, and can also be used to make oldschool telephone like sounds, and go a bit off-key, if you are into that
sort of thing. Due to its nature, FM makes huge demands on the stability of the oscillators.
You can tune the VCO ever so slightly for nice effects.

MIDI thru

The Piggy’s MIDI thru (the DIN-5 port most to the side marked “X3”) may be used to daisy chain multiple Piggies together or attach other equipment, like (recommended) a drum machine.

Troubleshooting

Arduino models

Arduino models which seem to have problems:
Leonardo (no MIDI, but seems fine otherwise)

VCO tuning

If you should think your piggy sings out of tune you can adjust the blue trimpot with a small screwdriver.
By default it should not be the case.
It’s factory calibrated to have MIDI note 36 (C2) at 65.41 Hz and the right components were selected to get the VCO as temperature stable as possible.
But perhaps in very cold environments (near freezing) it could be very slightly out of tune.
In this case you could adjust the trimpot slightly to the left (anti-clockwise).

Recording and noise reduction

Piggy is an analogue synth.. and all analogue devices have an intrinsic and characteristic noise. But typically, no digital noise (transmitted from the arduino or from other digital devices in the direct vicinity) should be heard. Nor should any 50 or 60 Hz mains hum should be heard. Digital noise can be avoided in two ways:

  • If USB power source (ie. your laptop or PC) is noisy, disconnect and use a good 9V or 12V AC/DC adapter! Take care that the adapter should be good, ie. not carry any mains hum!
  • Use extra headers between Piggy and Arduino. As displayed below.. Or in the worst case disconnect them and hook them up with patch cables instead! Pins to connect: DIGITAL 2,3,5,6,11, GND, 5V. As displayed below..

If everything worked out only very slight white noise should be heard. This is a result from the current running through resistors (so-called thermal noise)… and of course the resonance resulting from the filter 😉

Good luck and happy freaking!