Forum Rule: Always post complete source code & details to reproduce any issue!
Page 3 of 3 FirstFirst 1 2 3
Results 51 to 64 of 64

Thread: Adjusting the Teensy MIDI device name

  1. #51
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    845
    I feel like I might have one more idea on why this could be happening, in the current usbMIDI implementation none of the midi ports have their own names so it relies on Windows to come up with one on its own. So what could be happening is it sees they have the same PID so it just picks one of them to generate a name from for both devices. And now that I mention it I do remember that I gave my ports theyíre own names back when I first programmed 3 Teensy 3.6s that are on a Windows 7 machine. Iím pretty sure they donít have any issues last time I checked, but itís definitely something else to look into, if anyone wants a place to start with this hereís the thread from 2 years ago: https://forum.pjrc.com/threads/50043...IDI-Port-Names I havenít messed with it since then so it probably would need to be updated.

  2. #52
    Senior Member
    Join Date
    Aug 2019
    Location
    Melbourne Australia
    Posts
    319
    Interestingly, regarding the usb host port of the MIO-10 and it's ability to handle multiple identical class compliant usbMidi devices. In one setup I had several Teensy (3.2 - 4.0) usbMidi devices plugged in via a hub. All worked until I added a T2 usbMidi and to fix it, was not just a matter of unplugging the T2 and restarting the system. The hub needs to be unplugged, then you delete everything in the MIO-10's config, reboot then start over.

    Further digging, in another iteration, had several off-the -shelf UsbMidi class compliant devices plugged into the MIO-10's host and added a (don't recall which)Teensy usbMidi to the mix which de-railed it. Have yet to dig deeper into that rabbithole and set up some test scenarios and take screenshots etc. to cover all the various permutations.

    Have other work so will be a little while...

  3. #53
    Well, I tried vjmuzik's idea of naming the ports, and fingers crossed, it seems to work! My host doesn't display those names, but the fact that they are unique seems to cause windows to get the interface names right....

    Thanks!!

  4. #54
    Junior Member
    Join Date
    Aug 2015
    Posts
    15
    hi, I've tried the suggestions listed in the documentation and the product ID definition, tried deleting devices in Windows Device Manager (Win 10) but the two devices I have keep being renamed in Ableton Live to whichever one was last plugged in. I have one called "footswitch" and one called "solenoid", but they appear as "footswitch#2" and footswitch#3" if footswitch was last plugged in. Each have unique name, manufacturer and serial number ids specified in the name.c file.

    This is really confusing for my particular application, which is a live music set up that I want to be able to boot up and run at the flick of a power switch, using a tablet to remotely control a NUC PC. As the 3 devices I am using all use the same name, but do completely different things, they get mixed up in Live which is tricky to fix. Having unique names would be ideal as then I'd know if the correct device was assigned to the correct track in Live.

    Any ideas?

  5. #55
    Junior Member
    Join Date
    Aug 2015
    Posts
    15
    right so I did what others have suggested in previous posts as an intermediate work around: set up 3 different controllers one as MIDI, one as Serial + MIDI, and the other as Serial+MIDI+Audio. Each come up with their unique names which solves my problem, for now, unless I decide to add another Teensy based device to the mix...

  6. #56
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,599
    At long term, I suggest trashing Win10 and move over to a Mac.

  7. #57
    Quote Originally Posted by Theremingenieur View Post
    At long term, I suggest trashing Win10 and move over to a Mac.
    Unless you use a touchscreen like I do. No Mac for me....

  8. #58
    Senior Member
    Join Date
    Aug 2019
    Location
    Melbourne Australia
    Posts
    319
    @eddevane, how about using a T4.0 with a hub hooked to it's usb host port allowing Windoze to see your individual devices as a single multi-cable device?

  9. #59
    Senior Member Davidelvig's Avatar
    Join Date
    Aug 2015
    Location
    Wisconsin
    Posts
    345
    This used to work for me... having MIDI_Name.c in my project (as attached).
    Also attached is the project explorer listing in VS Code
    Now (for months, at least) the USB MIDI name showing on my Mac is "Teensy MISI Port 1"

    I'd like it to be DigiBrass MIDI as in the .c file.

    Teensy 3.2 architecture on a custom board with Teensy boot loader
    VS Code: 1.69.2
    PlatformIO.ini attached.

    Any guidance?

    MIDI_Name.c
    Code:
    // To give your USB MIDI device a unique name, this code must be placed into a .c file (its own tab).  It can not be in a .cpp file or your main sketch (the .ino file).
    #include "usb_names.h"
    
    // Edit these lines to create your own name.  The length must match the number of characters in your custom name.
    #define MIDI_NAME   {'D','i','g','i','B','r','a','s','s',' ','M','I','D','I'}
    #define MIDI_NAME_LEN  14
    
    // Do not change this part.  This exact format is required by USB.
    struct usb_string_descriptor_struct usb_string_product_name = {
        2 + MIDI_NAME_LEN * 2,
        3,
        MIDI_NAME
    };
    
    // #ifdef USE_OTHER_MIDI_NAME_AND_MANUFACTURER
    // // To give your project a unique name, this code must be
    // // placed into a .c file (its own tab).  It can not be in
    // // a .cpp file or your main sketch (the .ino file).
    
    // #include "usb_names.h"
    
    // // Edit these lines to create your own name.  The length must
    // // match the number of characters in your custom name.
    
    // #define MANUFACTURER_NAME   {'C','-','T','H','R','U'}
    // #define MANUFACTURER_NAME_LEN  6
    // #define MIDI_NAME   {'A','X','I','S','4','9','W','H',}
    // #define MIDI_NAME_LEN  8
    // #define SERIAL_NUM {'1','2','3','4','5','6','7','8','9','a','b','c'}
    // #define SERIAL_NUM_LEN 12
    
    // // Do not change this part.  This exact format is required by USB.
    
    // 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 + MIDI_NAME_LEN * 2,
    //         3,
    //         MIDI_NAME
    // };
    // #endif
    Code:
    Click image for larger version. 
    
    Name:	VS Code Project.jpg 
    Views:	9 
    Size:	32.5 KB 
    ID:	29050
    PlatformIO.INI
    Code:
    [env:teensy31]
    platform = teensy
    board = teensy31
    framework = arduino
    build_flags = -D USB_MIDI_SERIAL -D TEENSY_PLATFORM
    lib_deps = 
    	robtillaart/RunningMedian@^0.3.0
    	sstaub/TeensyID@^1.3.1
    	arduino-libraries/Madgwick@^1.2.0
    	sparkfun/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library@^1.1.2
    	adafruit/Adafruit GFX Library@^1.10.4
    	adafruit/Adafruit ST7735 and ST7789 Library@^1.6.0
    	adafruit/Adafruit BusIO@^1.7.1
    	arduino-libraries/SD@^1.2.4
    	ivanseidel/LinkedList@0.0.0-alpha+sha.dac3874d28
    lib_extra_dirs = 
    	../../dbLibraries

  10. #60
    Senior Member Davidelvig's Avatar
    Join Date
    Aug 2015
    Location
    Wisconsin
    Posts
    345
    Hello again.
    Any takes for my question above?

  11. #61
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    845
    Have you deleted the existing device from Audio MIDI Setup after the name change? That is still required on Mac as far as I know.

  12. #62
    Senior Member Davidelvig's Avatar
    Join Date
    Aug 2015
    Location
    Wisconsin
    Posts
    345
    Yes, I've tried that.
    Interesting that while deleting all of the cached USB MIDI connections in AudioMIDI setup, I found another called "DigiBrass MIDI".
    So it has worked at some point since I got my newer MacBook (~ a year).

    - I deleted all MIDI devices in MIDI Studio (except the red IAC Driver) and restarted the device... and it showed as "Teensy MIDI"
    - I took the device to our iMac elsewhere in the house, which has never seen the device (and does not have anything in MIDI Studio) and it appears as "Teensy MIDI"

    Hmmm...
    Any other ideas?

    I do have this in my PlatformIO.ini
    ...
    build_flags = -D USB_MIDI_SERIAL
    ...

    I have also tried it with
    build_flags = -D USB_MIDI

    No change to the behavior to always presenting "Teensy MIDI"

  13. #63
    Senior Member Davidelvig's Avatar
    Join Date
    Aug 2015
    Location
    Wisconsin
    Posts
    345
    BTW, I was just reviewing the PlatformIO documentation and note they are a Ukrainian company. It was an interesting read on their website.

  14. #64
    Senior Member Davidelvig's Avatar
    Join Date
    Aug 2015
    Location
    Wisconsin
    Posts
    345
    Any other ideas on renaming the USB MIDI port in VS Code?

Posting Permissions

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