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

Thread: Teensy 3.2 as USB Host (for USB-MIDI keyboard input/ctrl)

  1. #1
    Junior Member
    Join Date
    Dec 2015
    Posts
    5

    Teensy 3.2 as USB Host (for USB-MIDI keyboard input/ctrl)

    I just got my first Teensy 3.2 and I would like to be able use my AKAI LPK25 USB-MIDI keyboard to play / control Teensy Audio Library synths and Teensy driven analog synths via MIDI.
    I've read a couple of threads about Teensy 3.x USB Host support, but I'm still confused / can't find a conclusive answer:
    Do I need an USB Host Shield / Board with the Teensy 3.2 or can the Teensy 3.2 act as an USB Host without that; hosting / powering a USB-MIDI class compliant keyboard /controller on it's own? Can I use an USB OTG cable to connect a USB-MIDI keyboard to the Teensy's USB?
    If possible: What do I need to do to power the Teensy (with external 5V power supply?) and a USB-MIDI keyboard (how to get the external 5V power to the USB)?

  2. #2
    Junior Member
    Join Date
    Jan 2016
    Posts
    19
    Sample code would help.

  3. #3
    Junior Member
    Join Date
    Dec 2015
    Posts
    5
    Quote Originally Posted by MajorTom View Post
    Sample code would help.
    I'm not sure what sample code would help here?
    I could post any sketch/code where I get MIDI data from my PC via usbMIDI to my Teensy 3.2: For example a simple MIDI-playable tone() synth (MIDI-keyboard > PC > usbMIDI > Teensy 3.2. > MIDInote-to-frequency translate table > tone() > audio output (via PWM-pins).

    Question is: How can I get the MIDI data directly from my MIDI-keyboard to my Teensy 3.2? For that the Teensy needs to serve as an USB Host. How do I get this USB Host mode to work on Teensy 3.2? I can get external 5V power to the Teensy board, but how do I get it to power a MIDI-keyboard via the Teensy USB-port?
    And what else (hardware/software) is needed to get usbMIDI data directly from an USB-MIDI class compliant keyboard /controller? On the Teensy layout diagram it says "Add 150uF capacitor for USB Host mode" on the Teensy bottom pad (next to the GROUND-pin), but I couldn't find how exactly this capacitor should be placed... I couldn't find any useable instructions about this USB Host mode at all... that's why I posted this question;-)

  4. #4
    Senior Member adrian's Avatar
    Join Date
    Oct 2015
    Location
    Wellington, NZ
    Posts
    504
    Here is a discussion of it.

    if you read down to divabanana you will see how it has been done successfully, using an addon USB host shield / board.

    My own suggestion was try a usb to serial cable keyboard usb > usb to serial midi cable > serial midi on teensy , but I am 99% sure its a dumb idea... I am pretty sure that the usb to serial midi cable will not work unles there is a USBhost and the keyboard ain't a USBhost !!

    i think divabanana was on the money in the above thread ...

    there is this solution too, for USB MIDI 1.0 devices
    Last edited by adrian; 01-19-2016 at 03:05 AM.

  5. #5
    Junior Member
    Join Date
    Dec 2015
    Posts
    5
    Thanks Adrian! This sure helps!

Posting Permissions

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