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

Thread: TSynth - Two Oscillator Polysynth

Hybrid View

  1. #1

    TSynth - Two Oscillator Polysynth

    Hello. Another day, another Teensy synthesizer. TSynth is a two oscillator, four note polyphonic synthesizer with a large number of waveforms including user defined, state variable filter, two envelopes, PWM options, LFOs for oscillators and filter, effects, patch saving and recall. I went mad with the Audio Library really and cannot begin to express how fantastic it sounds and the possibilities it opens. The full spec is below and it fully utilises the USB host on the Teensy 3.6. It will receive MIDI via the client USB from a pc (which also provides digital audio appearing as a soundcard), the USB host port (I can connect my controller keyboard directly) and normal 5-pin DIN MIDI.

    Click image for larger version. 

Name:	20190829_173056.jpg 
Views:	22 
Size:	242.0 KB 
ID:	17379

    Click image for larger version. 

Name:	20190829_173110.jpg 
Views:	27 
Size:	209.9 KB 
ID:	17380

    Click image for larger version. 

Name:	20190829_173147.jpg 
Views:	16 
Size:	92.6 KB 
ID:	17381

    Most of the pots, switches, buttons, display and encoder are connected via two 16 channel MUXs, the rest to the Teensy pins directly. It is a mess of wires inside and a PCB would be fantastic. A demo video will follow soon.
    Click image for larger version. 

Name:	20190703_104741.jpg 
Views:	30 
Size:	191.2 KB 
ID:	17382

    Teensy 3.6 with Audio board - this shows how the USB host port pins were soldered.
    Click image for larger version. 

Name:	20190703_101229.jpg 
Views:	36 
Size:	172.1 KB 
ID:	17383

    Oscillators
    • Four voice polyphony (last note priority), two oscillators per voice, detunable with +/- 2 octaves range, Sine/Sample & Hold (like tuned noise)/Square/Sawtooth/Ramp/PWM/Var Triangle/User waveforms and level
    • Pulse Width/Var Triangle can be set for each oscillator with PWM by dedicated LFO or from the filter envelope
    • Pink noise with level
    • Dedicated LFO for pitch mod (can be retriggered by note on) , Sine/Triangle/Sawtooth/Ramp/Square/S&H waveforms
    • XOR ‘Ring Mod’ (creates lots of harmonics with certain waveforms)
    • Unison with all eight oscillators detunable from each other
    • +/- 12 semitone pitchbend range
    • Mod wheel controls pitch LFO amount

    Filter
    • State variable 12dB filter (SVF) with continuous mix between LP and HP (provides notch filter) and BP
    • Cutoff freq and resonance
    • Cutoff can be modulated by dedicated ADSR envelope, dedicated LFO and key tracking
    • LFO has same waveforms as pitch LFO (can be retriggered by note on) and rate can be set to match MIDI clock (tempo) with variable delay per bar


    Amplifier
    • Dedicated ADSR envelope
    • Glide (up to 1 octave range) with variable time
    • Volume for DAC output
    • Effect amount and mix - currently for stereo chorus but could be set up to allow choices in programmer


    Programmer
    • 160x80 IPS colour display
    • Encoder with button for data entry, Back button for menu navigation
    • Save and Recall buttons for storing patches, holding Recall initialises the current patch to match the panel controls
    • The programmer makes the synth very flexible with possibilities for changing User waveforms, alternative filters, alternative effects with further parameter settings.



    MIDI
    • USB HOST MIDI Class Compliant (direct connection to MIDI controller, no PC needed)
    • USB Client MIDI In from PC
    • MIDI In 5 pin DIN



    Audio
    • SGTL5000 Audio Shield 16 bit, 44.1 kHz Stereo out
    • USB Audio in/out—appears as 16 bit, 44.1 kHz audio interface on PC



    Hardware
    • Teensy 3.6 with SGTL5000 Audio Shield. Two 4061 multiplexers providing 32 channels from the pots into two ADCs. The rest of the pots and switches use remaining pins on Teensy.
    • Enclosure is laser cut acrylic with etched labels filled with yellow acrylic paint (this technique could be improved with experimentation), end cheeks are 3D printed.

  2. #2
    Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    23
    @UHF wow - that looks excellent and super functional, I bet it's been a labour of love for a few months!
    How does it sound ? I'd love to hear your 'Soild Bass' patch

  3. #3
    Hello, here's a demo of TSynth. Not quite Tangerine Dream... but the whole thing was originally inspired by Dave at Notes & Volts TS-1 synth building series. It's designed to show the range of sounds the Audio Library can produce when you take the time to design and try things out. All sounds are from TSynth with built-in stereo chorus, mixed on Ableton Live with volume, EQ and panning adjustments only. I think it could be pushed to 6 or 8 voice polyphony before the Teensy 3.6 cpu runs into problems - it is still running at 180MHz too. Solid Bass at 1:33!


  4. #4
    A screenshot of the Audio Design tool to answer a few questions. The modulation connections make it complicated but more voices could be added.

    Click image for larger version. 

Name:	Annotation 2019-09-06 001358.jpg 
Views:	55 
Size:	108.6 KB 
ID:	17512

  5. #5
    Junior Member
    Join Date
    Sep 2019
    Posts
    2
    Very nice project I listened demo on YT and it sounds for me like good VA - some thin, metallic sound, and some good basses.

    But indeed, routing in design tool is kinda messy. In my first thread I asked about merging audio objects into bigger class, hope somebody will help

  6. #6
    There are quite a few improvements that could be made and it would probably end up looking like it's main rival, the Axoloti. A major improvement to the quality is anti-aliasing the waveforms and better control of the effects. Running polyphonically on a T4, you could blow away a few sub $500 synths.

  7. #7
    @UHF What a super project! Are you planning to make the code available for others? I'm really interested in building one.

  8. #8
    Hello, yes I'll publish the code sometime. The sound creation and the control of it is finished. All the front panel controls have MIDI CC numbers set up. Patch saving and recall isn't finished (it needs a way to handle these properly and allow naming with the encoder) and the TFT display will show parameter values as they're being changed and reverts back to the patch name after a time delay - but not totally reliably (threading). I don't like coding in C and am tolerating it. The code isn't too difficult to change for different hardware, such as display, choice of MIDI inputs.

    If you decide to build something like TSynth, the wiring is the worst aspect and you either need a proper pcb or come up with a way of neatly soldering very flexible wires to every control and routing them to MUXs and the Teensy. I used stiff DuPont wires and had to solder a pin header to each control. You can disassemble it, but it's not something you would ever want to do. It is a one-off prototype.

Posting Permissions

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