Change MIDI Device Name? (XIAO_ESP32S3)

Is it possible to change the name that the name that an ESP32S3 shows up as when being used as a MIDI controller?

At the moment it shows up as “XIAO_ESP32S3”.

In the past all my DIY USB-MIDI controllers were based on a Teensy on that it was relatively straightforward where you would just add a name.c to the project and change the values to what you want (relevant code below).

When trying to do the same with the ESP32S3 it throws an error on #include "usb_names.h".

#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   {'O','P','C',' ','S','e','n','s','o','r'}
#define MIDI_NAME_LEN  10

// 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
};

I had a search but only found an old thread related to an Seeed XIAO M0, so don’t think it’s relevant. Plus I couldn’t find the mentioned boards.txt file anywhere on my computer. I also found some other mentions on google, but all seemed to be related to other ESP32 variants where it also wasn’t applicable (as far as I could tell).

Hi there,

I would think if you define these it will over write the weak names for Device and product

#define MANUFACTURER_NAME    {'t','n','i'}
#define MANUFACTURER_NAME_LEN 3
#define PRODUCT_NAME    {'t','i','n', 'y', ' ', 'd', 'e', 'v', 'i', 'c', 'e'}
#define PRODUCT_NAME_LEN 11

HTH
GL :slight_smile: PJ
:v:

1 Like

A cant hardly get it to show the right name anytime!

Hmm, am I meant to just put this at the top of my sketch (or the setup() function)?

Or does this need to be in a separate .c file?

More specifically does it need #include "usb_names.h" in there? (this throws an error when trying to compile for the ESP32S3)

I just tried putting it at the top of the sketch, and did the required trick to get my computer to forget the previous name, but still can’t get a new name to stick.

Hi there,
I would put it first just after the defines of LIBs, make sure the Lengths are correct for the Text used.
also You may need to Roll back to an Earlier BSP , as it may no longer be appropriate if it’s been depreciated by espressif’s latest “GIFT” to the industries code base compatibility. Version 3.x update.
Also the effects of the WIndows computers registered Device ID needs to be wiped for it to keep the new name is what I’m thinking too.
HTH
GL :slight_smile: PJ

it probably works with the current BSP but the win10 box still needs experimentation. :v:

Ok I’ve tried that. My code essentially looks like this now:

#include <USB.h>
#include <USBMIDI.h>

#define MANUFACTURER_NAME    {'D','K'}
#define MANUFACTURER_NAME_LEN 2
#define PRODUCT_NAME    {'O','P','C',' ','S','e','n','s','o','r'}
#define PRODUCT_NAME_LEN 10

void setup()
{
  (stuff)
}

void loop()
{
  (stuff)
}

And still nothing.

I’m on a Mac, so did the process where I manually delete the device from Audio MIDI Devices (which normally clears the previous/stuck name on a Teensy).

Looks like I’m on version 3.0.2, which I only just installed last week via the getting started guide.

Hmm. Ultimately this is for a DIY/open project, so I’d eventually have instructions for others getting it set up. Ideally this wouldn’t involve installing a BSP, then rolling it back manually after that, as it can easily get quite confusing for non-coders (this is for a MIDI controler after all!).

Hi there,
We feel your pain and concern, but thank Espressif. They change a lot of stuff and old code examples no longer work , you can read more about it
https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html

in a nutshell: breaking changes in the API and build system to help the migration of projects from versions 2.X (based on ESP-IDF 4.4) to version 3.0 (based on ESP-IDF 5.1) of the Arduino ESP32 core.

All the examples on the version 3.0.0 were updated to be compatible to the new API. The old examples from the versions below 3.0.0 will be not compatible with the version 3.0.0 or newer releases.

HTH
GL :slight_smile: PJ
:v:

1 Like

Gotcha.

Yeah that makes sense. You gotta break stuff sometimes otherwise tech debt stacks up too high.

