We were using Python Sonic Pi, but there is a significant lag when asking Sonic Pi to play a chord, for example. We are connecting that with a home-made dance pad … so that lag is not cool. Any suggestions?
Code: play(Fs5) - which we just followed the sample from Python Sonic Pi install page python-sonic · PyPI
Hi @goodwintercrop - welcome!
To start with, it might be helpful to see some code (the smallest amount you could write that demonstrates the problem). This could give us some clues about the approach you might have taken, so that we can think about the right kind of advice to give
Having said that, if this is using MIDI/OSC, it could be an issue of needing to use something like
with_real_time to remove Sonic Pi’s built-in scheduling delay when running the code.
I just put the code into the original message. We will follow your advice and see whehter Python Sonic Pi has the support. Thanks so much for the quick response!
Given that it’s just a simple
play command and nothing else, it’s likely that the use/with real time commands will not be as helpful, (unless there’s more to what you’re doing than I understand here) as they are most often designed to remove the scheduling delay when also using Sonic Pi to send or receive MIDI or OSC commands to/from external devices, with the
osc commands. (Which you aren’t).
There may be more to this than I understand at the moment though. I’m sure someone else may comment too in case they have more helpful advice