My thoughts on Slackware, life and everything

Tag: coding

Sonic Pi 4.1.0 packaged for Slackware – and for live coding musicians

Sam Aaron worked long and hard towards a new major release of his Sonic Pi software, and kept us informed about his coding journey on Twitter. Eventually a 4.0.0 version saw the light of day, 17 months after the  final 3.x  version (3.3.1) came out. Sam writes really informative release notes, I encourage you to check them out on his release page. Lots of enhancements and fixes to be enjoyed.

You don’t know what I am talking about?

You’ve probably missed my last year’s blog post then.
Sam Aaron is a musician and a programmer, holding a PhD in Computer Science. He develops a really cool program called Sonic Pi, meant to educate people in making music and learning how to code at the same time.
Sonic Pi uses the engine of Supercollider, which is another live coding platform. But Sonic Pi makes the art of live coding – performing on stage or just having a blast creating music on your computer – very low-threshold. Out of the box, when you start the program, its GUI will show complete and working coding examples, a tutorial, and an intuitive interface to start producing music straight away:

I have created packages for sonic-pi 4.1.0, the latest release, and I guess I am the first to create 32bit packages for a Linux platform, since I had to teach the “vcpkg” program that 32bit Linux is actually a thing. You could have guessed it… vcpkg is a cross-platform library manager created by Microsoft (!!!) which Sonic Pi uses to compile the libraries it needs.
I’ll see if I can create a patch for 32bit Linux support and send it to them.

Anyway, a month ago Sam Aaron gave a lecture at Lambda Days 2022 in Poland, about Sonic Pi, and here is a link to a recording of that lecture. You’ll learn more by watching that video, than by reading my blog posts about it.

The new packages (for Slackware 15.0 and -current) can be downloaded from all the usual places, for instance my slackware.com primary site, or the fast NL, UK or US mirrors.

I hope you are going to give Sonic Pi a try and that I’ll hear from you in the comments section below if you came up with a cool piece of audio.

And because Sonic Pi is contained in my Slackware Live DAW edition, I have also generated a new ISO for the Digital Audio Workstation. Get the “slackware64-live-daw-current.iso” ISO file, and copy it to a Ventoy USB stick or use the “iso2usb.sh” script to create a persistent USB stick.
This live environment should allow you to run Sonic Pi out of the box even if you have no idea how to configure the JACK audio server.

Have fun! Eric

Sonic-Pi: live-coding music software now on Slackware

Here is a new program for inclusion into my DAW package collection. It is Sonic-Pi, a ‘code-based music creation and performance tool’ as its web site states. My DAW collection already features Supercollider, which at its core is a powerful audio synthesis engine, but it also features a graphical user interface which you can use for live-coding music. Sonic-Pi has similar capabilities but it is more intuitively accessible (compare it to vi and notepad for instance).
Therefore Sonic-Pi would be better suited for introducing people to the concept of creating music through writing code, and letting that music evolve during a live performance by updating on-the-fly the code which represents the audio synthesis.

Sam Aaron is the creator of Sonic-Pi and uses it as a musical instrument in its own right with his band. He did a TEDx talk about programming as performance a couple of years ago:

He explains how Sonic-Pi was conceived as an educational tool. By making a free and open-source program like Sonic-Pi available to schools (and it runs on the Raspberry Pi – now you know where the program got its name from), you will gently introduce young kids to the art of computer programming while at the same time infusing them with a love for music – because they will be able to create the music they like in no time.

Sonic-Pi uses the synthesis engine of Supercollider, which means that that has to be installed as well. Both Sonic-Pi and Supercollider use JACK to route the audio and let it come out of your speakers.
The graphical user interface allows easy access to a large collection of example code snippets, sound samples and synthesizer definitions, so you will be listening to music in a few seconds after starting the program – after which you can begin modifying that code and hear live what your programming does to the generated music. The GUI also contains a nice visualization of the music you are generating.

The software is usually distributed as an ‘appimage’ which simply bundles everything you need into an archive. This is not really Slackware-like, so I wrote a SlackBuild script which brings some order into the directory structure, removing a lot of redundant megabytes and creating a proper package with a nice menu item.

The liveslak scripts have been updated as well so that the next Slackware DAW Live will include Sonic-Pi.
If you use slackpkg you can download an updated template here: http://www.slackware.com/~alien/tools/templates/daw.template and use “slackpkg install-template daw” to have easy access to the full list of packages.

Get Sonic-Pi from https://slackware.nl/people/alien/slackbuilds/sonic-pi/ or https://slackware.uk/people/alien/slackbuilds/sonic-pi/ . Mind the dependencies!

Have fun! Eric

© 2024 Alien Pastures

Theme by Anders NorenUp ↑