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

Thread: Lots of midi inputs.

  1. #1
    Junior Member
    Join Date
    May 2020
    Posts
    11

    Lots of midi inputs.

    I'm trying to use multiple different midi controllers on one teensy4. What is the best way to connect multiple different midi controllers to one teensy?
    I saw that you can use a usb hub to handle multiple midi inputs - would this still allow for differentiation of the different controllers. (basically, I would like to know where all the midi messages come from). Is this possible with a usb hub, or is using multiple midi channels and daisy chaining the controllers a preferable solution?
    Furthermore, is USB midi bidirectional, in that I could send midi messages to the controllers from a teensy?

    rough sketch of the architecture I'm going for.
    https://imgur.com/a/OXl3CU0

  2. #2
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    562
    Yes you can differentiate between the different usbMIDI devices connected and it is bidirectional, each device has its own class object so its easy to tell which devices sent what. There probably isnít a preferred method, I would say it just depends on the user, personally I would use usb since daisy chaining midi can cause latency issues. It also has the advantage of transferring faster than MIDI so if you have to transfer a lot of messages I would use usb for that reason as well.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,079
    Yes, USBHost_t36 supports hubs and you can create as many MIDIDevice and MIDIDevice_BigBuffer instances as you need.

    Yes, communication is bidirectional with all connected devices.

    To sort out which MIDIDevice instances are which of your USB MIDI devices plugged into the hub(s), you'll need to call functions like idVendor(), idProduct() to identify them.

Posting Permissions

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