MIDI device emulation

Garug

Well-known member
I am trying to control Sound Device MixPre 10T recorder with MIDI.

It accepts several controllers, like Akai MidiMix and Launch Control XL, It is unclear for me how it detects what device is connected. As I understand it does it automatically and configures everything for that device.

I did find the name.c to change the device and manufacturer name, but I suppose this is only the human readable format and think maybe it is using the

Code:
      // Line 109 https://github.com/PaulStoffregen/cores/blob/dbc44729351253a94e890e7d59a22e705f868597/teensy4/usb_desc.c
      // device_descriptor[]
      //   EP0_SIZE,                               // bMaxPacketSize0
      //  LSB(VENDOR_ID), MSB(VENDOR_ID),         // idVendor
      //  LSB(PRODUCT_ID), MSB(PRODUCT_ID),       // idProduct

How could I change these, or any other ideas how to get the MixPre regocnice a supported MIDI device is connected?
 
You're effectively wanting to make an emulator for one of those controllers, to which end you'd need to copy exactly how the controller behaves, which you'd probably need to get a hold of one of the controllers for.
 
I am getting the Launch Control XL (should have it tomorrow), but the question, when I know how it has the device info, how do I make the Teensy USB look the same? Do I need to modify the library, or can it be done like the USB name via name.c
 
Possibly you would need to edit usb_desc.h too (there are various sections). It is where VID and PID are defined.
Its location depends on the Teensy and OS you are using; for Teensy 3.x under Windows, it's <Arduino_folder>\hardware\teensy\avr\cores\teensy3\usb_desc.h
 
After a while I had time to look into this, now I have LaunchControl XL

First, the LaunchControl XL works great with the InputFunctions USB Host example. I.e all controls provide clear and what seems correct printout on serial monitor.

When looking the LaunchControl XL on the Apple MIDI (audio devices) it has only one MIDI port.

The Teensy 4.1 I use shows 16 ports, though I am using the Serial + MIDI (not x16)?

The manufacturer name comes as set on name.c but I did not succeed changing the manufacturer yet, it shows teensyuino.

There is probably few other things I need to change like the Manufacturer ID. This is what I get with InputFunctions, when debug print is on

Code:
USB Host InputFunctions example
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20003000
periodictable = 20003000
port change: 10001803
    connect
  begin reset
port change: 10001005
  port enabled
  end recovery
new_Device: 12 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 00 02 00 00 00 40 35 12 61 00 00 00 01 02 00 01 
    VendorID = 1235, ProductID = 0061, Version = 0000
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: Focusrite A.E. Ltd
enumeration:
Product: Launch Control XL
enumeration:
Config data length = 99
enumeration:
Configuration Descriptor:
  09 02 63 00 02 01 00 80 32 
    NumInterfaces = 2
    ConfigurationValue = 1
  09 04 00 00 00 01 01 00 03 
    Interface = 0
    Number of endpoints = 0
    Class/Subclass/Protocol = 1 / 1 / 0
  09 24 01 00 01 09 00 01 01 
  09 04 01 00 02 01 03 00 03 
    Interface = 1
    Number of endpoints = 2
    Class/Subclass/Protocol = 1 / 3 / 0
  07 24 01 00 01 3F 00 
  06 24 02 01 01 05 
  06 24 02 01 04 04 
  09 24 03 01 02 01 01 01 05 
  09 24 03 01 03 01 02 02 04 
  07 05 81 02 40 00 01 
    Endpoint = 1 IN
    Type = Bulk
    Max Size = 64
    Polling Interval = 1
  06 25 01 02 02 03 
  07 05 02 02 40 00 01 
    Endpoint = 2 OUT
    Type = Bulk
    Max Size = 64
    Polling Interval = 1
  06 25 01 02 01 04 
enumeration:
USBHub memory usage = 960
USBHub claim_device this=200031E0
USBHub memory usage = 960
USBHub claim_device this=200035A0
Descriptor 4 = INTERFACE
MIDIDevice claim this=20003960
len = 90
  Interface is unknown (might be Yahama)
type: 36, len: 9
    MIDI Header (ignored)
type: 4, len: 9
Descriptor 36 =  ???
Descriptor 4 = INTERFACE
MIDIDevice claim this=20003960
len = 72
  Interface is MIDI
type: 36, len: 7
    MIDI Header (ignored)
type: 36, len: 6
    MIDI IN Jack (ignored)
type: 36, len: 6
    MIDI IN Jack (ignored)
type: 36, len: 9
    MIDI OUT Jack (ignored)
type: 36, len: 9
    MIDI OUT Jack (ignored)
type: 5, len: 7
    MIDI Endpoint: 81
      rx_size = 64
type: 37, len: 6
    MIDI Endpoint Jack Association (ignored)
type: 5, len: 7
    MIDI Endpoint: 2
      tx_size = 64
type: 37, len: 6
    MIDI Endpoint Jack Association (ignored)
new_Pipe
new_Pipe
Descriptor 36 =  ???
Descriptor 36 =  ???
Descriptor 36 =  ???
Descriptor 36 =  ???
Descriptor 36 =  ???
Descriptor 5 = ENDPOINT
Descriptor 37 =  ???
Descriptor 5 = ENDPOINT
Descriptor 37 =  ???

Any suggestions how to start making the teensy 4.1 as LaunchControl XL towards computer? Is the only way to edit the USB host library?

There likely is then also some of that communication that needs to be taken care of.
 
Websearched this out of curiosity and found:-

https://novationmusic.com/en/launch/launch-control-xl

Which states:-
Launch Control XL is HUI enabled. Simply plug into Logic, Cubase or ProTools and start controlling. You can even control hardware directly, as Launch Control XL works standalone; all you need is a MIDI USB host, a little box that converts USB MIDI to plain, ordinary, house or garden MIDI (sold separately).
Perhaps try plugging the Launch Control XL and the Sound Device MixPre 10T into two computer usb ports then establish connections between the two devices with a software MIDI patchbay so you can monitor MIDI traffic.

Looking at LaunchControl XL Programmer's Reference found here:-

https://downloads.novationmusic.com/novation/launch/launch-control-xl-mk1mk2

Perhaps some Sysex?
 
It was necessary to change on usb_desc.h

Code:
#elif defined(USB_MIDI_SERIAL)
 // #define VENDOR_ID		0x16C0
 // #define PRODUCT_ID		0x0489

  #define VENDOR_ID		0x1235
  #define PRODUCT_ID		0x0061
after it works. But caused some confusion https://forum.pjrc.com/threads/7163...D-How-to-recover?p=316929&posted=1#post316929


I have now Teensy 4.1 passing trough the messages between LaunchControl XL and Mix pre and listening all messages with Serial1. It should be pretty clear from here.

I just hope there would not have been build so many layers of confusion to the simplest protocol I have seen. But discovered finally the plain send and read functions from the noise, so that is ok also.
 
Back
Top