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.