New learner looking for guidance

4aestral

Member
I've been noodling on this synth idea for a long time, and it looks like a Teensy can do what I want to do:
digital-input-synth.png

An 8 voice polyphonic, 2-osc subtractive synth. Amp and Filter envelopes, 2 LFOs per voice, and one or two global LFOs. The first row of knobs would be rotary data entry knobs, with the 5th one "Control" having a push button. The "Control" would act as the main switch that changes the functions for the other 4 encoders.

I'm not sure where to start with the display, as my only requirements are that it can be wide enough to correspond to the encoder layout, and that it can accommodate 3 rows of text. Filter & Resonance are obvious, and A + B would be user-configured

I'd also like to know if there are any things to look out for regarding the data encoders before I purchase them to test with.

I'm also wondering if I should get the 4.1 if I want to be able to save presets, or can that be done with a 4.0?

Thanks for looking.
 
@4aestral:

Welcome to the Teensy world !! You will be very pleasantly surprised with how much you can do with the Teensy + Audio Adapter towards a very capable synth !! @PaulStoffregen has created a very capable collection of hardware & software in the Teensy world that the rest of us get to take advantage of & enjoy !!

I am only slightly biased with the recommendations that I will make, based upon my personal experience developing my own TeensyMIDIPolySynth (TMPS) project. I started with physical pots, buttons, and LEDs on the initial version. After many additions/modifications, I quickly realized that I was running into limitations that were strictly a result of the hardware interface (the pots, buttons, & LEDs) that I chose to use. I physically ran out of front panel space on the container that I chose very quickly.

So, in version 2 (now version 5), I am making use of <this> touchscreen display from buydisplay.com, with the following specifics:

Code:
         Display options (ER-TFTM070-5):
            Interface:               Pin Header Connection-4-wire SPI
            VDD:                     5.0V (can always change the jumper later to power from 3.3VDC)
            Touch Panel:             7" Capacitive Touch Panel with Controller
            MicroSD Card Interface:  Pin Header Connection (not useable - see display docs)
            Font Chip:               (none selected, but you may want to make use of their custom fonts, so select appropriately)

With this experience, I would strongly suggest that you use a touchscreen display (the 7" display referenced above provides plenty of screen space to add a variety of controls) for all of your controls. The nice thing about taking this approach is that you can add/delete/modify your controls on-the-fly, without having to worry about how "the physical hardware controls" are wired and/or located on the front panel . . . it's all digital (or as we used to say at work, "it's just a few lines of code") !! You can even have a state-driven display that changes as your different functions are selected. In my (biased) opinion, the slight extra expense of the larger touchscreen is certainly justified by the unlimited versatility.

Hope that helps . . .

Mark J Culross
KD5RXT

P.S. I have developed (& refined over time) a nice collection of interface controls (buttons, sliders, indicators, etc.), and I have created a template sketch that demonstrates the primary capabilities, as well as the state-driven menu capabilities. I can send that template sketch to you if you'd like to play with it, just so you have something to get started with. MJC
 
@kd5rxt-mark

Thanks for the reply! I have used an iPad with Audiokit Synth One and while I like the sound, I am not thrilled with the touchscreen experience. that's why I'm wanting to build something with physical knobs.

But who knows, maybe I just need to do the whole journey and will end up with touchscreen too :)
 
I've been noodling on this synth idea for a long time, and it looks like a Teensy can do what I want to do:
View attachment 36313
An 8 voice polyphonic, 2-osc subtractive synth. Amp and Filter envelopes, 2 LFOs per voice, and one or two global LFOs. The first row of knobs would be rotary data entry knobs, with the 5th one "Control" having a push button. The "Control" would act as the main switch that changes the functions for the other 4 encoders.

I'm not sure where to start with the display, as my only requirements are that it can be wide enough to correspond to the encoder layout, and that it can accommodate 3 rows of text. Filter & Resonance are obvious, and A + B would be user-configured

I'd also like to know if there are any things to look out for regarding the data encoders before I purchase them to test with.

I'm also wondering if I should get the 4.1 if I want to be able to save presets, or can that be done with a 4.0?

Thanks for looking.
Hiya, that looks perfectly achievable with a teensy. Couple of things you asked about, that I thought I'd address, regarding the encoders and presets.

