Control-Surface icon indicating copy to clipboard operation
Control-Surface copied to clipboard

Set manufacturer, model and midi device name

Open LukaszChrzanowski opened this issue 4 years ago • 7 comments

Hello,

I'm creating controller for myself currently for DAW Propellerhead Reason, and for this I need to create special mapping for their protocol "Remote" for communication with my newly created Control Surface (I've created my control surface to control mixer effects, and for each time in every project I've to map knobs from my controller to wirtual knobs in mixer - with that mapping it will be assigned automatically).

To have this mapping working - I've to set Manufacturer, Model and MIDI Device name.

I've tried to find this in Your's library, but I cannot find it - can You give me a hint? :)

LukaszChrzanowski avatar Jan 10 '20 21:01 LukaszChrzanowski

The low-level USB descriptors are handled by either the MIDIUSB library or by the Teensy Core, depending on which board you're using.

The Teensy names are defined here: https://github.com/tttapa/Control-Surface/blob/bc9b22273e2c6ff4fc6c4640e8029f1c4105ebb2/src/MIDI_Interfaces/Teensy-USB-MIDI-name.c
You can find more information on the PJRC forums.

MIDIUSB is harder to change, you'll have to edit the library. I don't have any experience with this, so I can't really help you.

tttapa avatar Jan 11 '20 15:01 tttapa

in your main sketch folder, create a file named usb_desc.c

#include <usb_names.h>

#define MANUFACTURER_NAME {'M', 'Y'}
#define MANUFACTURER_NAME_LEN 2
#define PRODUCT_NAME {'D', 'E', 'V', 'I', 'C', 'E'}
#define PRODUCT_NAME_LEN 6
struct usb_string_descriptor_struct usb_string_manufacturer_name = {
    2 + MANUFACTURER_NAME_LEN * 2,
    3,
    MANUFACTURER_NAME};

struct usb_string_descriptor_struct usb_string_product_name = {
    2 + PRODUCT_NAME_LEN * 2,
    3,
    PRODUCT_NAME};

2kohm avatar Jan 12 '20 21:01 2kohm

I use Arduino Micro, so Teensy is out of scope for me.

I've found something like this: http://liveelectronics.musinou.net/MIDIdeviceName.php but not tried yet

2kohm - I suppose this will be then automatically added to my project? I will try tomorrow and give feedback how it goes. :)

LukaszChrzanowski avatar Jan 12 '20 22:01 LukaszChrzanowski

2kohm's solution only works for Teensies. The liveelectronics link should work for Arduino Micro.

tttapa avatar Jan 12 '20 23:01 tttapa

@LukaszChrzanowski did you make it work with the instructions from liveelectronics? I changed the name but can't see proper board name. I'm on Arduino Leonardo

mostr avatar Apr 06 '20 17:04 mostr

@LukaszChrzanowski I Following this instruction and work for Me, I am using Arduino micro https://www.youtube.com/watch?v=6cskac0Dzjo

pukulsesuatu avatar Jul 29 '22 02:07 pukulsesuatu

@LukaszChrzanowski I Following this instruction and work for Me, I am using Arduino micro https://www.youtube.com/watch?v=6cskac0Dzjo

Thank you, this worked great for me.


Basic instructions are :

  1. locate boards.txt file, on windows it is somewhere in :

    • C:\Program Files (x86)\Arduino\hardware\arduino\avr\

    • C:\Users\user\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

  2. change desired name, for instance for Leonardo in boards.txt :

    • from leonardo.build.usb_product="Arduino Leonardo"
    • to leonardo.build.usb_product="My Custom Device"
  3. Restart Arduino IDE

  4. Compile and upload code of your application.

starwalker00 avatar Aug 23 '23 12:08 starwalker00