Starting a project based on Teensy 3.6

Status
Not open for further replies.

Glennzone

Member
Hello all,

First posting ever, and first Teensy 3.6 project, and very excited to be honest. Very happy, and honored to be among you. :)

To share context prior to RFI (Request For Info), I am an entrepreneur finally going professional with my Music Technology skillset. Prior to that I was a Systems and Network Engineer, and before that I was a Flight and Ground Test Instrumentation Technician in the Aerospace industry. So, I'm pretty new to the Maker space, but tech background gives me a clue.

I am not a coder, but I have done significant work in Cycling74 Max, Lemur for iPad, etc.

So, . . .
Question #1 : Are there any specific resources online that can list all the compatible devices based on the micro-controller ? For example, Teensy v3.6, 3.x ? Arduino ?, Raspberry Pi, Beagle, etc.) That would be a useful db indeed.

Question #2 : Is there anyone here who might be able\interested to assist me with the following project :

"NOVATION LAUNCHPAD - PEDAL MOD"

More specific information is at the link below, but the gist of it is basically a glorified USB hub sitting between the Launchpad and a PC, which apart from having a USB in and out, will also have a "sustain-type pedal" input to provide hands-free record transport control of clipslots in Ableton Live's session mode. This solution is specifically designed for MIDI clipslots, but it doesn't matter whether the clipslots are audio or MIDI. It operates the same either way.

This would be in the form of an add-on module that can connect directly to any Launchpad's USB jack, and then connect to the computer's USB port. It would read\intercept the MIDI data, sent from the Launchpad to the PC (trigger info), as well as the MIDI data sent back from the PC to the Launchpad (LED feedback). The object is to provide hands-free control of loop recording, as the timing when recording loops, of either audio OR MIDI data, is critical to accurate real-time performance capturing.

This "middle man" device would cache certain MIDI data output from the Launchpad (via USB), preventing that data from being sent directly to the PC, in effect staging those commands for release to the PC to be triggered only by depressing the pedal. Once that has happened, this middle man device would then forward those cached commands (again, via USB) to the PC, which would accept those commands as it normally does, and then return the MIDI data to the Launchpad (via the middle man) to light the appropriate Launchpad matrix LED(s).

There are a couple additional specs for this project, but I would think this comprehensive enough for most here to understand where I'm coming from.

There is more information here :

https://cycling74.com/forums/who-wo...r-clipslot-recording\playback-in-ableton-live

I hope to be able to work with someone here on this, and am willing to pay for assistance. This is an important project for me.

Sincere thanks,
Glennzone
 
Question #1 : Are there any specific resources online that can list all the compatible devices based on the micro-controller ? For example, Teensy v3.6, 3.x ? Arduino ?, Raspberry Pi, Beagle, etc.) That would be a useful db indeed.

What "compatible devices" do you have in mind?


Question #2 : Is there anyone here who might be able\interested to assist me with the following project :
...
I hope to be able to work with someone here on this, and am willing to pay for assistance.

I personally can't get directly involved, even on a paid consulting basis. I know a few of the regulars here do offer consulting services, so maybe they'll see this and chime in?

If you're willing to get your hands dirty and learn a little Arduino programming, maybe a few pointers to get started with USB MIDI might help?

The first step is to get Arduino+Teensyduino installed. Then open some of the examples, from File > Examples > Teensy > USB_MIDI. The Buttons example is a good simple place to start. It sends note on and note off messages to your PC. If you don't have buttons wired up, just touching between GND and the nearby pins with a wire or paperclip works for testing.

If you're looking to capture USB MIDI from another device, you'll probably need Teensy 3.6 since it has 2 USB ports, where the 2nd port operates in host mode. The software support for USB host is still in the early stages, but the good news in a USB MIDI driver exists for host mode.

If you're not familiar with the details of USB, especially the meaning of terms like "host" versus "device", I highly recommend reading chapter 4 of the USB 2.0 spec. Here's a direct copy of just the main PDF, to save you time digging for it at www.usb.org.

