As far as I know, only an Arduino Leonardo could run this code, because it is, at this date, the only board that can run the Adafruit Motor Shield library AND Teensy's USB MIDI library.
Stack your Adafruit Motor Shield V2 on your Arduino.
In Arduino IDE Tools menu, under Board, choose "TeeOnArdu Leo"
In Arduino IDE Tools File, choose upload
Push reset button on the board
Wait until it says "Done uploading."
Open a music software that can send midi controller, and send controller 60 and 61 to TeeOnArdu MIDI board (in the video I use a QuNeo, with Max/MSP, the pads are sending controller 61, 64-0, controller 61, 64-127, controller 60, 64-0, controller 60, 64-127, it is actually optimised for MIDI dials, not so much for pads)