ESP32 USB HID/MIDI library (not the BLE one)
The ESP32 doesn't have USB. You can't do USB communication. All it has is (like the UNO) a USB to UART interface chip. Unlike the UNO this is not programmable (more like a cheap Chinese knock-off UNO clone in that respect).
You would need to couple it with a microcontroller that has USB and program hat to be your USB interface and communicate with it over some other communication medium, such as UART or I2C.