https://www.pjrc.com/teensy/beta/usb20.pdf

This is a huge PDF, but chapter 4 is a short read with just the most important concepts and terminology explained. This really is essential knowledge for talking about the tech details of any USB project.
 
Looking for contractor assistance on this project

What "compatible devices" do you have in mind?
Well as an example, with some add-on components being compatible with one version of Teensy and not another, the need for a cross-reference chart of all these DIY microcontrollers and add-ons really becomes more of a necessity than a mere convenience. That's what I was referring to.

There are those who have both the time and interest in creating such a ready reference. I didn't know whether such a thing yet existed, was kept up to date, or that it's just something that no one working with these things ever considered a helpful thing.



I personally can't get directly involved, even on a paid consulting basis. I know a few of the regulars here do offer consulting services, so maybe they'll see this and chime in?

If you're willing to get your hands dirty and learn a little Arduino programming, maybe a few pointers to get started with USB MIDI might help?


I actually started that a couple years back, but it's been more of a sporadic dabble, at best.


The first step is to get Arduino+Teensyduino installed. Then open some of the examples, from File > Examples > Teensy > USB_MIDI. The Buttons example is a good simple place to start. It sends note on and note off messages to your PC. If you don't have buttons wired up, just touching between GND and the nearby pins with a wire or paperclip works for testing.


Agreed. I have not with Teensy, however I've been through those beginning stages with Arduino, and into some light breadboarding of circuits. It's just that my time prioritization outweighs the cost of not having a contracted assistant on this project. I've already got so many things going on concurrently. I'd prefer a contracted assistant. As I've said, I'm not a coder, so the learning curve for me would be a burden.

If you're looking to capture USB MIDI from another device, you'll probably need Teensy 3.6 since it has 2 USB ports, where the 2nd port operates in host mode. The software support for USB host is still in the early stages, but the good news in a USB MIDI driver exists for host mode.

If you're not familiar with the details of USB, especially the meaning of terms like "host" versus "device", I highly recommend reading chapter 4 of the USB 2.0 spec. Here's a direct copy of just the main PDF, to save you time digging for it at www.usb.org.


https://www.pjrc.com/teensy/beta/usb20.pdf

This is a huge PDF, but chapter 4 is a short read with just the most important concepts and terminology explained. This really is essential knowledge for talking about the tech details of any USB project.


Thanks Paul. I will definitely look into everything you've mentioned, especially the stuff I haven't already looked into.

Having been a Systems and Network Engineer, yes I'm aware of USB 2.0, but at mostly the macro level.

However, I continue to look for someone willing to work on this with me.

Thanks again,
Glennzone
 
The host part might be the tricky bit... I didn't know the MIDI part was functional until I read Paul's comment above.

But the rest of what you want is not difficult.

Many noobs with less technical a background have managed projects at least as challenging and there is plenty of free help here if you post clear, concise questions with test code and schematics (when appropriate).

I'm happy to help pretty much anyone with MIDI questions (about the only part of the Teensyduino world I feel at all competent in) but I'm not going to be much help with the hosting part until I figure out how that works for myself.

You could start with a hardware MIDI version.

Teensy can send MIDI via hardware serial connection (Tx/Rx pins and an opto-isolator in the incoming and some DIN MIDI jacks)
https://www.pjrc.com/teensy/td_libs_MIDI.html

A Teensy LC is plenty powerful enough for any MIDI project so, if you don't use the hosting that only 3.6 supports, any Teensy will do the job.

I'm not sure why you have to intercept MIDI from the Launchpad - can't you just make a separate controller for your commands and feed via USB to the computer running Ableton?
 
Wow, great reply oddson ! Thank you !

Thank you for the vote of confidence. I appreciate your sharing of that truth. :)

I'm determined to go with the Teensy 3.6, and will barrel through myself, as you mention, with plenty of assistance from smarter individuals than I, right here in this forum.

So the purchases I will make :

