Teensy 3.1 - USB-MIDI and serial at the same time ?

Status
Not open for further replies.
Great, I've got the Teensy 3.1 to work with various sensors to send MIDI messages to my DAW software. What I'd like to do is write some PC software so I can transmit non-midi messages back to the Teensy, and set various parameters ( to scale the sensors, for instance ). Is this possible over the same USB link while in USB_MIDI mode ?

The alternative would be to press a button while the Teensy is being plugged in / powered up, and thus jump into a regular USB serial mode to set the parameters, then force the Teensy to reboot on command.

Has anyone done this ( plan A ), or do I need to resort to plan B ?

Thanks.
 
It is possible to have multiple USB devices running at the same time. At the moment there are definitions for the list you see in the device menu, but Paul is trying to make a universal solution

https://forum.pjrc.com/threads/27559-C-preprocessor-guru-wizard-wanted

For the moment you need to graft the code for two devices together by hand:
https://forum.pjrc.com/threads/1874...ith-Teensy-2-0-(Or-3-0-)?highlight=usb_desc.h
Though having read that thread it looks like the serial code is there regardless for debug purposes so you should be able to declare serial in your code and have it work while using MIDI without any further effort on your behalf.

GW
 
Thanks GremlinWrangler ... interesting links to previous work. I could doubtless get to grips with the methods described there, given time, but this is supposed to be a relatively quick and simple project.

The data I want to send back to the Teensy would be occasional calibration data, meaning the user wouldn't be using calibration mode very often at all. I'm thinking of something like a Midi breath controller ... you can see one example here. Halfway down the page is a software interface with a graph, allowing the user to modify a response curve. When the user 'saves' the new configuration, it presumably sends back a big chunk of data to the USB device, which is subsequently used in MIDI mode as a look-up table to convert breath pressure to a MIDI volume setting. Not precisely what I'm doing, but that product inspired me to do something similar.

I think the quickest solution will be to use my 'plan B' and simply "... press a button while the Teensy is being plugged in / powered up ...". Thanks for your suggestions though.
 
Why not use sysex message to send you configuration messages ?

I can think of a couple of reasons why not. Firstly, the effort to construct a sysex message is greater than that required to type into the serial monitor. Secondly, SYSEX is limited to 60 bytes on Teensy 3.x (unless you edit the usb midi code, of course).
 
Status
Not open for further replies.
Back
Top