Being brand new to the land of ESP32 (though not microcontrollers in general), is this the kind of thing where it’s not been worked out how to change the name or it’s been made impossible to do so?

I had a search through the github for “_MANUFACTURER” to see if there’s any examples there and all I found was the setups for ESP32 variants.

1 Like

Hi there,
LOL, For sure.
It’s just a little new (s3) there will be more coming out as we get further into the REV 3 ESP-IDF. Now is a good time to Dip one’s toe into the Espressif IDF pool. This latest change I believe was intensional to Limit Arduino’s Hobbie IDE penetration into their devices. They want their IDF to be all that’s usable for ESP devices and variants. Kinda sux for the maker community IMO.
HTH
GL :slight_smile: PJ
:v:

you try to roll BSP back to 2.0.11 ? or 2.0.17 ? I have found those two work the most consistent with other Arduino compatible LIB’s YMMV :+1:

1 Like

That’s super disappointing to read as I only just started experimenting with these boards (after specifically searching for Arduino-compatible boards that had all the features I needed). For all its shortcomings, I do enjoy the Arduino IDE and more importantly, all the available libraries and extensions.

Not messed with this at all. Is it just a matter of selecting an older version in the IDE, then recompiling/uploading the code?

Hi there,
(rollBack)Go to the Boards section in Arduino IDE, put ESP32 in the box at the top, You’ll See Boards for Espressif, use the pull down and Pick an Older one,(you have 3.01 -the latest now installed see compiler output.) Recompile and upload after it installs. I don’t know the answer as to the future or if Arduino will make a new IDE that obfuscates the Alpha change to Libs etc. Hopefully newer Libraries will come out also to support the changes.
HTH
GL :slight_smile: PJ
:v:

look here,


and here;

This one its hard to see bad cut and paste on my end. it grabbed all 3 of my screens, only the left one is relative. :+1:

1 Like

Ok that makes sense and is easy enough. Glad that the IDE has something like that built in and you don’t have to mess around with manually swapping files.

Gave that a spin and rolled back to both 2.0.17 and 2.0.11 and both threw errors when trying to compile:

Compilation error: USBMIDI.h: No such file or directory

Don’t know if it would have a different name/syntax in older versions, but definitely need USB-MIDI working in this sketch/idea so it looks like rolling back may be a non-starter.

Hi there,
Interesting… Can you post the code? I can try.
HTH
GL :slight_smile: PJ
:v:

1 Like

Amazing thanks!

Sketch is a bit big as it does quite a few things, but it should be legible enough (loads of comments everywhere).

It won’t let me attach anything since I’m new to the forum, so uploaded it to wetransfer:

Hi there,
AOk, I was able to download and compile without errors

FQBN: esp32:esp32:XIAO_ESP32S3:USBMode=default
Using board 'XIAO_ESP32S3' from platform in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2
Using core 'esp32' from platform in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2

