manu usb ports ?

emmanuel63

Well-known member
Hello,

I have build a working synth with Teensy 4.1. Is it possible to add 3 USB MIDI ports (or more) ? I need 1 port for a piano keyboard, and the others for various midi controllers.
I have already used usb host and it was working fine, but I only get 1 USB port. How can I add more USB ports to my synth ?

Emmanuel
 
Don't forget you need hub instances in your program for the library to actually use a hub. Your program doesn't need to do anything else to make hubs work, but you do have to create the hub instances. Most of the examples have this, so just copy those lines from any example.

If you use a hub with more than 4 ports, you may need more than 1 instance. Most larger hubs are actually built from a network of 4 port hubs.

Of course, also create 3 instances of the MIDI device and in your program, either check them all or set up handlers to run when the MIDI messages arrive.
 
An example sketch can be found <here> showing how to connect two physical MIDI devices to the T4.1's USBhost interface, making use of associated hub device instances (as Paul describes above). You can extend that example up to however many MIDI devices you expect to connect to your physical USB hub device(s).

Mark J Culross
KD5RXT
 
Back
Top