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

Thread: Adjusting the Teensy MIDI device name

  1. #26
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,576
    Thanks. I've added the mac screenshot to the web page.

  2. #27
    Senior Member Davidelvig's Avatar
    Join Date
    Aug 2015
    Location
    Wisconsin
    Posts
    240
    I just launched an old Arduino installed from last year on my Windows 7 VM (Arduino 1.6.6, Teensyduino 1.26 on VMWare 10.1.1. on my Mac - High Sierra) and connected a USB port (screenshot), and it recognized the USB port by my renamed value.
    Click image for larger version. 

Name:	VMWare USB settings on Win 7 VM.png 
Views:	45 
Size:	640.8 KB 
ID:	12729Click image for larger version. 

Name:	VMWare USB settings on Win 7 VM.png 
Views:	45 
Size:	640.8 KB 
ID:	12729

    Looks like Windows accepts the MIDI device name change as well ("DigiBrass MIDI").

    Does that confirm what you were looking for, Paul?
    I don't get the "Van Ooijen Technische" part... that's always been a prefix.

    note the Audacity view of the MIDI port is just "DigiBrass MIDI"
    Click image for larger version. 

Name:	Audacity screenshot on Mac.png 
Views:	44 
Size:	207.0 KB 
ID:	12730

    Interesting that "MIDI Monitor" a Mac app I sownbloaded from Snoise, shows the following
    Click image for larger version. 

Name:	MIDI Monitor - Snoize.jpg 
Views:	53 
Size:	76.0 KB 
ID:	12731

    and from the Mac program "Audio MIDI Setup"...
    Click image for larger version. 