cmd /c if exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024614-12472-aoilv5.7xohl\\sketch_jul14a\\partitions.csv" COPY /y "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024614-12472-aoilv5.7xohl\\sketch_jul14a\\partitions.csv" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\partitions.csv"
cmd /c if not exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\partitions.csv" if exist "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\XIAO_ESP32S3\\partitions.csv" COPY "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\XIAO_ESP32S3\\partitions.csv" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\partitions.csv"
cmd /c if not exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\partitions.csv" COPY "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\tools\\partitions\\default_8MB.csv" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\partitions.csv"
cmd /c IF EXIST "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024614-12472-aoilv5.7xohl\\sketch_jul14a\\bootloader.bin" ( COPY /y "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024614-12472-aoilv5.7xohl\\sketch_jul14a\\bootloader.bin" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\sketch_jul14a.ino.bootloader.bin" ) ELSE ( IF EXIST "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\XIAO_ESP32S3\\bootloader.bin" ( COPY "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\XIAO_ESP32S3\\bootloader.bin" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\sketch_jul14a.ino.bootloader.bin" ) ELSE ( "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\4.6\\esptool.exe" --chip esp32s3 elf2image --flash_mode dio --flash_freq 80m --flash_size 8MB -o "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\sketch_jul14a.ino.bootloader.bin" "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3\\bin\\bootloader_qio_80m.elf" ) )
esptool.py v4.6
Creating esp32s3 image...
Merged 1 ELF section
Successfully created esp32s3 image.
cmd /c if exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024614-12472-aoilv5.7xohl\\sketch_jul14a\\build_opt.h" COPY /y "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024614-12472-aoilv5.7xohl\\sketch_jul14a\\build_opt.h" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\build_opt.h"
cmd /c if not exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\build_opt.h" type nul > "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\build_opt.h"
cmd /c type nul > "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/file_opts"
Detecting libraries used...
C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp-xs3\2302/bin/xtensa-esp32s3-elf-g++ -c @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/cpp_flags -w -Os -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_XIAO_ESP32S3 -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="XIAO_ESP32S3" -DARDUINO_VARIANT="XIAO_ESP32S3" -DARDUINO_PARTITION_default_8MB -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:XIAO_ESP32S3:UploadSpeed=921600,USBMode=default,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashMode=qio,FlashSize=8M,PartitionScheme=default_8MB,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/defines -IC:\Users\Dude\AppData\Local\Temp\.arduinoIDE-unsaved2024614-12472-aoilv5.7xohl\sketch_jul14a -iprefix C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/include/ @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/includes -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/qio_qspi/include -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32 -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\variants\XIAO_ESP32S3 @C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D/build_opt.h @C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D/file_opts C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D\sketch\sketch_jul14a.ino.cpp -o nul
Alternatives for LSM6DSV16XSensor.h: [STM32duino [email protected]]
ResolveLibrary(LSM6DSV16XSensor.h)
  -> candidates: [STM32duino [email protected]]
C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp-xs3\2302/bin/xtensa-esp32s3-elf-g++ -c @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/cpp_flags -w -Os -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_XIAO_ESP32S3 -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="XIAO_ESP32S3" -DARDUINO_VARIANT="XIAO_ESP32S3" -DARDUINO_PARTITION_default_8MB -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:XIAO_ESP32S3:UploadSpeed=921600,USBMode=default,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashMode=qio,FlashSize=8M,PartitionScheme=default_8MB,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/defines -IC:\Users\Dude\AppData\Local\Temp\.arduinoIDE-unsaved2024614-12472-aoilv5.7xohl\sketch_jul14a -iprefix C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/include/ @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/includes -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/qio_qspi/include -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32 -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\variants\XIAO_ESP32S3 -Id:\Arduino_projects\libraries\STM32duino_LSM6DSV16X\src @C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D/build_opt.h @C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D/file_opts C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D\sketch\sketch_jul14a.ino.cpp -o nul
Alternatives for Wire.h: [[email protected]]
ResolveLibrary(Wire.h)
  -> candidates: [[email protected]]
C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp-xs3\2302/bin/xtensa-esp32s3-elf-g++ -c @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/cpp_flags -w -Os -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_XIAO_ESP32S3 -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="XIAO_ESP32S3" -DARDUINO_VARIANT="XIAO_ESP32S3" -DARDUINO_PARTITION_default_8MB -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:XIAO_ESP32S3:UploadSpeed=921600,USBMode=default,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashMode=qio,FlashSize=8M,PartitionScheme=default_8MB,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/defines -IC:\Users\Dude\AppData\Local\Temp\.arduinoIDE-unsaved2024614-12472-aoilv5.7xohl\sketch_jul14a -iprefix C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/include/ @C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/flags/includes -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-bd2b9390ef\esp32s3/qio_qspi/include -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\cores\esp32 -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\variants\XIAO_ESP32S3 -Id:\Arduino_projects\libraries\STM32duino_LSM6DSV16X\src -IC:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\Wire\src @C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D/build_opt.h @C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D/file_opts C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D\sketch\sketch_jul14a.ino.cpp -o nul
Alternatives for SPI.h: [[email protected]]
ResolveLibrary(SPI.h)
  -> candidates: [[email protected]]
