View Full Version : 8x8 MIDI interface patchbay - how to make one with teensy...

01-08-2016, 04:14 AM
I am thinking of using a teensy to construct a 8x8 (or 16x16) MIDI interface patchbay.

I am wanting it to be a standalone unit which doesn't rely on a computer. Is the teensy up to the task?

I have had a look at the midi stuff, but am just wanting some guidance.

Any hardware and software suggestions would be greatly appreciated!


01-08-2016, 05:19 AM
For a start teensy has 3 serial ports. Hopefully someone who has experience in this area will chime in.

01-08-2016, 07:28 AM
Would I need 1 or 8 for a project like this?

Is this a possibility, or am I barking up the wrong tram:

Feeling my way around here:)

01-08-2016, 09:02 AM
I had a look at that schematic ... it definitely uses 1 very capable serial port per channel. The teensy has 3 serial ports, but only one with a large FIFO, I think .... what you seem to be proposing on the output side is a central teensy bussing data (via spi??) to other teensy's (one per channel?) and those teensy's then outputting midi on their independent serial ports .... ?? Maybe 3 or 4 teensys on the output side to get the required uart count (assuming you can use two uarts on each teensy) ... receiving 8 channels of data and piping them to the relevant teensy / uart (via spi??) would probably involve some more thought and parts ... what about something for $200 US like the motu midi express 128??? Am I being defeatist?

I suppose you could buss the data in from your 8 spi teensys, process centrally and then buss back to the relevant teensy .... Hmm I am guessing a hardware only switching type solution might be better (more like the schem you linked too) but maybe getting deeper into the teensy you could find a quick and efficient central processing method to take the data and bus it back ... sounds like a challenge ... I too am feeling my way ....

01-08-2016, 10:34 AM
The question is: do you need a real patchpanel, meaning you have 8x inputs and you may assign every input to every output? This could be easyly done, and the Teensy only routes the data from one digital pin to another ... if fast enough, you may do this on a low, pure electrical level (the Teensy don't care about the signals passing through). Perhaps you need some drivers and optocouplers for the MIDI port spec, but thats all. I had such a solution (http://www.synthony.com/vintage/mav8mm16.html) in a plain mechanical way - 8 inputs, 8 mech. sliders/switches which electrically closed the circuit to the appropriate 4 outputs. And if you set two inputs on the same output, it didn't work ...

But if you want more like channel filtering, merging, control changing etc, you will need 16 full defined serial ports, perhaps via a multiplexer solution, and then the teensy has to route and examine the data which passes through. As MIDI is very slow, the processing power may be sufficent, put the port adaption also fulfilling the MIDI specs, will be the biggest effort. And using multiple Teensys makes no sense - you will need at least nine boards - eight to handle the IO and one for controlling purposes. I think this way would let explode your budget ...

Some links:


or you implement some MIDI to I2C ports and multiplexes them:


... an example ...

Edit: and another one: http://www.ucapps.de/index.html?page=mbhp_iic_midi.html - I think this one is worth to be examined ...

01-08-2016, 04:37 PM
The teensy has 3 serial ports, but only one with a large FIFO

Actually, both Serial1 and Serial2 on Teensy 3.1 and 3.2 have the FIFO.

On Teensy 3.0, only Serial1 had a FIFO.

None of the ports on Teensy LC have FIFOs.

01-08-2016, 04:41 PM
Realistically, I believe this is the sort of project where you should really consider a fairly powerful Linux single board computer, a multi-TT USB hub, and devices like Teensy to act as the serial ports. That's also able to scale up, at least until you get to the USB bandwidth or other limits, which are pretty high relative to the speed of MIDI.

01-08-2016, 05:09 PM
fyi, just the other month there was a similar discussion on midi matrices here (https://www.muffwiggler.com/forum/viewtopic.php?p=2082067#2082067), with various points-of-view, some of them considered very authoritative (including the innards of a 30x30 matrix ... with 2 FPGAs); doesn't sounds like the most straight-forwardest thing to build.

01-08-2016, 05:15 PM
Maybe I misunderstood. Is this routing messages between many sources, which requires fully decoding the data, or is it as "simple" as just connecting whole cables to each other with electronic switches?

01-08-2016, 08:07 PM
I thought it was full routing matrix .... thats a lot of processing power, leaving aside managingthe i/o .... ... on the other hand maybe an analog mux approach could get you some of the way on the i/o front....

Can I ask about i/o ... can the midi library use two uarts on the same board?

01-09-2016, 01:40 AM
The goal is:
I have four synths and a few sequencers. I wanted to be able to turn on a selection of synths and one of the sequencers, and be set to go with out having to plug midi together...
In that case, I am not sure what filtering I might need...

01-09-2016, 02:07 AM
DO you mean you don't want to daisy chain??? And what do you mean by turn on?? If you have the midi equipment daisy chained with unique MMC ids, you can use MMC to control the transports on each piece of midi gear ...obviously your synths are not going to have transports, but why not just use different channels to send and receive on (if that is what you mean by 'turn on' in the context of a synth). Why not daisy chain??

Sysex other than MMC could be a go too, if your synths have individual sysex ids .... from wikipaedia

Many instruments also include a SysEx ID setting, which allows two devices of the same model to be addressed independently while connected to the same system.[88] SysEx messages may include functionality beyond what the MIDI standard provides. They are targeted at a specific instrument, and are ignored by all other devices on the system.

I suppose it depends on what you are doing with your synths ... but separate channels would be the usual way??

01-15-2016, 09:30 AM
If you simply want to connect IN A to OUT B OR/AND C and so on, withput any "touching" of the data, merging needs etc you may consider the use of this chip: AD75019 (https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjL2afhwKvKAhVEFQ8KHfPoDd0QFggsMAA&url=http%3A%2F%2Fwww.analog.com%2Fmedia%2Fen%2Ftec hnical-documentation%2Fdata-sheets%2FAD75019.pdf&usg=AFQjCNHSTlmSsJ-_QYXXUqn2qkZTz-H7rQ&sig2=Hp-DvWMDLuZMFJHT5L2LDg) - let the Teensy control the chip and the chip does the switching.