Teensy 3.0 Buttons to USB MIDI example port failed to open with Pocket Midi

Status
Not open for further replies.

tomfrisch

Well-known member
I'm just getting started with the USB Midi examples w/ a Teensy 3.0.
Am on Arduino IDE 1.8.10 on windows 7 with the latest PJRC Teensyduino libraries.

I uploaded the Buttons to USB MIDI example and when I run Ableton Live, it successfully receives MIDI note messages from the Teensy! Very cool.

But then I decided to use a free MIDI diagnostic tool to check what data was coming through, and I ran into a problem.
I'm using Pocket Midi 1.4.1, but every time I select the Teensy MIDI for either input or output port, I get an error: Port Open Failed.
This tool works with my other midi controllers, so I'm wondering if anyone has any ideas about what is different about Teensy's USB Midi implementation vs my M-Audio Axiom controller that doesn't exhibit this problem.

Thanks for any help.
 
Update- I just tried with MIDI OX and it seems to work, so it must be something funky with Pocket MIDI.

As before, any shared wisdom is much appreciated.
 
I've installed PocketMIDI and tested it with an M-Audio 61-es keyboard connected to the T3.6 USB Host port which then sends the data over USB midi to the PC (Windows 10 Pro).
Both Midi-Ox and PocketMIDI read key presses from the keyboard.

Pete
 
Pocket MIDI not so much.

Can you create a very simple program (not requiring any other hardware than a Teensy and USB cable) which demonstrates the problem with Pocket MIDI. Maybe just transmit a note on & off or CC message every second. Ideally it would be just a few lines of code in loop() with an empty setup(). The important point is to give us *exactly* the same program you tested which didn't work with PocketMIDI, so we can try to reproduce the problem.
 
This morning I stripped out all the extraneous code from the USB Midi Buttons example, (basically the bounce library, setting input pins, and debouncing) and now it works fine in both midiOX and PocketMIDI. So just in case, I went back and loaded my original sketch (based off the bounce example) and now it seems to work fine in both as well! Then I went back into Ableton and tested again, and now it's back to the original problem...

So what I think is happening is that when Ableton is running it locks access to the midi port for PocketMIDI (but not for MIDIOX).
Now onto solving the next set of problems that I can create for myself.

Lesson learned, thanks for playing!

-Tom
 
This is a Windows Class Compliant Midi device driver issue in that you can only make ONE connection to a USB-Midi port. I believe that this is sorted for Win 10.

So in Win7, we're stuck with "single-client" Midi ports. A workaround is to connect your Teensy Midi ports via Multi-Client Midi pipes.
I use LoopMidi for this as you can name the pipes in a sensible manner and so far have had no connection issues.

Here's a shot of the action in LoopMidi and note that it's important to use two pipes as you will get feedback if you try to use only one:-

LoopMidi.jpg
Next is a shot from MidiOx, and here's how we hook to Teensy:-

MidiOx1.jpg
Lastly, a view from a second instance of MidiOx, and you can see, I just tweaked a pot.
MidiOx2.jpg

At this point, the TEENSY IN and TEENSY OUT are Multi-Client any you can make as many connections to them as needed.
 
Status
Not open for further replies.
Back
Top