Why do you modify your code as it plays? Could you simplify and abstract your expressions to call them along a predictable flow pattern? This reminds me of Knuth's beautiful representation of recurrence relations: https://en.wikipedia.org/wiki/The_Complexity_of_Songs
(Aside: His later work on Constraint Based Music Composition https://news.ycombinator.com/item?id=9512962 also offers some interesting insight as to what could come from algorithmic musical composition.)
You don't need to modify your code as it plays. However, if you do you turn what's a more traditional composition style workflow into a much more exciting, expressive performance workflow.
When I gig with Sonic Pi all I do is modify the code on-the-fly. It allows me to react to the crowd, the environment and my feelings :-)
As well as including an aspect of live performance this is the most natural way to experiment and try ideas in music. Changes are best heard in immediate context.
It's a case where the Edit, Compile, Run Cycle doesn't fit the medium well :)
The answer's cultural: it's part of music live-coding. You work with some pre-prepared bits and construct them on the fly. A bit like... how Daft Punk performed live. (Although they used Ableton Live, I believe.)
FYI there's a regular feature on Sonic Pi (by the creator) in the official magazine. It's usually the only article in Ruby as the rest are normally in Python.
Agreed, for a short presentation that was one of the best speakers I've seen, he mentions he works at a university in front of students so perhaps he is comfortable in front of crowds and that combined with his obvious passion for the subject shines through.
Wish I spoke that well, I'm not bad anymore but I'm also not that fluid.
I am a SuperCollider fan, too. For me it's the sweet spot between a modern programming language and a deep and performant synthesis/sequencing platform. SonicPi is perfect if you wan to start making music immediately, but consider that underneath is just another language interface for the supercollider synth server, so at some point you will want to go full SC, that is dialect of Smalltalk with some functional ideas. CSound is the oldest/most powerful/most frustating of the bunch, but at the core is composed of two parts: a description of the sound generators/effects graph and a list of notes/events. If you enjoy coding in assembly, CSound will be fun. Chuck has a very nice sync model (SonicPi is similar), but the language is very imperative, not my favourite.
I'm a SuperCollider fanboy. It can be very expressive and terse, as sc140 tweets show. You can use it for livecoding. It also now has a pretty good IDE written in Qt, and you can make your own GUIs in Qt with it too.
I will admit that I haven't tried Sonic Pi yet though.
It very much depends what your end goal is. Are you just looking to experiment and make some sounds? Would you like to embed one of these as a sound engine in another application that you are developing? Certain devices you are targeting?
I've been listening to a lot of Daft Punk lately and have been building some toy synths lately with the Web Audio API in JavaScript. I think I'll take the weekend to mess around with Sonic Pi.
Awesome articles, thanks for writing them. I used to fool around with FL and Reason about 10 years ago but wasn't very good at all. I think I could have a lot of fun with this.
I especially liked how the author visualized sounds to be able to replicate them. I always assumed you just had to have a good ear.
I'll agree. The visualization helped me quite a bit. Never heard of Sonic Pi before this. It seems really cool.
I also love that they have a dedicated "how to contribute" page with examples for non-technical stuff as well:
https://github.com/samaaron/sonic-pi/blob/master/HOW-TO-CONT...
Prewrite some code, play around with it live...love it. Is there a curated list of people using this for live performances? I'd love to attend one of those.
Does anyone know of similar programs where the output is MIDI notes that you can save to files or use directly in more traditional audio software like Ableton Live?
If you want to live-code directly in a DAW from a plugin, there is Lua Protoplug. It's completely centered on being a plugin, so your script processes blocks of sound/MIDI as requested by the host (here's a MIDI in/out example [1]). And yes, I know, I haven't pushed a commit in a few months. I still have many ideas and improvements for when I get back to it though!
Unfortunately no, I did this code while trying to reproduce the bell sound, I thought it'd be easier to reproduce it by extracting the active frequencies of the original sample, but I could merely obtain the timbre of the instrument. I guess it needs more work (it doesn't take into account the envelope of the bell) and more tweaks.
The only thing that bothers me is that the bass track is off by a note. There's a phrase in there that is supposed to go down the scale, but instead it plays the same note three times. Otherwise, this is truly an amazing recreation of the song.
You should tweet this to Daft Punk and see what they think!
Knowing nothing about this space, is there already a program that uses (wave based) sound simulation to allow music programming in an arbitrary 3d environment? This could go beyond mono and stereo :)
I once worked with a brilliant audio developer/wizard who used Ambisonics (among other things).
Watching him position his desk when we switched to a new (large and open) office space is something I'll never forget. He walked around in the middle-ish of the room, snapping his fingers and listening. Suddenly he said "This is it, I'll sit here", and so he did. :)
I'm not sure I get what you mean by arbitrary 3d environment, but I know BT's album "This Binary Universe" is composed for 5.1, and the first track "All That Makes Us Human Continues" is written entirely in CSound.
[+] [-] datajeroen|10 years ago|reply
Some examples: https://t.co/51cezrD9aZ https://t.co/bUfCcAnSqX https://t.co/FyBHSbeAaT https://t.co/3r9FkxlguM
[+] [-] runeb|10 years ago|reply
[+] [-] yaxu|10 years ago|reply
[+] [-] justinclift|10 years ago|reply
[+] [-] mitchtbaum|10 years ago|reply
Why do you modify your code as it plays? Could you simplify and abstract your expressions to call them along a predictable flow pattern? This reminds me of Knuth's beautiful representation of recurrence relations: https://en.wikipedia.org/wiki/The_Complexity_of_Songs
(Aside: His later work on Constraint Based Music Composition https://news.ycombinator.com/item?id=9512962 also offers some interesting insight as to what could come from algorithmic musical composition.)
[+] [-] samaaron|10 years ago|reply
When I gig with Sonic Pi all I do is modify the code on-the-fly. It allows me to react to the crowd, the environment and my feelings :-)
[+] [-] nibnib|10 years ago|reply
It's a case where the Edit, Compile, Run Cycle doesn't fit the medium well :)
[+] [-] moomin|10 years ago|reply
[+] [-] samaaron|10 years ago|reply
[+] [-] aimxhaisse|10 years ago|reply
[+] [-] jsingleton|10 years ago|reply
It's a free PDF download but you can buy it to support them: https://www.raspberrypi.org/magpi
See page 48 (page 50 of the PDF): https://www.raspberrypi.org/magpi-issues/MagPi42.pdf
[+] [-] justinclift|10 years ago|reply
[+] [-] baldfat|10 years ago|reply
He is a very good speaker and got me excited to try to do some of this with my 9 year old daughter.
[+] [-] noir_lord|10 years ago|reply
Wish I spoke that well, I'm not bad anymore but I'm also not that fluid.
[+] [-] duncanawoods|10 years ago|reply
Can anyone suggest how to choose which one to invest some time in?
[+] [-] gosub|10 years ago|reply
[+] [-] widdershins|10 years ago|reply
I will admit that I haven't tried Sonic Pi yet though.
[+] [-] jm547ster|10 years ago|reply
[+] [-] bwanab|10 years ago|reply
[+] [-] dmoo|10 years ago|reply
https://www.youtube.com/embed/bgPpyfRk3rw
[+] [-] harisamin|10 years ago|reply
[+] [-] canyonero|10 years ago|reply
Great work, this is super cool!
[+] [-] jsmeaton|10 years ago|reply
I especially liked how the author visualized sounds to be able to replicate them. I always assumed you just had to have a good ear.
Really impressive stuff, thanks.
[+] [-] kriro|10 years ago|reply
Prewrite some code, play around with it live...love it. Is there a curated list of people using this for live performances? I'd love to attend one of those.
[+] [-] agounaris|10 years ago|reply
[+] [-] runeb|10 years ago|reply
[+] [-] pierrec|10 years ago|reply
[1]: http://www.osar.fr/protoplug/api/examples/midi-chordify.lua....
[+] [-] baldfat|10 years ago|reply
Just looked at the cheat sheet. I would image all of these programs would be playing out MIDI.
http://www.cl.cam.ac.uk/projects/raspberrypi/sonicpi/media/s...
[+] [-] hugozap|10 years ago|reply
[+] [-] throwadeedee|10 years ago|reply
https://www.youtube.com/playlist?list=PLA7obRrq8OgRX3y0yO0PI...
[+] [-] moul|10 years ago|reply
[+] [-] aimxhaisse|10 years ago|reply
[+] [-] EugeneOZ|10 years ago|reply
Very impressive - not only work itself but also your feeling of rhythm.
[+] [-] danyim|10 years ago|reply
You should tweet this to Daft Punk and see what they think!
[+] [-] 7373737373|10 years ago|reply
Knowing nothing about this space, is there already a program that uses (wave based) sound simulation to allow music programming in an arbitrary 3d environment? This could go beyond mono and stereo :)
[+] [-] unwind|10 years ago|reply
I once worked with a brilliant audio developer/wizard who used Ambisonics (among other things).
Watching him position his desk when we switched to a new (large and open) office space is something I'll never forget. He walked around in the middle-ish of the room, snapping his fingers and listening. Suddenly he said "This is it, I'll sit here", and so he did. :)
[+] [-] squeaky-clean|10 years ago|reply
[+] [-] pcx|10 years ago|reply
[+] [-] ilovefood|10 years ago|reply
[+] [-] QuentinPerez|10 years ago|reply
[+] [-] aimxhaisse|10 years ago|reply