Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Analog modeling monophonic synthesizer on Teensy 3.1

  1. #1
    Junior Member
    Join Date
    Aug 2014
    Canary Islands, Spain

    Analog modeling monophonic synthesizer on Teensy 3.1

    Hi all,

    I am a computer engineer and I have built some proyects using Teensy and Arduino. My last proyect was an analog modeling monophonic synthesizer using Teensy 3.1 with the DAC output. The project description is in spanish (sorry for non spanish-speaking people) at my blog:

    Here is a video of the project running (the audio is not very good because it has been captured with my mobile phone, it was night and it had a truck out on the street :-) )

    Entire source code available at:

    C++ object oriented source code compiled using a bare metal "arm-none-eabi" toolchain with custom linker scripts and initialization code.

    Some specs of the project:

    • Virtual analog modeling engine with:
      - 1x oscillator (wave table based with selectable wave form: sawtooth or square).
      - 2x envelope generators (ADSR).
      - 1x state variable filter (standard implementation with low pass, high pass, band pass and notch outputs).
    • Built in 16 step sequencer (I had to implement it because the MIDI input is for the next iteration of the project).
    • Fixedpoint math (Q16.16 format).
    • Sample rate: Now running at 32KHz but runs ok up to 44.1KHz (I choose 32KHz because 96MHz is divisible by 32KHz and hence the frequencies are more accurate).
    • No external inputs (it is still a "proof of concept").

    Feel free to contact me for any suggestion or more info.

    Thank you!
    Last edited by avelino; 07-22-2015 at 02:11 PM.

  2. #2
    Join Date
    Mar 2013
    Austin, TX
    Looks interesting! Any more sound samples?

    From the translated page it looks like you are using band-limited wave tables?

  3. #3
    Junior Member
    Join Date
    Aug 2014
    Canary Islands, Spain
    Hi John.

    Now it has only one sawtooth wavetable (the square wave is generated using a simple threshold comparison over this sawtooth signal) and this sawtooth wave table is not band limited: I just write a ramp signal on a fixed point values array.

    I only attempt to reduce the quantization error running over the table with deltas > 1. I assure this making the wave table to be al least of:


    samples of length. Thus, the delta value to run the table is:

    DeltaT = NOTE_FREQ / LOWEST_MUSIC_FREQ (DeltaT >= 1)

    I precalculate the DeltaT values for all the 127 MIDI notes and put then on another table. In this manner, the in runtime calculus is minimal.

    I will do a real recording session (no smartphone camera microphone) these days and I will announce it here.

    Thanks for your words.

  4. #4
    Just wanted to say I like it! I'm honestly a little surprised more people haven't started working on some serious synths (maybe they are keeping them secret?). The teensy+audioshield is just ripe for this kind of application, a really serious device is just waiting to happen!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts