I’m working on a project where it would be useful to control Sonic Pi from the command line on a headless Raspberry Pi. I found sonic-pi-tool (rust), which did what I need, but is written in Rust, which I am not very familiar with, and I don’t really want to have to install on my Raspberry Pi.
So, I decided to port it to Python. I haven’t tested it very thoroughly yet, but the basics seem to work. If anyone else would like to give it a try, you can find it here: sonic-pi-tool (python).
I hope someone finds it useful.
Hi there! I’m the author of sonic-pi-tool.
Really cool to see this Python port! Nice work.
Just to clarify sonic-pi-tool does not require Rust to be installed on the Pi as it compiles to a binary. If desired one could compile it on one machine and then copy it to another, providing they are both running the same OS.
If there is demand I could pre-compile sonic-pi-tool and make it availible to download from GitHub. Please let me know if this would be useful and I’ll pop it on my TODO list
Thanks, I didn’t think of that. Is the binary portable (e.g. could I build it on a Mac and copy it to a Pi)? I think it would be useful to have a downloadable binary, especially for Raspberry Pi, although porting it was an interesting learning experience
I do not believe it’s possible to build it on OSX and run on Linux, though perhaps there’s some Rust compiler magic I’m not aware of. If I were on OSX I would probably compile the image inside a virtual machine or inside docker for use on the Raspberry Pi