- add these lines
    "USB_KEYBOARD_MIDI",
    "USB_KEYBOARD_MIDI_SERIAL",to the BUILTIN_USB_FLAGS list in /home/$USER/.platformio/platforms/teensy/builder/frameworks/arduino.py
- and add the following two elifs to/home/$USER/.platformio/packages/framework-arduinoteensy/cores/teensy3/usb_desc.h
#elif defined(USB_KEYBOARD_MIDI)