USB Host adapter cable :
https://www.pjrc.com/store/cable_usb_host_t36.html

Teensy 3.6 :
https://www.pjrc.com/store/teensy36.html

Breakout board for Teensy 3.6 :
https://www.tindie.com/products/loglow/teensy-3536-breakout-revision-a-dip-64/

1\4" TRS phone jack :
http://www.mouser.com/ProductDetail/Neutrik/NRJ6HM-1/?qs=sGAEpiMZZMtUKTCHc2CNRKAUEEOBl/DQ


To answer your question, the reason I want to intercept the MIDI over USB in both directions is I want to intervene in what either side may receive, replacing it in certain circumstances. Because once you plug the Launchpad in, and the Remote Script runs on the computer in Ableton Live, it then sends MIDI data to the Launchpad to update (initialize) its Pad LEDs to reflect what is going on in Ableton Live. I will need to know what the Remote Script is sending back to the Launchpad, and also what MIDI data any button press requests that I make on the Launchpad send to the Remote Script.

Once this is set up, I have control over what the Launchpad receives, as well as what the Remote Script receives. This is an important part of being able to manipulate both sides without one side or the other being aware. The Launchpad may send MIDI data to the Remote Script to put a clipslot into Record, but when I intercept that, it will not proceed beyond the Teensy, until the time is right (for me as a performer), at which point a press of the sustain pedal will then release it to the Remote Script, which will actuate that loop recording for that clipslot. The Remote Script is going to then send the MIDI data over USB to provide the visual feedback that the specific button LED indicates that it is in fact in record mode.

Having that situation, I also can create the necessary modalities :

1. Normal operation : pedal is ignored entirely regarding its effect on the normal MIDI over USB data flow. However in this mode, the pedal selects between the three modes (Normal, Record, Play) and the Teensy script will send the Launchpad the MIDI data to a specific round LED, which is illuminated to indicate which mode it's in.

2. Record operation : any clipslot(s) selected via the Launchpad whose state is "empty" will be cached and not forwarded to the Remote Script. The Teensy script will then send the Launchpad the MIDI data to the specific clipslot(s), which will then blink red to indicate recording for the clipslot(s) is staged, until the pedal triggers the forwarding of MIDI over USB data to the Remote Script, which will then update the Launchpad with the MIDI over USB data to change those button LEDs to solid red.

3. Play operation : any clipslot(s) selected via the Launchpad whose state is "playing" will be cached and not forwarded to the Remote Script. The Teensy script will then send the Launchpad the MIDI data to the specific clipslot(s), which will then blink green to indicate play for the clipslot(s) is staged, until the pedal triggers the forwarding of MIDI over USB data to the Remote Script, which will then update the Launchpad with the MIDI over USB data to change those button LEDs to solid green.

Is that plain enough to understand ?

The reason I choose to do it this way, is that once it is successful, this same methodology can be used with any devices which transmits\receives MIDI over USB data, requiring only a very small change in the Teensy script to allow it to work for other devices. It's kind of like going through customs at the airport. There are the possible options to pass, hold, or even hold for reroute in either direction. For people, it can be ugly, but for MIDI data, I think it's a very useful thing. :)

Please let me know your thoughts.

Thanks,
Glennzone
 
Last edited:
Just an FYI :

I finally ordered, and have received everything but the Teensy\Breakout board. Been waiting on shipment of that since receiving notification from Tindie that it's been shipped. Unfortunately, the vendor on Tindie (loglow\Daniel Gilbert) is not responding to my questions, . . .

I've also downloaded a couple USB Analyzer programs to be able to monitor the traffic. As I await the final parts, the one thought that sticks in my mind is whether I'm going to be able to monitor the traffic while it's concurrently fully operational in a "production environment," that being in use with Ableton Live, and the python MIDI Remote Script the Launchpad will be communicating with.


Again, thanks for your thoughts.

:)
 
