Hacker News new | past | comments | ask | show | jobs | submit login
Sonic Pi: Make Music Using Ruby (sonic-pi.net)
111 points by stevekinney on Jan 2, 2015 | hide | past | favorite | 10 comments




Being able to listen and see how changes to the waves make a difference to what I'm hearing is interesting for me as an amateur musician with some understanding of the physics, but I wonder how well this works for kids in this classroom environment. Are they actually being taught synthesis, or are they rather being taught to make music and treating each piece of code as an instrument where they change what notes it plays rather than what it does?

I can see how the automated synthesis could be more appealing than classical instruments because they sound like what one hears on TV or radio, and doesn't need years of practice for good technique.

Is there an advantage to showing kids the actual numbers though? And how effective are these numbers compared to "conventional music" concepts like BPM and named notes of a scale (even if they are just named, 1st, 2nd, 3rd or do re mi - and even if the scale is not assumed to have 8 notes).

If I'm reading the list of contributors right it seems like these are musicians rather than computer scientists, so it would be interesting to hear from them.


Sonic Pi has three broad goals. One is to give coders a very low-friction entry point to live coding music. Second is to create a musical instrument capable of being taught in school music lessons. The third (and primary) goal is to provide a way to engage learners with coding (of any age but typically in schools).

The numbers primarily work with goals 1 and 3 because you don't feel like you have to know any music theory to make noise and simple melodies. They also work with 2 because it's pretty easy to transpose (+ 12) and modulate the main notes. Using floats also enables you to specify notes between semitones (play 30.235).

Additionally...

Sonic Pi also supports specifying notes as symbols: play :Eb3. You have access to a large corpus of scales and chords and you can also modify the BPM globally or local to specific threads. You can even access scales using positions such as :iv.

We're always looking for new ideas - especially ones that provide new way to manipulate music concepts through code that give people greater access to concepts they would typically find hard to understand through formal theory.

Also, we're just looking for ways to make Sonic Pi more fun to jam with...


Can use Sonic Pi or Overtone to generate Midi output? I'm playing around with Ableton and I'd love to be able to generate some note sequences programmatically and then pipe it in to Ableton as a midi source.


I've been playing with Sonic Pi and loving it. It's by Sam Aaron, the same person who wrote Overtone (http://overtone.github.io/), a fantastic Clojure wrapper around SuperCollider (http://supercollider.sourceforge.net/) that adds many higher-level features. Right now, Sonic Pi looks to be a bit more limited than Overtone (more choices made for you, less access to low-level features) but I have a feeling that will change over time.


Sonic Pi does borrow (steal) a lot of ideas from Overtone. However, the goals are fundamentally different. Overtone aims to give you (the programmer) as much power as possible to create new instruments. Sonic Pi aims to be as simple as possible for everyone (including programmers) to use code to make music.

That said, we still aim to increase the power Sonic Pi offers. It's just that we'll not add any features that make it more complex than it already is without serious thought :-)


At a Nickel City Ruby conference last year I saw Dabit play a live-coding music demo with the Banjo gem, and it was awesome:

https://github.com/dabit/banjo

I unfortunately can't find any video of it, but he was using a trick that was either inside or out of the Banjo gem to get the code files to reload each time he saved them and change the tune in real-time. It was awesome, even when he had a syntax error and the music stopped for a minute, he went with it, said "Oops" and fixed it, moved on, everyone laughed! Live coding music that was really a lot better than I would have imagined, having never seen anyone live-code music before.


For some extra musical-coding-inspiration, watch the wonderful Andrew Sorensen: https://www.youtube.com/watch?v=yY1FSsUV-8c


Timely! We're adding a Sonic Pi track to our monthly CoderDojo (http://www.coderdojohenry.com/) to help kids learn programming concepts while synthesizing music. The graphical desktop app is quite good and is not dependent on Raspberry Pi making it easy for anyone to download and use.


Another cool live-coding music platform, in Haskell: http://yaxu.org/tidal/




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: