This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Setup Pi Zero 2 as a MIDI 2.0 gadget and play random MIDI files from /root/midi | |
# Mostly copied from https://docs.kernel.org/sound/designs/midi-2.0.html#midi2-usb-gadget-function-driver | |
# Please read that section carefully for any setup hints! | |
# Needs Linux kernel > 6.6 | |
# Enable libcomposite kernel module: | |
# echo libcomposite > /etc/modules-load.d/libcomposite.conf | |
# /root/midi2-gadget.sh | |
cd /sys/kernel/config |