MIDI Synth Shield for the Teensy

Status
Not open for further replies.

Davidelvig

Well-known member
I've built a Teensy-sized hardware synth (a shield) with built-in polyphony (dozens of voices), and pre-made instruments for the standard general MIDI set plus a drum kit.
I need it for my purposes to extend my Teensy-based midi controller. I am wondering if others need such a device, and/or would contribute to its design.
The third revision is ordered at OshPark now.

Basic features:
- Polyphonic MIDI synth (dozens of simultaneous voices)
- General-MIDI instrument coverage (GM1) plus one bank of GM2 percussion
- Teensy form factor
- Serial MIDI and SPI control through standard Teensy pins
- Earphone jack output - Possibly a separate output back to the Teensy for subsequent processing?

Paul, let me know if this conversation belongs elsewhere, or if you'd like to talk it through.

Others let me know if you'd like to contribute/test.

@OneHorse, I'd welcome a conversation since you've done add-ons on Tindy.

Thanks, all!

Dave
 
Last edited:
Bringing this to the top once more. Any other interest in assisting in testing a MIDI synth board?
 
Paul .... or if you'd like to talk it through.

I'm probably not going to get directly involved. Far too much other stuff to do. But I am here and watching. I'm mostly keeping an eye out for any technical issues you might run into with the audio lib or other lower-level support code.
 
David-

I'd be interested to know more about it. Are the general MIDI instruments from a chip like the VS1053 or SAM2195? Do you have any details on the synthesis engine? I'm all in favor of "dozens of voices"!
 
The current design is the VS1053.

I was not aware on those chips from Dream (like the sam2195)

I'd welcome a chat. Ill send you a message.
 
Is this a potential Audio Lib addition?
Am I getting this right that, I could:
- convert a soundFont into a C++ wave table , and
- use that wave table in a wave table synth object?
 
Ah silly me. I've always toyed with doing a synthy type PCB with touch keyboard and some encoders. I was planning on sticking a teensy + audio card on it but I'll watch this with interest.
 
Boards are in, and the first one assembled works well as I use it.
I'll be writing a library to make demonstration easy.
You'll need a Teensy 3.2 or higher, and a pair of earbuds if you'd like to test.

I'll have 4-5 to share for testing.

Stay tuned.
 
Boards are in, and the first one assembled works well as I use it.
I'll be writing a library to make demonstration easy.
You'll need a Teensy 3.2 or higher, and a pair of earbuds if you'd like to test.

I'll have 4-5 to share for testing.

Stay tuned.

If I'm lucky enough to get one, first thing I'm going to do is whistle the "The Bridge on the River Kwai" song into it and have it whistle it back, MIDI style!
 
It does not now. The input is from Teensy Serial1, and optionally SPI.
DIN input could be added. The DIN connector would add more height, but not many new parts.
What's the use you're anticipating?
 
It does not now. The input is from Teensy Serial1, and optionally SPI.
DIN input could be added. The DIN connector would add more height, but not many new parts.
What's the use you're anticipating?

I was thinking it would fit nicely with the project I'm planning, which is to put an embedded poly synthesizer (Teensy based) inside the body of an electric guitar so I don't need to connect to a PC/Mac for using guitar-to-MIDI tech. Although, a DIN input wouldn't be necessary for what I'm trying to do, just thought I might want to use it.

I'm sort of vacillating between:

1) using a standard hexaphonic guitar pickup with a USB MIDI receiver (Fishman TriplePlay) and getting a USB Host board (ordered with MIDI device installation) to communicate with a Teensy synth
-- OR --
2) converting 6 analog signals from a hexaphonic passive guitar pickup (Ubertar pickup) into digital signals in which I can perform FFT on and output as MIDI -- but this seems like it might be a bit out of my league. I've created a thread sort of detailing my thoughts on the second option.

With the 1st option, I'm pretty sure I can just use serial com from the USB Host board in order to communicate with a Teensy setup from your project. The second option, I probably would be designing my own solution entirely.

Although, I want to make sure the controls are decent (waveform selection, FM, etc) and that I could power it via batteries or rechargeable lipo, because that's what I'd want. I don't want it to be a floor pedal, it has to go inside the guitar.
 
Last edited:
Right, so you want to derive MIDI notes from each (analog) guitar string.
I'm getting midi notes from one analog mic connected to the Teensy... getting pitch using fft1024 and picking the right midi note.
The Teensy has 2 ADCs, I think. Seems like you'd need 6 ADCs!

