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

Thread: Use Teensy as Midi and USB Keyboard controller at the same time

  1. #1
    Junior Member
    Join Date
    Nov 2016
    Posts
    9

    Use Teensy as Midi and USB Keyboard controller at the same time

    Hi there,

    I'm making a footcontroller for music software. Most actions I'm controlling using Midi CC messages but some actions are not supported using Midi.
    Would it be possible to run my Teensy LC as both a Midi contoller and USB keyboard at the same time? In that way I could use key combinations directly from Teensy to do everything I want to do.

    Best,

    YBR

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,345
    Quote Originally Posted by ybr View Post
    Would it be possible to run my Teensy LC as both a Midi contoller and USB keyboard at the same time?
    Yes. But this isn't one of the options in the Tools > USB Type menu, so you'll need to edit usb_desc.h to create that combination. See the comments in that file for instructions.

  3. #3
    Junior Member
    Join Date
    Nov 2016
    Posts
    9
    Thanks Paul, I've tried to make it work but I didn't manage to yet. It doesn't seems to show up in the USB menu.

    This is what I got so far, any pointers how to get it to work?

    Code:
      #elif defined(KEYBOARD_MIDI)
      #define VENDOR_ID		0x16C0
      #define PRODUCT_ID		0x04D4
      #define MANUFACTURER_NAME	{'T','e','e','n','s','y','d','u','i','n','o'}
      #define MANUFACTURER_NAME_LEN	11
      #define PRODUCT_NAME		{'K','e','y','b','o','a','r','d','/','M','I','D','I'}
      #define PRODUCT_NAME_LEN	13
      #define EP0_SIZE		64
      #define NUM_ENDPOINTS         6
      #define NUM_USB_BUFFERS	16
      #define NUM_INTERFACE		2
      #define SEREMU_INTERFACE      1	// Serial emulation
      #define SEREMU_TX_ENDPOINT    1
      #define SEREMU_TX_SIZE        64
      #define SEREMU_TX_INTERVAL    1
      #define SEREMU_RX_ENDPOINT    2
      #define SEREMU_RX_SIZE        32
      #define SEREMU_RX_INTERVAL    2
      #define MIDI_INTERFACE        0	// MIDI
      #define MIDI_NUM_CABLES       1
      #define MIDI_TX_ENDPOINT      3
      #define MIDI_TX_SIZE          64
      #define MIDI_RX_ENDPOINT      4
      #define MIDI_RX_SIZE          64
      #define ENDPOINT1_CONFIG	ENDPOINT_TRANSMIT_ONLY
      #define ENDPOINT2_CONFIG	ENDPOINT_RECEIVE_ONLY
      #define ENDPOINT3_CONFIG	ENDPOINT_TRANSMIT_ONLY
      #define ENDPOINT4_CONFIG	ENDPOINT_RECEIVE_ONLY
      #define ENDPOINT5_CONFIG	ENDPOINT_TRANSMIT_ONLY
      #define ENDPOINT6_CONFIG	ENDPOINT_RECEIVE_ONLY

Posting Permissions

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