I finally ordered, and have received everything but the Teensy\Breakout board. Been waiting on shipment of that since receiving notification from Tindie that it's been shipped. Unfortunately, the vendor on Tindie (loglow\Daniel Gilbert) is not responding to my questions, . . .

I'm alive and responding! Glenn just caught me in the middle of some intense travel days, and the timing was unfortunate. My fault & sincere apologies.
 
Welcome back, and thanks for the update ! Good to hear you're ok. I believe as much if not more in the networking\relationship aspect, than the actual products, so I appreciate the update.

I've been looking forward to getting things rolling with this project, so I've been a little antsy of late. Plus, my network at this point is extremely small. ;-)
 
...I've also downloaded a couple USB Analyzer programs to be able to monitor the traffic. As I await the final parts, the one thought that sticks in my mind is whether I'm going to be able to monitor the traffic while it's concurrently fully operational in a "production environment," that being in use with Ableton Live, and the python MIDI Remote Script the Launchpad will be communicating with...



I would think you mostly just need to get the host part working. Everything else is basic "if (test) then {action} " with MIDI messages.

All the external script processing should continue to work as before if you can send it the appropriate trigger messages.

I was thinking of programming another Teensy to talk MIDI with the hosting T3.6 as I don't have a sound source that takes USB MIDI in.

Test the second Teensy against a MIDI utility software packages to make sure it's receiving and sending MIDI messages (and flashing it's LED as it does).

Then program the T3.6 to send MIDI as a host and see if the LED flashes... and when it does listen for the MIDI reply message.


Right now what's holding me up is lacking the USB connection to my T3.6.

I do have the USB ports from a dead PC keyboard I might try to wire one of them to a header and give it a try.
 
Last edited:
Thanks for input. As I've never developed anything like a USB hub, do you have any recommendations\URLs on how to set that up ? I'm wondering now whether I also need to have both a Type A AND a Type B jack for this . . . something I didn't even think about. Just thinking out loud really.

I should have the Teensy on Monday.

I guess time will tell, but I'm really glad to be getting back into the electronic explorer side of myself.

I am wondering, what is it that you're working on ? For me, I won't need any devices to do the development work, as I have both Ableton Live AND Max.
 
I have just used a Launchpad S with an Arduino - here some thoughts. I am also going to switch to Teensy, as the Arduino is simply too slow and has too little memory for some of my ideas.

- you will need a USB hub to power the Launchpad, no matter what. I nearly desoldered my FTDI chicp on a USB host board as the power regulator next to it got VERY hot. A hub solved all issues - Novation devices are apparently known to be very power hungry.

- adding a hub is not going to be the main issue, but getting the Midi Library to identify your Launchpad correctly. I am not sure if the current USB MIDI library is able to understand the descriptor, for Arduino it had a bug and I had to contact the author of the USB Midi library, who advised me to switch to the latest on GitHub, not the one that comes with the USB Host Library 2.0 package. Simply replace the files in the USB Host Library folder...

- how do you connect the USB Host shield to Teensy 3.6 ? Isn't 3.5 and 3.2 the only 5V tolerant option?
 
Wow, Junibot !! Great to have you on board !!!

Thanks for your input. I found it very interesting, and obviously far closer to the full immersion experience necessary for me to finally achieve it.

So, yes I now have to be more comprehensive about the pwo critical points you bring up : The Launchpad's power requirement, and the USB device recognition.

Just curious, had you read through my whole (2-part) spec on this ? As it sounds like you might be doing something similar, I was wondering if you grasp the value of such a feature, and\or the potential utility of a data intercept device such as this.

?

Again, thanks for chiming in !
GDR
 
I'm sure you could use a script on the PC end to have the man in the middle device as a pure software solution. Makes it more flexible
 
teensy the usb-host and MiDi

