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

Thread: Building and learning synthesis with Teensy - a resource I've made

  1. #1

    Building and learning synthesis with Teensy - a resource I've made

    I've always been into teaching and have written a lot of things for learning maths, so given the fun I've had (re)learning synthesis, coding with web audio and building synthesiser tools with Teensy, and also the number of people who want to use the Teensy to do similar things, I thought it might be good to put together something covering what I consider the foundations.

    The first draft is here:

    It's a website including over 30 webapps to allow visual/interactive learning of the important principles, 10 Teensy + Audio Shield projects, and a bit of history. I also discuss & demonstrate patch creation using a simple open source synth kit, Mentor, a 16-voice polyphonic Teensy-based synth, designed for learning subtractive synthesis.

    I'd be very happy to hear of any errors or confusions that you might notice, or for any constructive suggestions. I've got several ideas for additions - mostly relating the content to specific synths, but I'm happy for now with the coverage and depth.

    The contents are as follows:
    1 Sound Waves and Oscillators
    1.1 Properties of Sound Waves, 1.2 Wave Types, 1.3 Harmonics, 1.4 Pulse Waves, 1.5 Playing Notes and MIDI, 1.6 Summary
    2 Combining Oscillators
    2.1 Mixing Wave Types, 2.2 Phase, 2.3 Detuning, 2.4 Noise, 2.5 Summary
    3 Audio and the Teensy
    3.1 The Teensy Pinout, 3.2 Setup on a breadboard, 3.3 Project 1: One oscillator - control pitch and amplitude,
    3.4 Project 2: One oscillator - control pitch and wavetype, 3.5 Project 3: Three oscillators - control pitch and wavetype mix,
    3.6 Project 4: Two oscillators - control pitch and detune, 3.7 Project 5: MIDI input, 3.8 Summary
    4 Filtering
    4.1 Low Pass Filtering, 4.2 Resonance, 4.3 High Pass Filtering, 4.4 Project 6: Teensy Filtering, 4.5 Key Tracking. 4.6 Summary
    5 Envelopes
    5.1 Attack and Decay, 5.2 Sustain and Release, 5.3 Project 7: Teensy ADSR Envelope, 5.4 Linking the Envelope and the Filter,
    5.5 Inverting the Filter Envelope, 5.6 Summary
    6 Modulation
    6.1 The LFO, 6.2 Pitch Modulation, 6.3 Filter Modulation, 6.4 Project 8: LFO Modulation, 6.5 LFO Wave Shapes,
    6.6 Pulse Width Modulation, 6.7 Sample and Hold, 6.8 Project 9: LFO Shapes, 6.9 Summary
    7 The Amplifier
    7.1 LFO Amplitude Modulation, 7.2 Ring Modulation, 7.3 Summary
    8 Effects
    8.1 Portamento, 8.2 Reverb, 8.3 Delay, 8.4 Chorus, Flanger, Phaser, 8.5 Distortion, 8.6 Project 10: Delay Effect, 8.7 Summary
    9 Introducing Mentor
    9.1 Specifications, 9.2 Firmware. 9.3 The Control Encoder, 9.4 The Control Matrix, 9.5 Oscillator Settings, 9.6 Filter Settings,
    9.7 Envelope Settings, 9.8 LFO Settings, 9.9 Amplifier Settings, 9.10 Effects Settings
    10 Mentor Patch Presets
    10.1 INIT, 10.2 Strings, 10.3 Brass, 10.4 Solo Brass, 10.5 Wobble, 10.6 Smooth Bass, 10.7 Dirty Bass, 10.8 Alien, 10.9 Pulse,
    10.10 Pad, 10.11 Piano, 10.12 Squash
    11 Other Kinds of Synthesis
    11.1 Additive Synthesis, 11.2 Wavetables, 11.3 FM Synthesis, 11.4 The Mathematics of FM, 11.5 Exploring FM,
    11.6 FM Algorithms, 11.7 Samplers
    12 A Brief History
    12.1 Synthesiser Prehistory, 12.2 Evolution of Synthesisers, 12.3 Timeline
    Appendix All the Apps

    Here is a list of the webaudio apps:
    1 Sound Waves and Oscillators
    Wave Types, Adding Sines, Wave Type Harmonics, Pulse Waves, Four Tone Organ
    2 Combining Oscillators
    Mixing Wave Types, Detuning, Noise
    4 Filtering
    Low Pass Filter, Resonant Low Pass Filter, High Pass Filter, Key Tracking
    5 Envelopes
    AD Amplitude Envelope, ADSR Amplitude Envelope, Filter Envelope, Inverting the Filter Envelope
    6 Modulation
    LFO Pitch Modulation, LFO Filter Modulation, LFO Shapes, Pulse Width Modulation, Sample and Hold
    7 The Amplifier
    Amplitude Modulation, Ring Modulation
    8 Effects
    Portamento, Reverb, Delay-Chorus-Flanger, Phaser, Distortion
    11 Other Kinds of Synthesis
    Drawbar Organ, Wavetable Synthesis, FM Synthesis

    And here is a list of the Teensy Projects
    Project 1: One oscillator - control pitch and amplitude
    Project 2: One oscillator - control pitch and wavetype
    Project 3: Three oscillators - control pitch and wavetype mix
    Project 4: Two oscillators - control pitch and detune
    Project 5: MIDI input
    Project 6: Teensy Filtering
    Project 7: Teensy ADSR Envelope
    Project 8: LFO Modulation
    Project 9: LFO Shapes
    Project 10: Delay Effect

    Finally, here are some snapshots to give an idea of how things are presented:

    Click image for larger version. 

Name:	Filter.jpg 
Views:	32 
Size:	111.7 KB 
ID:	24855
    Click image for larger version. 

Name:	TeensyProject.jpg 
Views:	29 
Size:	127.7 KB 
ID:	24856
    Click image for larger version. 

Name:	Effects.jpg 
Views:	33 
Size:	136.1 KB 
ID:	24854

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Very nicely put together!

  3. #3
    Senior Member Blackaddr's Avatar
    Join Date
    Mar 2017
    Wow, this looks awesome!

  4. #4
    Very useful indeed.

  5. #5
    Senior Member houtson's Avatar
    Join Date
    Aug 2015
    If there was a like button I'd press it - looks great.

  6. #6
    Expanding upon what I said above, which was a little minimal, I liked the way you posted whole code examples, which work.

    There were several instances where I thought "Hey! That's better than my method!".

    I also liked the interactive apps. A useful tool for visualising the synthesis process on the go.

  7. #7
    cool, I wish something like this had been available when I first started exploring the teensy for audio projects :-)

  8. #8
    I definitely hope it helps people get started - and helps them understand things within a broader context.

    Much of what I wrote I already knew, but there were still a good few places where I realised I had gaps in my understanding, and others where my "understanding" was just plain wrong!

Posting Permissions

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