Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Sonic Pi – Code based live music creation tool (github.com/sonic-pi-net)
266 points by huseyinkeles on Aug 23, 2021 | hide | past | favorite | 41 comments


Sonic Pi is very accessible and a great front end for SuperCollider and livecoding music in general.

Some others worth trying depending on your personal choice and bias for a particular PL:

Euterpea - Haskell library for music creation [0].

Extempore - Scheme-based livecoding environment with a low-level language too - xtlang [1].

Grace (Common Music) - Scheme-based livecoding with crossplatform IDE [2].

Sporth (used by AudioKit) - Forth-based, low-level livecoding of music.

I think Grace is probably the most self-contained. The single executable for Linux, Mac, and Windows comes with samples and a choice of a scheme-based language, or a more simplified, more Algol-like one called SAL.

I like extempore because of its CAAS (compiler as a service) model, scheme language, and the ability to create from the note up, or to create sounds from scratch (sine waves and such).

I splurged for the Haskell School of Music book based on the Euterpea library that was originally written by Paul Hudak, but finished by one of his students, Donya Quick. This is how I originally learned Haskell, and it was a lot of fun and educational to boot.

  [0]  https://www.euterpea.com/

  [1]  https://extemporelang.github.io/

  [2]  http://commonmusic.sourceforge.net/

  [3]  https://pbat.ch/proj/sporth.html


I appreciate the shoutout to Sporth! Admittedly, I haven't used it for quite a few years. But it still works just fine.

In addition to being a part of AudioKit, it also has it's own repository as a self-contained command line program:

https://github.com/PaulBatchelor/Sporth/

I used to use a live-coding setup with Sporth centered around Vim, though it has never been added to the codebase. If anyone is interested in this, please feel free to email me at thisispaulbatchelor at gmail dot com.


When I was pursuing Forth, and about to give up on doing anything beyond a file munger I wrote, I discovered Sporth, and had a blast for at least two or three weeks and kept Forth on my radar! A lot of complexity from a few lines of Sporth! What are you up to nowadays?



I think I shared this last time Sonic Pi got posted here, but Sonic Pi is also extremely flexible when you bus the MIDI output to other tools - Ableton, external synthesizers, etc. I posted a clip on IG a while back -

https://www.instagram.com/p/CKKvWP6h3xQ/

And I've also seen it play well with ORCA and other livecoding tools:

https://github.com/hundredrabbits/Orca


Check out the Awesome Livecoding list for similar things: https://github.com/toplap/awesome-livecoding/blob/master/REA...

Also, Algorave for live performances: https://algorave.com/



Played with with it when i got my first Raspberry, it was fun. There is a Vim plugin with which you get a kind of sonic-pi REPL [0], there is a newer one for Neovim too [1].

[0] https://github.com/dermusikman/sonicpi.vim

[1] https://github.com/lilyinstarlight/vim-sonic-pi


It's worth checking out the live sessions by Sam Aaron - plenty of videos on his YouTube channel. He gives an introductory talk about it here: https://youtu.be/TK1mBqKvIyU


Another excellent Haskell based live-coding tool: https://tidalcycles.org/

Even if you don't know Haskell, it is a delight to improvise electronic music with this library. It comes with its own mini-language for dealing with musical patterns and can synchronize with any instrument. Very extensible, the backend uses https://github.com/musikinformatik/SuperDirt, a SuperCollider extension for dealing with synths / samples / effects.


I'm taking the recent 8-week course now. Highly recommended. https://club.tidalcycles.org/t/weeks-1-4-index/395


For Clojure lovers there's Overtone (https://github.com/overtone/overtone), also created by Sam Aaron. Not sure if it's still maintained, however.


A project in a similar domain: https://supercollider.github.io/



there is a lot more friction in understanding sclang, but the server here is the same (scsynth/supernova), and to me, Sclang is really one of the most beautiful things to work with. Wish I could get paid to work with it


Some past related threads:

Sonic Pi 3.3.0 (Beam) - https://news.ycombinator.com/item?id=25971096 - Jan 2021 (1 comment)

Sonic Pi is a code-based music creation and performance tool - https://news.ycombinator.com/item?id=23066922 - May 2020 (66 comments)

Sonic Pi: Compose electronic music with code - https://news.ycombinator.com/item?id=17632999 - July 2018 (61 comments)

Sonic Pi: Compose electronic music with code - https://news.ycombinator.com/item?id=17483234 - July 2018 (3 comments)