EDIT for brevity........
IC:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024614-12472-aoilv5.7xohl\\sketch_jul14a" -iprefix "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/include/" "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/includes" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/qio_qspi/include" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\cores\\esp32" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\XIAO_ESP32S3" "-Id:\\Arduino_projects\\libraries\\STM32duino_LSM6DSV16X\\src" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\Wire\\src" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\SPI\\src" "-Id:\\Arduino_projects\\libraries\\ResponsiveAnalogRead\\src" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\Preferences\\src" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\USB\\src" "@C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/build_opt.h" "@C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/file_opts" "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\USB\\src\\USBHIDKeyboard.cpp" -o "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\USB\\USBHIDKeyboard.cpp.o"
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-xs3\\2302/bin/xtensa-esp32s3-elf-g++" -MMD -c "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/cpp_flags" -Os -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_XIAO_ESP32S3 -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"XIAO_ESP32S3\"" "-DARDUINO_VARIANT=\"XIAO_ESP32S3\"" -DARDUINO_PARTITION_default_8MB "-DARDUINO_HOST_OS=\"windows\"" "-DARDUINO_FQBN=\"esp32:esp32:XIAO_ESP32S3:UploadSpeed=921600,USBMode=default,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,CPUFreq=240,FlashMode=qio,FlashSize=8M,PartitionScheme=default_8MB,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/defines" "-IC:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024614-12472-aoilv5.7xohl\\sketch_jul14a" -iprefix "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/include/" "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/includes" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/qio_qspi/include" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\cores\\esp32" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\variants\\XIAO_ESP32S3" "-Id:\\Arduino_projects\\libraries\\STM32duino_LSM6DSV16X\\src" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\Wire\\src" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\SPI\\src" "-Id:\\Arduino_projects\\libraries\\ResponsiveAnalogRead\\src" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\Preferences\\src" "-IC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\USB\\src" "@C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/build_opt.h" "@C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/file_opts" "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\libraries\\USB\\src\\USBHIDVendor.cpp" -o "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\USB\\USBHIDVendor.cpp.o"
Compiling core...
cmd /c echo -DARDUINO_CORE_BUILD > "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/file_opts"
Using precompiled core: C:\Users\Dude\AppData\Local\Temp\arduino\cores\53e03db0979d53f16fb2a6e466477a00\core.a
cmd /c type nul > "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/file_opts"
Linking everything together...
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-xs3\\2302/bin/xtensa-esp32s3-elf-g++" "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/ld_flags" "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/ld_scripts" "-Wl,--Map=C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.map" "-LC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/lib" "-LC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/ld" "-LC:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/qio_qspi" -Wl,--wrap=esp_panic_handler -Wl,--start-group "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\sketch\\sketch_jul14a.ino.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\STM32duino_LSM6DSV16X\\LSM6DSV16XSensor.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\STM32duino_LSM6DSV16X\\lsm6dsv16x_reg.c.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\Wire\\Wire.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\ResponsiveAnalogRead\\ResponsiveAnalogRead.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\Preferences\\Preferences.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\USB\\USBHID.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\USB\\USBHIDConsumerControl.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\USB\\USBHIDGamepad.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\USB\\USBHIDKeyboard.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\USB\\USBHIDMouse.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\USB\\USBHIDSystemControl.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\USB\\USBHIDVendor.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\USB\\USBMIDI.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\USB\\USBVendor.cpp.o" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\cores\\53e03db0979d53f16fb2a6e466477a00\\core.a" "@C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3/flags/ld_libs" -Wl,--end-group -Wl,-EL -o "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.elf"
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\4.6/esptool.exe" --chip esp32s3 elf2image --flash_mode dio --flash_freq 80m --flash_size 8MB --elf-sha256-offset 0xb0 -o "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.bin" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.elf"
esptool.py v4.6
Creating esp32s3 image...
Merged 2 ELF sections
Successfully created esp32s3 image.
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\tools\\gen_esp32part.exe" -q "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/partitions.csv" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.partitions.bin"
cmd /c if exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\Insights" "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2\\tools\\gen_insights_package.exe" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D" sketch_jul14a.ino "C:\\Users\\Dude\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2024614-12472-aoilv5.7xohl\\sketch_jul14a"
cmd /c if exist "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\libraries\\ESP_SR" if exist "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3\\esp_sr\\srmodels.bin" COPY /y "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.1-bd2b9390ef\\esp32s3\\esp_sr\\srmodels.bin" "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D\\srmodels.bin"
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\4.6/esptool.exe" --chip esp32s3 merge_bin -o "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.merged.bin" --fill-flash-size 8MB --flash_mode keep --flash_freq keep --flash_size keep 0x0 "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.bootloader.bin" 0x8000 "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.partitions.bin" 0xe000 "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.2/tools/partitions/boot_app0.bin" 0x10000 "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.bin"
esptool.py v4.6
Wrote 0x800000 bytes to file C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.merged.bin, ready to flash to offset 0x0

