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

Thread: MIDI Hub (MIDI Host for multiple MIDI Devices)

  1. #1
    Senior Member Davidelvig's Avatar
    Join Date
    Aug 2015
    Location
    Wisconsin
    Posts
    307

    MIDI Hub (MIDI Host for multiple MIDI Devices)

    I'd like to build or buy a device to use between a MIDI Wind Controller I've developed on Teensy, and a common digital piano, such as this Yamaha DGX-660. This piano has a USB MIDI jack on the back (MIDI Device, B-Jack), as do most current digital pianos.

    My MIDI wind controller has a uUSB device jack (a'la Teensy 3.2)

    Commercial MIDI Interfaces exist, though they are often more complicated or expensive than I'd prefer.

    Ideally, it would feel like a USB MIDI device-to-device gender bender.

    Attached is a picture of what the hook-up looks like.
    Click image for larger version. 

Name:	MIDI Hub with Teensy.jpg 
Views:	16 
Size:	37.8 KB 
ID:	22629

    I'm assuming the Teensy code would:
    • receive any inbound MIDI messages on any channel from any connected USB MIDI device; and
    • echo out the same message on the same channel numbers to all connected USB MIDI devices (except the sender)
    • Further software sohistication could be added for filtering and/or translating messages


    A few questions

    1. Which Teensy supports at least one USB Host port
    2. Can a Teensy support two USB Host ports... elimating the USB Hub in this picture?


    Thanks!
    Last edited by Davidelvig; 11-26-2020 at 01:35 AM.

  2. #2
    To answer your first question, I'm having really good luck using a teensy 4.0 as a usb host for MIDI. Using it to crosstalk between a bunch of USB, USB host, TRS and DIN ports. Getting down to the last hurdle, as with the current version of teensyduino I can't seem to send notes back out to the usb host connections, but can receive everything (about to start a new thread to come up with ideas why).

    I don't know about using two usb hosts (do any of the teensy pinout pages show two host ports available?). I like the speed of the 4.0/4.1 for handling MIDI, I don't worry about anything I throw at it (including adding a screen) slowing it down enough to ever cause an issue, and these teensy versions only have 1 usb host.

    To get started, you can look in the teensyduino examples -> teensy -> serial -> midi -> usb 16x16 sketch. It has enough to start building your own sketch off of rather quickly for your project. Currently my midi router does what you're after including message filtering, and echo between usb to PC, 10 usb hosts, 5 DIN/TRS inputs, and 12 TRS/DIN outputs with only one issue left to handle.

  3. #3
    Quote Originally Posted by Sandwich View Post
    I can't seem to send notes back out to the usb host connections, but can receive everything (about to start a new thread to come up with ideas why).
    i have no problems sending note on and other messages to connected midi devices. i am using teensyduino 1.53 and the usbhost library on a teensy 3.6

  4. #4
    Quote Originally Posted by lokki View Post
    i have no problems sending note on and other messages to connected midi devices. i am using teensyduino 1.53 and the usbhost library on a teensy 3.6
    I figured out that the USB Host library is working for me as well. Synths with a single USB MIDI connection work completely as expected. But synths that have multiple connections available over USB are where I'm running into issues. I was exclusively trying to use these synths, not realizing they were causing my issue. I have updated my post here, so as not to derail Davidelvig's thread.

Posting Permissions

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