it then sends MIDI data to the Launchpad to update (initialize) its Pad LEDs to reflect what is going on in Ableton Live. I will need to know what the Remote Script is sending back to the Launchpad, and also what MIDI data any button press requests that I make on the Launchpad send to the Remote Script.
Just curious, i can't see why this can only be happening with MIDI over usb
I understand that you want to intercept data, but you can intercept midi data and sent it at any time you will. With a hardware tx/rx midi in and out you can do all of this, and store things in the teensy and sent it when you want, and on the other side recieve midi in the ableton script, and sent things back over midi.
It seems doable to me, or am i missing something.
Btw i am very interested in teensy and usb-host and especialy midi, i am a midi-man, see my ipeggio on youtubehttps://m.youtube.com/#/channel/UCvphmVhkMGpMji8dwuzGWTw
And i would like to connect a ps4 controller to the teensy and control the speakrate, bend and pitch of a speakjet soundchip.
I allready have done this on an Arduine duemilanova, GREAT sounds.
Have fun, Dian from the Netherlands
 
Just curious, i can't see why this can only be happening with MIDI over usb
I understand that you want to intercept data, but you can intercept midi data and sent it at any time you will. With a hardware tx/rx midi in and out you can do all of this, and store things in the teensy and sent it when you want, and on the other side recieve midi in the ableton script, and sent things back over midi.
It seems doable to me, or am i missing something.
Btw i am very interested in teensy and usb-host and especialy midi, i am a midi-man, see my ipeggio on youtubehttps://m.youtube.com/#/channel/UCvphmVhkMGpMji8dwuzGWTw
And i would like to connect a ps4 controller to the teensy and control the speakrate, bend and pitch of a speakjet soundchip.
I allready have done this on an Arduine duemilanova, GREAT sounds.
Have fun, Dian from the Netherlands

Hello Dian,
Nice to have you on board as well !

I didn't say that it can only be happening with MIDI over USB. However, my intended design methodology does.

I haven't yet made any progress in this direction, but I'll update things as we go.

Thanks,
GDR
 
I was wondering how can one connect a computer to the teensy.
For usb communication i mean.
Not for serial, or is that just right.
I mean the computer is a host and has host input( put in a usb cable) but teensy will be the host too.
That can not be good, there is one host. This thing is nice because it keeps puzzling me with questions and a lot of answers, that shsrpens my mind, i like it.
And............later on i will share some thoughts and answers with you. I do, have a project that's more or less the same, in basics, but the programming and actual layout is very different.
All midi, say raw midi
I run reaper (computer)that sends out midi clock to an Arduino, i feed note pitches to the Arduino, the Arpeggio is playing, on a synth the drum starts, all in sync with midi clock And i can change chords on the fly. Ipeggio runs on reaper midi clock out.
More to come, Dian
 
What are you referring to as Double posting ?

...

@tonton81 was referring to this second thread : Usb-host-(computer)to-usb-host(teensy

And attempts to answer it are there - thus the problem with double posting . . .

Teensy 3.6 has two USB ports.

The Micro-B connector is a USB device port, which can connect to a USB host using this Micro-B cable.

The 2nd USB port is 5 pads on the circuit board. They are meant to be used with a header (DIY soldering required) and this USB host cable.

Both cables can be connected at the same time. However, if you do this, be aware the Teensy 3.6 and the whatever devices you plug into the host cable will be powered by the Micro-B cable. Normally this works fine, but if you have power hungry devices, it's possible to draw too much power or have other power-related issues when you hot-plug the USB devices.

...
 
I was wondering how can one connect a host computer to a host teensy, the answer is that one can only connect the devices
attached to it, so take a computer a teensy, two usb midi devices and a couple of midi cables.
Comp - usb device midi in ------ midi out usb device Teensy usb host port
.............................. midi out ------ midi in
So now the computer (say abloton live or max/msp) can sent and accept midi messages from the Teensy 3.6 as a usb host.
Thanks for reading this interesting project, Dian
 
Hello Glennzone, are you still around, i was wondering how your project is going. I now have the Teensy 3.6 in the house for 3 weeks and got the host part running, is accepting midi in over usb in.
What is where you are with your midi over usb project.
Dian
 
Status
Not open for further replies.
Back
Top