Back to my midi board, it can take in a polyphonic midi stream and synthesize any of the General MIDI instruments (plus 40+ drum sounds) through an onboard earphone jack.

It seems that the 6-vibrating strings --> 6 frequencies is the main challenge.
Are you open to using three Teensy 3.2s?
Maybe the 3.6 has more ADCs than I know.

There's lots of fun stuff after that in getting pitch bend and amplitude.
Cool stuff, and with enough horsepower, it seems doable.
 
I was thinking that I could go with two of the ADS1015 boards for 8 ADC channels total, I would just need 2 I2C connections which I think the Teensy 3.6 can handle. The ADS1015 also has a programmable gain amplifier on it as well, I assume I'd need to amplify the pickup signals. The ADS1015 is 12-bit resolution and 3300 sampling rate. But I'm not sure if a Teensy 3.2 can handle all of that.
 
Last edited:
I've created and attached a graphic that shows how I am seeing the world around the MIDI synth board, and its context within my larger project..
Analog-MIDI-Synth.jpg.

The "Dave's MIDI Synth Board" at the moment allows serial input (from a pin aligned with Teensy Serial1) and/or from a MIDI Type 0 file (e.g. from the uSD card on the Teensy 3.6. The output is to an on-board earphone jack. It is polyphonic, as long as the multiple notes come along a single MIDI stream. (MIDI Type 1&2 files are better suited to Multi-stream MIDI, and I don't support those now. Type 1 can be converted to Type 0).

By the way, I'm doing nothing at present with the Filter/Morph/Augment in my project. Many Teensy guitar projects seem to create value there - making a digital version of an analog effects box.

Your guitar project may need to invent (or find) all of the parts to the left of the MIDI Synth Board in the graphic. Teensy can fill most roles, except maybe 6 ADC's at once. Maybe 6 I2S's at once will be a problem for one Teensy as well. I have no experience there.

So, a 6-note guitar chord could be sent to "Dave's MIDI Synth Board" as a stream of 6 MIDI NoteOn messages (taking about 5-6 milliseconds at MIDI speed), followed by a stream of MIDI Expression Controller messages (as the notes decay, say, every 5 milliseconds), and finally a stream of 6 NoteOff messages. You'll have a set of choices with MIDI about whether the 6 strings combine into one "MIDI Channel", and share one "volume" and one pitch bend, etc...... or are each on their own channel, with separate controls

Fun stuff.
 
Looks great!

Just a side note to re-iterate: I think 2 of these multichannel ADC boards (please see linked multi-channel ADC board from Adafruit) would provide the 6 digitized signals for processing, so I don't need 6 ADCs or 6 I2Cs. I just need the two multi-channel ADCs that provide at least 6 channels. All I'd need on the Teensy is 4 I2C pins (an SDA 0, SCL 0 and an SDA 1, SCL 1), so two concurrent I2C connections. Looks like the Teensy 3.2 supports this, but I'm not sure about how well the Teensy 3.2 would handle processing 6 channels (memory limit?). So that's why I think for my project it would be safer to go with Teensy 3.6.
 
Got it.

You may need 6 AudioAnalyzeFFT1024 objects running simultaneously (I've used only 1 at a time), and those will use RAM and CPU.
With only one FFT1024 running on a Teensy 3.2, you'll get a new freq every 12 milliseconds or so... most of which is waiting for 1024 samples (actually, Teensy is clever in reusing the newer half of a 1024 sample bucket as the older-half of the next sample bucket... otherwise, you'd wait 22+ milliseconds for each freq).

You could simulate this now by having one audio input go to 6 AudioAnalyzeFFT1024 objects (using the GUI Audio Library tool)
They should return identical results? and use the CPU and RAM and time as they will.

If you can off-load the 6-times ADC work to another chip, and get it into the right Audio Library object for feeding into the FFT1024... that could just work.
 
@Davidelvig - I am not planning on using the ADCs through the Audio Shield, but rather through the Teensy's I2C pins. I'm pretty sure the Audio Library will work without the Audio Shield, and the input from the ADCs will only be used for pitch detection, not for reproducing the signals via the Audio Shield ouput / headphone jack.
 
Boards are in, and the first one assembled works well as I use it.
I'll be writing a library to make demonstration easy.
You'll need a Teensy 3.2 or higher, and a pair of earbuds if you'd like to test.

I'll have 4-5 to share for testing.

Stay tuned.

Please ping me if you're selling these on a site like Tindie, or sharing the board on OSH Park. Would love to add it to the list on products page.
 
Status
Not open for further replies.
Back
Top