Using library STM32duino LSM6DSV16X at version 2.0.2 in folder: D:\Arduino_projects\libraries\STM32duino_LSM6DSV16X 
Using library Wire at version 2.0.0 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\Wire 
Using library SPI at version 2.0.0 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\SPI 
Using library ResponsiveAnalogRead at version 1.2.1 in folder: D:\Arduino_projects\libraries\ResponsiveAnalogRead 
Using library Preferences at version 2.0.0 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\Preferences 
Using library USB at version 2.0.0 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2\libraries\USB 
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-xs3\\2302/bin/xtensa-esp32s3-elf-size" -A "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.elf"
Sketch uses 373717 bytes (11%) of program storage space. Maximum is 3342336 bytes.
Global variables use 31600 bytes (9%) of dynamic memory, leaving 296080 bytes for local variables. Maximum is 327680 bytes.
C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.6/esptool.exe" --chip esp32s3 --port "COM23" --baud 921600  --before default_reset --after hard_reset write_flash  -z --flash_mode keep --flash_freq keep --flash_size keep 0x0 "C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.bootloader.bin" 0x8000 "C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.partitions.bin" 0xe000 "C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.2/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\Dude\AppData\Local\Temp\arduino\sketches\B207B5917A1BEA1E0CDF2723ACF0D39D/sketch_jul14a.ino.bin" 
esptool.py v4.6
Serial port COM23
Connecting...
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 84:fc:e6:6a:d0:f0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00003fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x0006bfff...
Compressed 14880 bytes to 10570...
Writing at 0x00000000... (100 %)
Wrote 14880 bytes (10570 compressed) at 0x00000000 in 0.2 seconds (effective 495.6 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.0 seconds (effective 572.4 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 795.6 kbit/s)...
Hash of data verified.
Compressed 374080 bytes to 215242...
Writing at 0x00010000... (7 %)
Writing at 0x0001bd89... (14 %)
Writing at 0x00028363... (21 %)
Writing at 0x0002da53... (28 %)
Writing at 0x00033587... (35 %)
Writing at 0x00038d8d... (42 %)
Writing at 0x0003e9b1... (50 %)
Writing at 0x0004434c... (57 %)
Writing at 0x00049810... (64 %)
Writing at 0x0004ee0f... (71 %)
Writing at 0x0005421c... (78 %)
Writing at 0x0005a689... (85 %)
Writing at 0x00064ae0... (92 %)
Writing at 0x0006a611... (100 %)
Wrote 374080 bytes (215242 compressed) at 0x00010000 in 2.9 seconds (effective 1021.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

I got this serial output after unplugging and reconnecting It did switch com ports as I would expect.

No calibration found. Loading default values.
Deafult values: -0.5000 0.5000 -0.5000 0.5000 -0.5000 0.5000 30000.0000 250000.0000
No calibration found. Loading default values.
Deafult values: -0.5000 0.5000 -0.5000 0.5000 -0.5000 0.5000 30000.0000 250000.0000

It Flashes the User LED after reset.
shows up as TinyUSB MIDI in device manager. and under Software devices its two midi 0 and midi 1
D3 touch triggers some output, This is for a MIDI cybal?

HTH
GL :-)PJ
:v:

1 Like

Interesting. Ok, I’ll give this a go again today. Maybe I did something wrong.

Now that’s surprising as that’s different from what it shows up on Mac (just shows up as “XIAO_ESP32S3”, which is not as elegant a name, lol).

I think I may have had it commented out near the top in the .ino I sent you, but did you manage to get the #define MANUFACTURER_NAME thing to do anything?

Kind of. I do a lot of (low latency) machine learning stuff for drums and have designed some custom sensor stuff for the drums themselves. Trying to do something similar for an acoustic cymbal too. Since a cymbal physically moves a lot while being played (unlike a drum), it seemed interesting to try to capture some of that movement as controller data.

I still can’t attach pics to show the testing setup, but on the underside of the cymbal, near where it is mounted, I have a contact microphone and a 6DOF IMU mounted.

This is my initial proof-of-concept for the IMU stuff. In reality it would be more interesting mapping but just to show how fast/sensitive the IMU is in this context.

Every time the cymbal is hit it triggers a burst of noise, and the movement of the cymbal controls a filter and a phasor on the noise.

Less relevant to the ESP32 code, but this is a proof-of-concept test of the audio from the contact microphone. So I’m comparing a real/good microphone picking up the acoustic sound of the cymbal vs the contact microphone in a less-than-ideal position on the cymbal (typically a really bad idea). Then doing some impulse response microphone correction to “compensate” for the difference between the two. Then finally doing some classification to determine (just from the audio analysis) whether the cymbal is being struck on the body, or the bell area:

altoids cans… I havnt had those in years…

1 Like

Hehe. They are quite useful for small electronic projects as they are shielded and you can fit 1/4" jacks in them.

Hi there,
WOW, pretty cool Idea, i like the "choke " sound, muting it with one hand while after a small “wack” I used to play with some guys in a garage band, “the Drunkkin Uncles " :grin: My buddies mom used to say we sounded like some “moaning Chinese”… We almost changed the name…LOL, Those were some fun days. I still have my Tascam porta-Studio and reel to reel 10” unit. 4-Track , overdubs etc. all tape way before digital to disk. GREAT project you got there.

I’ll look at the ino, closer today.
HTH
GL :slight_smile: PJ
:v:

I sorta played the rhythm guitar, not what they would say :smiley:… Moe on Lead and Vocals , Jed on Drums (he was way good)his brother rick on BASS or Drum machine. Tim on keyboard & vocals… plus many subs for different jam sessions.
here is a song we did , “try to coOperate” about Tim’s girlfriend, aka wendy the Biatch LOL
no matter how hard he tried SHE wasn’t a happy girl.,

https://vimeo.com/984333476?share=copy

1 Like

Thanks :slight_smile:

I’ve been wanting to do something like this for years, but could never get the sound to be remotely usable from a contact mic and that kind of placement. So was a breakthrough getting that usable, then expanding from there.

It’s been fun working this kind of stuff out. For context, I do make music on the odder-side of things:

I get an “unauthorized” error message as I guess the vid is private?

Very much appreciated, as I’m definitely in over my head when it comes to the low-level machinations of embedded stuff.