Name:	Audio MIDI Setup.png 
Views:	50 
Size:	264.2 KB 
ID:	12732


    p.s. Don't know why I got a double Windows screenshot image from VMWare, but heck, it's my dog, so it's OK.
    Last edited by Davidelvig; 01-25-2018 at 03:29 AM.

  3. #28
    Junior Member
    Join Date
    Jul 2015
    Posts
    17
    Based on my understanding, the new device name has to be explicitly defined at compiling (since it uses #define)? Does the USB code require it to be declared that way, or can it somehow be declared as a variable that could be device-dependent?
    Otherwise it seems that to have multiple Teensys connected with unique names, I'd have to change the name manually for each device before compiling.

  4. #29
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Isle in the Salish Sea
    Posts
    1,166
    ...until the official answer comes... I'd say 'yes' it has to be that was because it has to override a weak link definition elsewhere in the Teensyduino libraries (see post 6 above)

    ...edit... wait... has to be a define statement but it can be in the code of the sketch... er... now I'm not so sure and I think I should have waited for a more informed answer. - now I miss the delete post feature.

  5. #30
    Junior Member
    Join Date
    Nov 2018
    Posts
    2
    Hi, I'm having an issue with multiple Teensy Midi devices that I need connected to the PC at the same time. I've renamed their device names as outlined in this thread, and they are showing correct names in windows device manager, but in all apps I've tested, I can see two devices with the same name, and not two unique devices. I've tested with Unity3d using nAudio plugin, Resolume Arena, and Midi-OX. They both work correctly if only one is plugged in at a time, but need to use both together. It seems pretty random which of the two devices is used twice, and if I plug into a different usb bus, sometimes I can get them both recognised as expected. But need them to always be recognised correctly. See screen grab of Midi-Ox displaying two duplicate names, and Windows device manager showing correct names (ConanSkate and ConanLanguage are the two renamed Teensys).
    Click image for larger version. 

Name:	midiNames.PNG 
Views:	41 
Size:	170.1 KB 
ID:	15123

    I'm using Windows 10, Teensy 3.2, arduino 1.8.6
    I've tried uninstalling the devices from the device manager, and restarting many times.
    Was wondering if comment #23 might be useful, but wasn't sure how to implement that.
    Any help greatly appreciated!

  6. #31
    Junior Member
    Join Date
    Nov 2018
    Posts
    2
    Quote Originally Posted by HEADFULL View Post
    Hi, I'm having an issue with multiple Teensy Midi devices that I need connected to the PC at the same time. I've renamed their device names as outlined in this thread, and they are showing correct names in windows device manager, but in all apps I've tested, I can see two devices with the same name, and not two unique devices. I've tested with Unity3d using nAudio plugin, Resolume Arena, and Midi-OX. They both work correctly if only one is plugged in at a time, but need to use both together. It seems pretty random which of the two devices is used twice, and if I plug into a different usb bus, sometimes I can get them both recognised as expected. But need them to always be recognised correctly. See screen grab of Midi-Ox displaying two duplicate names, and Windows device manager showing correct names (ConanSkate and ConanLanguage are the two renamed Teensys).
    Click image for larger version. 

Name:	midiNames.PNG 
Views:	41 
Size:	170.1 KB 
ID:	15123

    I'm using Windows 10, Teensy 3.2, arduino 1.8.6
    I've tried uninstalling the devices from the device manager, and restarting many times.
    Was wondering if comment #23 might be useful, but wasn't sure how to implement that.
    Any help greatly appreciated!
    So it seems there is a hacky but simple way around my issue of multiple teensy MIDI devices on the same PC. Set one to MIDI and the other to Serial-MIDI in the arduino IDE Tools > USB type before uploading. The reason I think this is working is that in usb_desc.h USB_MIDI and USB_MIDI_SERIAL have different PRODUCT_ID values. It seems that only changing PRODUCT_NAME and MANUFACTURER_NAME are not enough to force some applications in Windows to see unique MIDI devices.
    The downside of this hacky solution is that only 2 Teensy devices will work this way (being only a choice of midi or serial-midi). I could change the PRODUCT_ID value in usb_desc.h manually before uploading to each device, but that doesn't seem very clean. Does anyone know if there is there a better way of doing this?

  7. #32
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,534
    The Teensy is so powerful that in the newer Teensyduino versions, it supports 4 or even 16 virtual midi devices on a single Teensy over one single USB connection. So, with some mindful programming, it should not longer be needed to have too many different Midi Teensys on one computer since one can do it all.

  8. #33
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Location
    Florida
    Posts
    345
    Quote Originally Posted by HEADFULL View Post
    So it seems there is a hacky but simple way around my issue of multiple teensy MIDI devices on the same PC. Set one to MIDI and the other to Serial-MIDI in the arduino IDE Tools > USB type before uploading. The reason I think this is working is that in usb_desc.h USB_MIDI and USB_MIDI_SERIAL have different PRODUCT_ID values. It seems that only changing PRODUCT_NAME and MANUFACTURER_NAME are not enough to force some applications in Windows to see unique MIDI devices.
    The downside of this hacky solution is that only 2 Teensy devices will work this way (being only a choice of midi or serial-midi). I could change the PRODUCT_ID value in usb_desc.h manually before uploading to each device, but that doesn't seem very clean. Does anyone know if there is there a better way of doing this?
    It’s such a simple fix that I can’t figure out for the life of me why no one else ever suggests it when multiple people always run in to this same issue. All you have to do is change the serial number of your device so the OS recognizes it as a separate entity when they are all using USB_MIDI.

  9. #34
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    interesting. I may have same issue as I will connect several Teensy 3.2 to my PC .. so how did you change the serial number ?? did you add any #define xySerial into names.c (in you sketch folder) ? detail: I also want to keep the USB_MIDI

  10. #35
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    @PaulStoffregen: first of all, thanks for the updated https://www.pjrc.com/teensy/td_midi.html ! , great to have the option now to change name on a more easier way. (btw: I found it because struggled with the pitch bend issue .. I was wondering why my old sketches does not longer work well in bending

    The renaming of devices works well now, tested on several PC's which never connected a teensy before.. great ! ... But I can NOT confirm that Windows 10 does automatically update the device name. I tested both, 7 (64bit) and 10 (64bit, up2date), still same issue (refresh problem): Your workflow of naming works (https://www.pjrc.com/teensy/td_midi.html) well ... but neither Win7 or neither Win10 will ever forget the first name (I did not remove any entries manually, wanted to see if it updates itself in Windows, but even Win 10 doesn't too). maybe some apps (see posts from other user show the real new name, but the Windows system > device manager at least seems still wrong)

    The best way I can really test the device name is TyCommander btw. One detail more to Windows (if you want see real name in Win7/10): device manager > select entry in audio/game controller (which shows wrong old/first name) then > properties > details > select dropdown 'bus send name' .. then you see the real (updated name).

    Btw: I also tested iOS .. still the (known) bug, midi device name does not get refreshed, always keeps the first Teensy midi device name. So I feel only the Mac seems to work well ( I do not own one, could not test)

    other topic: what is your opinion to earlier post (if we want add multiple devices without conflict) .. changing serial number in addition to name ? how to do ?

    thanks !

  11. #36
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Location
    Florida
    Posts
    345
    Quote Originally Posted by kalo View Post
    interesting. I may have same issue as I will connect several Teensy 3.2 to my PC .. so how did you change the serial number ?? did you add any #define xySerial into names.c (in you sketch folder) ? detail: I also want to keep the USB_MIDI
    Here is an example of what Iíve used in my controllers.
    Code:
    // 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   {'O','p','e','n',' ','L','a','b','s'}
    #define MANUFACTURER_NAME_LEN  9
    #define MIDI_NAME   {'N','E','K','O'}
    #define MIDI_NAME_LEN  4
    #define SERIAL_NUM {'E','n','c','o','d','e','r','P','a','n','e','l'}
    #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
    };
    
    
    struct usb_string_descriptor_struct usb_string_serial_number = {
            2 + SERIAL_NUM_LEN * 2,
            3,
            SERIAL_NUM
    };
    As a side note, not all characters work as a serial number.

  12. #37
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    Great ! Thank you .. no idea where you found this ) ... i will test for sure. I may remember from older threads that we should not change any ID's because the auto boot loader will not work longer, but i assume this was a different one. Did you find any side effects changing the SERIAL_NUM ? Anyhow Great, thx !

  13. #38
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Location
    Florida
    Posts
    345
    I have not noticed any side effects from it, I’m still able to program them with no problems. I found it from just looking around in the Teensy core and figured I may as well change it, it just so happens that by changing it I never ran into any problems when connecting multiple Teensy’s to the same computer like so many others had. I never knew it was a problem because I always changed it for each of the devices I’ve made.

  14. #39
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    Quote Originally Posted by vjmuzik View Post
    I have not noticed any side effects from it, I’m still able to program them with no problems. I found it from just looking around in the Teensy core and figured I may as well change it, it just so happens that by changing it I never ran into any problems when connecting multiple Teensy’s to the same computer like so many others had. I never knew it was a problem because I always changed it for each of the devices I’ve made.
    Perfect, thx ! I will test (in particular also on iPad), with 2 devices (currently they always get mixed up), so this idea could solve it, i will post later ! Thx.

  15. #40
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    Hi vjmuzik

    I did some detailed tests today, somehow mixed feelings, here what I found (maybe helps to understand):

    - i always use TyCommander to upload a new .hex file and see the results, shows the Serial number and name most easy.
    - compliment to you: your code allows me to update the 'serial id' of the Teensy, i can see result in TyCommander, well done !
    - but: ...each Teensy seems to have a unique Serial ID anyhow (natively), which is great, i did not know before (maybe @PaulStoffregen can confirm)
    - so there seems no need for me to update this value manually, what is the benefit? . Your sketch works (i tested), but maybe will NOT solve the mixing-up issue (posts above from other user)
    - you were right, only letters and numbers are allowed in SERIAL_NUM ; )
    - what i also found: Win7/10 does not refresh any renamed devices (as wrote earlier), but easy workaround i found: delete entry in device manger (via context menu), unplug and replug .. Windows immediately finds the new hardware with updated device name, works well.

    the problems i have with your solution (manually update Serial number of Teensy):
    - you overwrite a unique number
    - what looks good in first moment: updating the serial id forces Windows to update the device name .. but this happens NOT via refresh, it happened because you generate a new device - same what happens with any Teensy you connect first time (device name doesn't matter, also 2 same named ARE 2 different devices).
    - what I do not like most: any self made serial number (which is not a number) produce a '?' in teensy identity (at least in TyCommander), and even more worse: the Teensy 3.2 gets interpreted as a Teensy 3.1. It looks like that a serial number higher 3.000.000 about produces a Teensy 3.2. So i feel: better not touch it
    see screenshot #1 (made with a serial id 'TEST', if i would use e.g. '2' then the ? does not apper, would be '2' .. but still a Teensy 3.1):

    Click image for larger version. 

Name:	01 -TyCommander (patched serial).png 
Views:	19 
Size:	39.0 KB 
ID:	16114

    My takeaways (user may comment, maybe I am wrong :
    - no need to update any serial number, each Teensy is unique already. Best prove: connect 2 devices with same device name (and same sketch) together and open TyCommander.
    I see always 2 devices with unique id’s see screenshot #2:.

    Click image for larger version. 

Name:	02 - TyCommander (2 same devices).png 
Views:	18 
Size:	44.4 KB 
ID:	16115

    The fact that some apps may mix-up devices with same name seems to be a fault of the apps, not of the Teensy. To overcome this problem a simple rename of the device is maybe a more clean solution than patching a serial id i feel, right ?. Patching the serial id does not make it more unique, it forces only that the name is refreshed in Windows (the old is still installed). In case a application (which is not same 'clever' as TyCommander) will struggle with 2 devices (with same device name): maybe better to give them a other name i feel.

    My coin, any feedback welcome



    _
    btw, to recap the refresh issue (more as input for @PaulStoffregen as update to the PJRC website https://www.pjrc.com/teensy/td_midi.html )

    - Win7 and Win 10 (!) do NOT refresh the device name automatically (at least on my laptops). You must remove the entry in device manager manually, unplug and replug. Windows will recognize the new device with correct name. So not a big issue.

    - to make complete: unfortunatly iOS (current 12.x version) does keep the old name, no automated refresh, also no way to update manually (except reinstall)
    Last edited by kalo; 03-10-2019 at 07:42 PM.

  16. #41
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Location
    Florida
    Posts
    345
    Quote Originally Posted by kalo View Post
    Hi vjmuzik

    I did some detailed tests today, somehow mixed feelings, here what I found (maybe helps to understand):

    - i always use TyCommander to upload a new .hex file and see the results, shows the Serial number and name most easy.
    - compliment to you: your code allows me to update the 'serial id' of the Teensy, i can see result in TyCommander, well done !
    - but: ...each Teensy seems to have a unique Serial ID already, which is great, i did not know before (maybe @PaulStoffregen can confirm)
    - so there seems no need for me to update this value manually, what is the benefit? . Your skech works (i tested), but maybe did not solve the mixing-up issue
    - you were right, only letters and numbers are allowed in SERIAL_NUM ; )
    - what i also found: Win7/10 does not refresh any renamed devices (as wrote earlier), but easy workaround i found: delete entry in device manger (via context menu), unplug and replug .. Windows immediately finds the new hardware with updated device name, works well.

    the problems i have with your solution (manually update Serial number of Teensy):
    - you overwrite a unique number
    - what looks good in first moment: updating the serial id forces Windows to update the device name .. but this happens NOT via refresh, it happened because you generate a new device - same what happens with any Teensy you connect first time (device name doesn't matter, also 2 same named ARE 2 different devices).
    - what I do not like most: any self made serial number (which is not a number) produce a '?' in teensy identity (at least in TyCommander), and even more worse: the Teensy 3.2 gets interpreted as a Teensy 3.1. It looks like that a serial number higher 3.000.000 about produces a Teensy 3.2. So i feel: better not touch it
    see screenshot #1 (made with a serial id 'TEST', if i would use e.g. '2' then the ? does not apper, would be '2' .. but still a Teensy 3.1):

    Click image for larger version. 

Name:	01 -TyCommander (patched serial).png 
Views:	19 
Size:	39.0 KB 
ID:	16114

    My takeaways (user may comment, maybe I am wrong :
    - no need to update any serial number, each Teensy is unique already. Best prove: connect 2 devices with same device name (and same sketch) together and open TyCommander.
    I see always 2 devices with unique id’s see screenshot #2:.

    Click image for larger version. 

Name:	02 - TyCommander (2 same devices).png 
Views:	18 
Size:	44.4 KB 
ID:	16115

    The fact that some apps may mix-up devices with same name seems to be a fault of the apps, not of the Teensy. To overcome this problem a simple rename of the device is maybe a more clean solution than patching a serial id i feel, right ?. Patching the serial id does not make it more unique, it forces only that the name is refreshed in Windows (the old is still installed). In case a application (which is not same 'clever' as TyCommander) will struggle with 2 devices (with same device name): maybe better to give them a other name i feel.

    My coin, any feedback welcome
    I’m pretty sure the problem is with Windows MIDI driver not recognizing them as separate devices, but changing the serial number registers it as a new separate device. I can see how it appearing as a Teensy 3.1 could cause issues, my controllers used Teensy 3.6’s if that makes a difference. I’m pretty sure others have tried just changing the name, but still experience the issue. Last I checked, I thought the serial number was defaulted to 0 so it may be possible that TyCommander is reading from some other register.

  17. #42
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    thx. Yes, your serial ID update DOES forces a new device .. (same as you would use an other new Teensy) .. but it is not more unique because of this (it was always a 'new' device, and different to an other Teensy with same sketch/name/id,right ?) .. i feel some (lazy) apps read the 'device name only' instead the Teensy identifier .. i was just wondering because the id change would not solve it then
    quite tricky i feel .. and confusiong for myself lol

    one addon: your trick with the serial number helped me at iPad, this is the only way to get a refreshed device name (because it IS same to a new Teensy, a new device, thx for this ! )
    Last edited by kalo; 03-10-2019 at 07:40 PM.

  18. #43
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Location
    Florida
    Posts
    345
    It’s not different program to program for midi devices, every program gets the devices straight from the driver. So they can all have the same device name as long as the serial number is different from device to device to differentiate them, otherwise Windows doesn’t handle it well. Plenty of devices in the commercial world share the same device name and they are designed to be able to use multiple at the same time and the only difference is the serial number between them.

  19. #44
    Junior Member
    Join Date
    Mar 2019
    Posts
    7
    Exactly. So as long the Teensy has always a unique number all is fine. But this is anyhow the case i learned (as long we do not write any ID manually). So let's see if user still struggle (with or without your sketch). Anyhow, thanks for your idea !

Posting Permissions

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