If you look at the "KY40" type encoders, they're a mechanical encoder, with a push button switch, and they will work with 3.3V from the teensy. They're cheap, very widely used and available on breakout boards, so very simple to wire up. Downside is, they're mechanical, as they are essentially a number of switches that the encoder library counts the pulses of, so there's a fixed number of "detents" per rotation, eg 12 or 24 depending on type. They can't be rotated that quickly, otherwise they may miss counts - "debouncing" the switches, and averaging, helps but slows down the readings of course. Using the integrated push button switch could maybe program a "coarse/fine" type control, of course. An alternative, which is smoother, more responsive, but higher cost, is optical encoders. I tend to use the 600 pulses per rotation ones on teensy, as they're a quadrature output, so can divide down by 4 and have 150 counts in just one rotation of the encoder - for MIDI, generally want 128, which works out nicely for a full travel. Downside of these encoders is that they're higher voltage, nominally 5-24V, so you can't wire them directly to a teensy 4.x, but I've found that (cheap) level shifter boards work ok. They're also physically larger - standard seems to be 39mm wide, so they're chunky, and deep, requiring enclosure size increases. I've recently tried some "mini" encoders that are 25mm wide, which seem to work well, too, which have the added bonus that the wiring comes out of the back, rather than the side of the encoder. Price wise, KY40 on a breakout come in at a couple of quid, the opticals at around £10. I'd recommend cheap encoders to begin with, get the project up and running, and use better components when its all working - the higher precision reading of the encoders will be easy to change in your code, after all.

As for displays, your options are numerous, but will to some extent be influenced by the physical size of encoders and wiring. The KY40 boards are roughly 17x15mm, and don't forget to allow clearance for the cabling, too :). Colour SPI displays such as the ili9341 ones are very well documented and pretty easy to use, come in a range of sizes and resolutions, and have established libraries for teensy. Tiresome that they're all in "inches", though. Some have a touch screen, some don't. Monochrome OLED displays work very nicely, but the smaller ones don't have mounting holes on the board, so they're awkward to mount directly to an enclosure. More er "traditional" looking 7 segment LEDs, controlled from a MAX7219, is probably not what you're looking for :) Take a look at the PJRC teensy pages for a few notes on displays.

As for choosing between teensy 4.0 and 4.1, well, some of that is down to pin count. For example, for an ILI9341 with touch screen you'll need to use 9 pins, and each encoder after that will need 2 pins, so you can run out of pins quick:). For presets, the built-in SD card on the 4.1 is useful, but I've used cheap I2C eeprom for saving presets to before now, so both are useable.

I'm with you completely - one of the reasons I started this as a hobby in the first place was my frustration at touchscreens, menus, and lack of physical controls. I'm tactile, I like having buttons, knobs, switches and dials :). Hope your project goes well.

Paul.
 
@Paul Hesketh Thanks so much for the answers. This is enough to get me going in the right direction! One more question, is it logical to start building with the bare audio then upgrade and update the project to audioshield later? Money is not an issue regarding the shield, but I'm asking if it's more hassle in terms of code and testing (rebooting, etc) while I am learning, since I expect to be doing a lot of trial and error.
 
Last edited:
The PJRC Audio Adapter Rev D stacks perfectly on top of either the T4.0 or the T4.1 (the pinout of the Audio Adapter matches 1-for-1 with the Teensy). It is not recommended to hard solder them together, but rather to use stacking header pins & sockets, just in case one or the other may need to be replaced. I usually put the pins on the Teensy, so it can be plugged into a breadboard when not using the Audio Adapter. Similarly, I put the sockets on the Audio Adapter. Stacking them this way leaves the programming button on the Teensy easily accessible. Operation/configuration of the SGTL-5000 on the Audio Adapter is completely taken care of by the Audio library, so I would definitely recommend starting with both of them right away.

Mark J Culross
KD5RXT
 
I just ordered a 4.0 + Shield & pins on the black friday sale.

I already have a box of potentiometers and several sets of resisters/caps and a breadboard.

I have 5 KY-040 encoders in my amazon cart, but I'm wondering what exactly will I need to connect serial or TRS midi? Anything other than a 6N138 and resistors? Is there a diagram for setting up midi-in to a 4.0?

Or while I'm building, would it be easier to just use a momentary button to trigger a note?
 
Last edited:
Take a look <here> for the recommended MIDI circuitry. MIDI on the Teensy is very easy, and the audio library capabilities are fantastic !!

Mark J Culross
KD5RXT
 
I'm looking at this display, it appears to be approx 3" wide viewing area with 20x4 character space,
Only 4 wires to connect. Any ideas if there would be any electrical or code problems with using this LCD?

Here are my planned menu layouts (so far):
Menus.png
 
Back
Top