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

Thread: Teensy 3.6, receiving MIDI data via PC, via usb

  1. #1

    Teensy 3.6, receiving MIDI data via PC, via usb

    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 by RABB17; 12-17-2019 at 06:06 AM.

  2. #2
    Quote Originally Posted by RABB17 View Post
    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 by joshnishikawa; 12-17-2019 at 06:37 AM. Reason: UPDATE

  3. #3
    Ok! Good to know. I will try switching computers and see if that's the issue.

  4. #4
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Isle in the Salish Sea
    Posts
    1,292
    Try the recieve using the example code from the usb midi documentation page.https://www.pjrc.com/teensy/td_midi.html

    People with MIDI experience on Ardunio often try to use serial based code instead of calling usbMIDI correctly.

  5. #5
    Quote Originally Posted by oddson View Post
    Try the recieve using the example code from the usb midi documentation page.https://www.pjrc.com/teensy/td_midi.html

    People with MIDI experience on Ardunio often try to use serial based code instead of calling usbMIDI correctly.
    It actually turned out to be an issue with the computer I was using, up and happily reading midi now!

    Thanks all for, the help

  6. #6
    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

  7. #7
    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.

  8. #8
    *facepalms* no I wasn't, is it possible to use a hub for this purpose?
    Last edited by RABB17; 12-19-2019 at 09:33 PM.

  9. #9
    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 by joshnishikawa; 12-19-2019 at 09:31 PM. Reason: ?

  10. #10
    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.

  11. #11
    I have a powered hub on the way, not sure if suitable for this purpose or recommended to get breakout shield

  12. #12
    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.

  13. #13
    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!

Posting Permissions

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