I have just completed a project to produce a Sonic Pi 3 controlled Glockenspiel. The Glockenspiel is controlled by means of some Lego hammers which are activatged by 5v solenoids. These are connected to the GPIO pins on a Raspberry Pi 3 via circuitry on a RasPiO ProHAT. A python script drives the solenoids and gets its input from OSC messages sent to it from Sonic Pi 3 running on the Raspberry Pi.
Full constructional details, wtih a video and sample sound file are on my blog at https://rbnrpi.wordpress.com/project-li ... ckenspiel/
video (of the first prototype, which was subsequently mdified slightly) https://youtu.be/7gCdSeEfEE4
sample sound output produced by Sonic Pi and the glockenspiel playing together. https://soundcloud.com/user-195236670/s ... ockenspiel