Sonic Pi 4: Optimal Performance For Livecoding

Hello----it’s likely that what I’m about to ask has been covered, probably several times over, so I won’t be upset if someone gently directs me to a Sticky Note or series of them or whatever.

I’m interested in doing Livecoding with Sonic Pi.
I have a Pi 4 with stock-standard Raspbian on it.
Is there any advice out there on how to optimize this machine for best performance for a decent length Livecoding session—in terms of avoiding lag, optimal sound quality, maybe some kind of accompanying visual software thing (as long as it’s not pushing the resources too hard)…anything in terms of settings or a good OS to consider that may be best to run Sonic Pi—clocking, over locking, etc? Any hardware—hats, maybe some kind of added-in support to boost resources, or am I maybe barking up the wrong tree wanting to do this on a system with limited resources?

Any advice and/or direction would be greatly appreciated, thank you :slight_smile:

One thing to try in terms of settings is to use the optional Preempt-RT real-time kernel instead of the default one, even just with Raspbian. The effect of this will be to lower the thread latency way down. For the sound driver I always run JACK with real-time priority, sample rate should be 48kHz or at least 44.1 kHz, and you may need to experiment how low you can set the buffer size and periods.

Use a good-quality power supply and make sure cooling is adequate (it shouldn’t go much above 80°C )