Robin Newman has recently been experimenting with Python OSC which, among other things, can be used to tie Python and Sonic Pi’s Ruby implementation together. This way, you can control a device driven by Python from inside Sonic Pi. Once such device is the pi-topPULSE HAT which features an audio amplifier, a speaker, a 7×7 LED matrix and a microphone. Robin has written up how to control the LED matrix from Sonic Pi over on his blog, so head over there to read more. You can see the programs and the PULSE in action below.
You can buy the pi-topPULSE directly from pi-top here or from The Pi Hut here. Note: You do not need a pi-top to use the PULSE HAT, it can be plugged directly onto the Raspberry Pi’s GPIO pins.