Teensy 3.6, receiving MIDI data via PC, via usb

Status
Not open for further replies.

RABB17

Well-known member
Hello,

I am trying to recieve midi via the USB port, while the Teensy is connected to the PC via it. After doing a little searching on the forums I tried a few midi patching solutions like loopMidi and Midi Ox to gain a better insight into my issue: Running any of the generic usb midi examples, I am unable to get the 3.6 to respond to incoming midi signal routed to the Teensy. Eventually I just routed midi ox directly to the teensy and sent test signals. The signals were confirmed as being sent and recieved by Midi Ox monitor however, there is no serial acknowledgment of the midi being recieved. Ditto for the led midi sketch. I did make sure to set the serial mode to MIDI before compiling. Anyways, after pulling my hair out for a few hours I decided it might be wise to just ask here, as I didn't find an answer searching through the forum.

Can the Teensy 3.6 currently recieve incoming midi data from the PC over the USB port, while it is being powered by the usb port?
Any tips suggestions or pointers would be greatly appreciated.

Thanks for reading.

I am using Windows 10
 
Last edited:
Can the Teensy 3.6 currently recieve incoming midi data from the PC over the USB port, while it is being powered by the usb port?

Yes. I've got the "InputRead" example working here on a 3.6 using "Play Notes From the Computer Keyboard" in MIDI Ox on windows. In MIDI Ox, under Options/MIDI devices, do you have the Teensy selected as MIDI output? You have to re-select it every time you upload a sketch.

UPDATE: Hmmm, maybe that's not true. Does the Arduino IDE say anything about COM ports? Exactly which sketch are you trying?
 
Last edited:
Now I am having difficulty getting, InputFunctions from USBHost_t36 examples to run It compiles with no problem and displays initialization in the serial monitor, but no midi device from my computer will connect. It either crashes the program(midi ox) or they simpy refuse to accept the teensy midi device as an output(VMPK, LOOPmidi)
USB types MIDI, Serial + MIDI, Serial + MIDI + Audio have all been tried with no success. The InputRead example works fine. Any thoughts? Thanks
 
Are you actually using the USB *host* now? That would mean you’ve wired your Teensy to have a second USB cable running to it.
 
*facepalms* no I wasn't, is it possible to use a hub for this purpose?
 
Last edited:
I'm not 100% sure what "purpose" it is. Can you get the InputFunctionsBasic example to work? To read USB MIDI from the computer and do stuff with it, you'd just change the functions myNoteOn(), myNoteOff(), and myControlChange() to do whatever you like. If that example does work but isn't what you're trying to do, please post the code that does *not* work.
 
Last edited:
The reason I was trying to use this example was to extract the channel data from the incoming midi... I realize now this is code for USB hosting, I was more interested in extrapolating the channel data from the incoming MIDI, as MIDIUSB.h does not have this available. Although the end goal of what i am trying to do is recieve midi via usb to a 3.6 and forward it via serial to a teensy 4.0 If I could use usb host, I could avoid serial altogether.
 
I have a powered hub on the way, not sure if suitable for this purpose or recommended to get breakout shield
 
If you're only interested in reading the MIDI that's coming from the computer that your Teensy is plugged into, then you shouldn't need a shield or a hub or any other hardware. If you want to extract the channel data from a note ON, note OFF or CC message, use the InputFunctionsBasic example. If you want to extract the channel data from ANY type of incoming MIDI message, use the InputFunctionsComplete example.
 
Ah thank you. I am quite new to the teensy, and my arduino examples folder is a mess. Exactly what I needed. Thanks for all your help!
 
Status
Not open for further replies.
Back
Top