Sonic Pi – The Live Coding Music Synth for Everyone - https://news.ycombinator.com/item?id=16888550 - April 2018 (1 comment)

Sam Aaron, Joe Armstrong – Keynote: Distributed Jamming with Sonic Pi and Erlang - https://news.ycombinator.com/item?id=13036095 - Nov 2016 (4 comments)

Aerodynamic by Daft-Punk in 100 lines of code with Sonic Pi - https://news.ycombinator.com/item?id=11033953 - Feb 2016 (69 comments)

Sonic Pi: Make Music Using Ruby - https://news.ycombinator.com/item?id=8825017 - Jan 2015 (10 comments)

Sonic Pi – A Music Live Coding Environment for Schools - https://news.ycombinator.com/item?id=8344827 - Sept 2014 (28 comments)


I like the idea of sonic-pi and think its very well designed.

What I would like to see is a "multi-player" mode, where I can collaboratively code on the same session.

Is there anything that would enable this with sonic-pi?


Version 4, currently in beta, will allow sharing the beat within a local network, facilitating classroom jam sessions.


Not specifically for Sonic-Pi, but Troop lets you do it for FoxDot and some others.

https://github.com/qirky/Troop


Also, check out https://github.com/Qirky/FoxDot It is more userfriendly layer above SuperCollider, coding is in python.


Sonic Pi is awesome. I can highly recommend Mercury as well for live coding music: https://github.com/tmhglnd/mercury


Sonic Pi is great but I think some more accessible resources for SuperCollider get passed over. See https://github.com/brunoruviaro/A_Gentle_Introduction_To_Sup...


This looks rather interesting.

Haven’t checked it out yet but the README alone is well written and quite compelling. (Maybe I’m just a sucker for ASCII art…)


I went looking for some music samples done with Sonic PI but couldn't find any. Does anyone know of some?


Does anyone know of a way to achieve a livecoding music workflow with VCV rack?


There probably is a VCV midi module you can interface with livecoding tools that send midi.


Covered multiple times over the last 5? years : https://hn.algolia.com/?q=sonic+pi with decent comment threads.


Kinda shows the interest in this subject is not ramping down.


Imagine having a huge, open-source library of instruments and clips for Sonic Pi. Like scipy but for music.

I've never understood how DAW makers have made so much money off of the FFT plus a MIDI envelope.


There is a bit more to DAW than just that. You need a highly stable and performant piece of software that accomodates all kind of plugins and hardware. Look at the Ardour source code. They have done an incredible job with it.


Good UI and workflow are the main selling points for DAWs since at the end of the day they'll all be using the same VSTs.


Anybody knows any resource to learn music theory using tools like this?


Youre better off drawing a piano keyboard or playing with one to learn music theory IMO.


I've used SonicPi on my old laptop for quite a while. It is quite enjoyable to just sit down and jam with it.


I just finished my first sonic piece after watching a ton of tutorials and seeing examples last week. https://gist.github.com/pgagnidze/fd01ddb9332c336d7e853f1215...

I had sonic-pi bookmarked/planned for more than 5 years. It is sad how most bookmarked items never get viewed or they are postponed to eternity.


I also have a bunch of 'things' that have been bookmarked for years: mostly movies and articles, some projects. This stockpiling has become tsundoku for more than books [1].

On one hand, divorcing myself from the initial impulse to consume or create something helps filter down to what I am and will be truly interested in. On the obvious other hand, the backlog grows to the point where I get paralyzed by so many options and the perfect ideas in my head that I end up not doing anything.

[1] https://en.wikipedia.org/wiki/Tsundoku


I struggle with the same, and I have exactly the same thought process.

Occasionally, I have a filtering session when I am going through everything and narrowing them down, however extra items are appearing until the next filtering session and the same goes again. It is a vicious cycle.


Did you save off your links for the tutorials you watched etc? I've messed with SP in the past but never got comfortable with it so additional tutorials would be rad.


I watched a few talks from Sam Aaron, you can find a ton of them.

I would recommend this playlist to get started: https://www.youtube.com/watch?v=4BPKaHV7Q5U&list=PLaitaNxyd8...

and the help > tutorial section of sonic itself.

Those two are just amazing: https://youtu.be/a1RxpJkvqpY, https://youtu.be/GPan4gRSwZs


Sounds great! I just started working through their tutorial this weekend too and hope to be able to make something like this soon.


Bookmarks are a form of technical debt!!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: