Turn Your Arduino Into a 4 Voice Wavetable Synth With Only a Few Components...





Introduction: Turn Your Arduino Into a 4 Voice Wavetable Synth With Only a Few Components...

Multiple synthesizer projects have been done for the Arduino, but few have been able to utilize the full power of the Arduino processor. DZL from GeekPhysical wrote a 4 voice wavetable synthesizer that is one of the more advanced software based synths for the Arduino.  It has wavetables included (sine, saw, square and triangle) and envelopes to create beats.

This instructable will show you how to make a simple sequencer that plays a little melody. You can hear how it sounds here:

It is up to you to modify the code to do many other things. Possible examples could be a midi controlled synth (sample code included), it could be a strange noise machine like this one:

Or you could detect touch and convert it into sound patterns:


Step 1: Parts

You should use the following parts:

  • Arduino board
  • BreadBoard
  • Wires
  • 2.2k Resistor
  • 100n Capacitor
  • 100u Capacitor
  • Jack where left and right channel has one wire and one wire to ground
  • A pair of computer speakers

  • Don't worry if you don't have the exact values. It will probably work, but might be with lower sound quality. The Arduino is not powerful enough to drive a pair of headphones so you will need some kind of preamp for that - e.g. a headphone preamp like this one.

    Step 2: Add the Components to Your Breadboard

    Start out with adding the components to the breadboard as the picture depicts. If you want diagram based instructions look at the third slide in this step.

    Step 3: Connect to the Arduino Board

    Connect one wire from pin 6 to the breadboard and one wire from ground to the breadboard.

    Step 4: Connect to the Speakers

    Connect the jack connector to the breadboard as shown and plugin the jack from the speakers.

    Step 5: Upload Code

    ***Remember to read the update below (keeping the old info for consistency)***

    Below are the simplified steps to uploading the code to your Arduino board. If you are brand-new to Arduino, you can find a great step-by-step guide here to help you get your board connected and up and running, it's very simple and then you can continue with the below steps.

    • Download Arduino: www.arduino.cc
    • Connect the Arduino board to the computer via usb.
    • Download the code from github here: https://github.com/Illutron/ArduinoSynth (Old code - look below)
    • Upload the code to the Arduino board.

    Congratulations - you are ready to go!

    A new version of the synth can be found below: 


    This version works with the newest version of the Arduino Ide and the whole synth has been simplified. It should be more simple to hack and modify for ones own needs.

    The output should be connected to pin 11 (Configurable to 3 as well). In the old code one should use pin 6.



    • Paper Contest 2018

      Paper Contest 2018
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Science of Cooking

      Science of Cooking

    We have a be nice policy.
    Please be positive and constructive.




    its not clear at all how to upload the files to the board. do I need an .ino file like in the examples? can i use any of the examples and how? and how do I get it to add a .h file as a directory. please help thank you :)

    Download the zip archive from github, then add it to your arduino libraries as described here https://www.arduino.cc/en/Guide/Libraries ("Add .ZIP Library", then choose "the_synth" folder from the archive). Then just launch any .ino from the examples folder and upload to your arduino (song.ino will play the melody instantly after uploading). Pay attention that you should use pin 11 instead of 6 and 1K resistor instead of 2.2K. Good luck %)

    Works like a charm on my Leonardo ( thanx df99 for the conversion !).

    However, I would like to use a standard 5 pole Din midi cable at d0/rx.

    Can someone help me out here to do this ?

    I already have the midi interface ( 6N138 opamp & peripheral components installed on breadboard ).

    Thanks in advance


    Excellent library! However, it would not work with any Atmega 32U4-based boards (Leornardo, Micro, Pro Micro, etc) as it uses Timer 2 for the timer output compares. Timer 2 is missing from the 32U4. I re-wrote the library using Timer 4. This has the advantage of offering a few more differential output modes that were not possible with Timer 2. This is possible because the 32U4 has two addition timer output pins that mirror the state of the primary pin. Not all pins are available on all 32U4 Arduinos, but if they are, the library mod now supports them. The pins mentioned are the standard Arduino pin mappings to the Atmega 32U4.

    The new modes are:

    DIFF_10_13 - Differential mode on pins 10 and 13, same as old diff. mode

    CHB_9 - Single-ended mode on pin 9 (channel B)

    CHB_10 - Single-ended mode on pin 10 (channel B)

    CHB_DIFF_9_10 - Differential mode on pins 9 and 10 (with Channel B only!)

    CHA_5 - Single-ended mode on pin 5 (channel A)

    CHA_13 - Single-ended mode on pin 13 (channel A)

    CHA_DIFF_5_13 (default) - Differential mode on pins 5 and 13 (with channel A only!)

    Example: edgar.begin(DIFF_10_13);

    New library is at:


    I used the library to build an old-school phone phreak blue box, as it allows generation of multiple sine waves. See df9999999999 YouTube channel for details.

    I can't seem to be able to access that link, it keeps 404ing, could you please upload it again?

    Hi df99, I am quite desperate looking for a way of making this four voices synth to work with arduino mega adk or due, I assume your codedoesn't help but do you have any suggestions?


    I would really appreciate some help to make it work (as other people posted below, there is no sound) in an Arduino Mega ADK or Due.


    why no answers on the question asked the most??? how the #]%]%]< can I play the synth?? do i need to hook it up analog style and control it with midi out of a keyboard or can it be done through usb to arduino comm link?? a simple answer please! thanks ;)

    I made this couple of days ago, and love it! Such beefy low end :) . I'm trying to implement velocity sensitivity, but I'm kinda stuck. I passed midi_2nd from midi parser to synth like so


    Then modified mTrigger function in synth.h:

    void mTrigger(unsigned char voice,unsigned char MIDInote, unsigned char velocity)


    FTW[divider] = PITCH[voice] + (int) (((PITCH[voice]>>6)*(EPCW[voice]>>6))/128)*MOD[voice];


    It compiles fine, but doesn't change anything. Any suggestions?