3.6 MIDI Host via micro-USB?

Status
Not open for further replies.
Hi All,

A question about MIDI Host functionality on Teensy 3.6: Is it possible to interface with an external MIDI controller with Teensy 3.6 as Host via the on-board micro-usb port?

I haven't been able to divine this from the forum posts about host functionality. I'm aware of the usb_t36 cable, but is this strictly necessary?

https://www.pjrc.com/store/cable_usb_host_t36.html

Thanks very much in advance,
 
Well, in some sense the answer depends on the scope of what you mean by "possible" and "strictly necessary".

The simple answer is USB host most is not supported on the main Micro-B port. You do need to use the other port with the host cable.

But if you don't like simple, if you're feeling adventurous (or masochistic) and want to veer far from the well worn path of working & well tested code, it is theoretically possible for the main port to do USB OTG. Even attempting this involves quite a lot of painful work. I believe Andrew did some stuff with it in UHS3. But he hacked his hardware pretty substantially to be able to program with a home-made JTAG cable. Andrew is a pretty amazing developer, but documentation isn't one of his strong suits. If you go look at the UHS3 code, how to even run it isn't clear, at least not to me. Also worth noting UHS3 lacks a MIDI driver, but there is one in UHS2.

If your idea of "possible" doesn't include weeks or even many months of quite difficult programming & hardware hacking, if you don't already own or intend to buy a USB protocol analyzer, if building hardware to have another way to get your code onto Teensy doesn't sound like a fun project, then I would advise against trying to use the main port.

Of course, USBHost_t36 has a MIDI driver, and it works easily on Teensy 3.6... using the host port with a host cable.

The host cable follows the same wiring as the USB2 cables commonly used by PC motherboards. If you or anyone you know builds PC or has extra PC parts laying around, odds are good any 5 or 10 pin USB2 motherboard-to-panel cable will work.
 
Depends. If your Teensy acts as a Midi device, sending midi data to or getting from a USB host like a DAW or similar, everything works fine over the standard Micro usb. But if you want the Teensy to act as the host where other USB devices will connect, you need the USB host connection. I for example have a digital piano with a USB port which is described explicitely as “Midi to host” in its manual. This is one of the rare cases where using the non-host micro USB port of the Teensy wouldn’t work and I’d need to go for the second USB (host) port. In case of doubt, write your code with the standard USB midi library and use the micro USB port. If you find an incompatible device later, you might always extend your code to pass over the USB host port or (simpler) use DIN Midi.
 
@Paul, thank you for the clarification, that helps immensely. I think that hack is a bit beyond me at this stage, but I've ordered the host-cable so should be all good with the examples.

@Theremin, the question is indeed about Teensy functioning as a host, the objective being to create a portable, plug-and-play synth with the audio-board and library, and/or BLE MIDI functionality with a ble breakout. Thanks for the input!
 
Status
Not open for further replies.
Back
Top