8 ms·
Aerodynamic by Daft-Punk in 100 lines of code with Sonic Pi
- bchatelard 11y agoNice!
- QuentinPerez 11y agoAwesome ! Added to my playlist :)
- aimxhaisse 11y agoGlad you like it! Feel free to ask questions!
- 7373737373 11y agoThis is awesome! 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 11y agoSomething like Ambisonics https://en.wikipedia.org/wiki/Ambisonics https://en.wikipedia.org/wiki/Ambisonics perhaps? 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. :)
- 7373737373 11y agoThis one seems to be static to the listener position and require more hardware. Assuming only headphones are used, something like WAVE (https://www.youtube.com/watch?v=ibM3fz-P0Ac https://www.youtube.com/watch?v=ibM3fz-P0Ac) could be used to simulate reflection, refraction, diffraction and interference effects. If the head is accurately tracked, I could imagine 3d directional sound programming in VR. Enter the Matrix rave ;)
- squeaky-clean 11y agoI'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.
- 7373737373 11y agoA language with which the programmer can specify the static or dynamic three dimensional position of the sound sources, absolute or relative to the listener in a specified environment. The geometry of the environment can affect reverberation, amplitude etc.
- yaxu 11y agoSupercollider has this kind of stuff
- samaaron 11y agoGreat work with the tutorial! Thanks for jamming with Sonic Pi and sharing the live coding love <3 <3
- aimxhaisse 11y agoThanks a lot for Sonic Pi and Overtone!
- jsmeaton 11y agoAwesome 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. Really impressive stuff, thanks.
- kriro 11y agoI'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-CONTRIBUTE.md 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.
- juliendorra 11y agoFor more on the live coding scene, check http://toplap.org http://toplap.org
- pcx 11y agoFor Daft Punk buffs like me, this is gold. Awesome stuff, kudos!
- mitchtbaum 11y agoVery cool. 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 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 https://news.ycombinator.com/item?id=9512962 also offers some interesting insight as to what could come from algorithmic musical composition.)
- samaaron 11y agoYou 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 :-)
- mik3y 11y agoMad respect, this looks so inventive. But as a coder by day / vinyl and controller DJ by night, shifting code around to gig sounds like a nightmarish personal hell! Am I missing something about how the tactile control works, or is it really just shifting text around with a keyboard and mouse?
- transpy 11y agoI'm a localization worker by day and DJ on the weekends... I understand your point haha. But we can't escape the curse, I indeed try do 'different activities' but at the end of the day I'm just switching laptops. Translate? computer work. Programm? computer work. DJing? computer work.
- moomin 11y agoThe 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.)
- moul 11y agoAre you using your tool here https://github.com/aimxhaisse/dummy-wav2pi https://github.com/aimxhaisse/dummy-wav2pi for this song ?
- aimxhaisse 11y agoUnfortunately 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.
- jsingleton 11y agoFYI 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. It's a free PDF download but you can buy it to support them: https://www.raspberrypi.org/magpi https://www.raspberrypi.org/magpi See page 48 (page 50 of the PDF): https://www.raspberrypi.org/magpi-issues/MagPi42.pdf https://www.raspberrypi.org/magpi-issues/MagPi42.pdf
- justinclift 11y agoYeah, I wish the language syntax in Sonic Pi was less Ruby, more Python. But, seriously disliking Ruby is just a personal hangup. ;)
- datajeroen 11y agoHacker version of this: https://github.com/substack/music-for-hire https://github.com/substack/music-for-hire Some examples: https://t.co/51cezrD9aZ https://t.co/51cezrD9aZ https://t.co/bUfCcAnSqX https://t.co/bUfCcAnSqX https://t.co/FyBHSbeAaT https://t.co/FyBHSbeAaT https://t.co/3r9FkxlguM https://t.co/3r9FkxlguM
- runeb 11y agoWarning; turn down your volume before clicking on these examples. I'm pretty sure my tinnitus got worse just now :(
- larrymcp 11y agoHeh, this reminded me of when Z-100 used to say: "if it's too loud... you're too old."
- yaxu 11y agoGenuinely interested - what makes this stuff more 'hacker' than the original post? I don't see it.
- faltad 11y agoIt's basically an ad for his services, nothing else!
- justinclift 11y agoYou're using GitHub for hosting a straight out commercial advert? That seems... not positive. :(
- heisnotanalien 11y agoWhy does code generated music like this always sound crap? Not trying to be a hater but surely it's obvious to anyone that the real version of this song sounds much better. What is the 'something' that makes it sound much better?
- ilovefood 11y agoI totally love this! Great job man!
- agounaris 11y agoI've just learned about sonic pi yesterday and today this is first on HN ... wtf who tracks me? :P
- Crespyl 11y agoBaader & Meinhof, Private Eyes.
- transpy 11y agoThe other day I was searching about the best way to automatically detect patterns in data. Then I checked my email and I had received a "Quora Session recap" type of newsletter (I don't get or read those often). The content of the newsletter was a series of questions about machine learning with Pedro Domingos, (I didn't know him). I was amazed by his knowledge about computer science. The next day I went casually to Amazon and it recommended me Pedro Domingo's book 'The Master Algorithm'. I tried a sample and it blew me away: it's a great exposition of what machine learning is. I bought the book and keep reading. This is a bit meta, but I think machine learning helped me find information to understand machine learning better. It chose me :)
- eivindga 11y agoImpressive!
- EugeneOZ 11y agoMove all moving parts to config (maybe inside this file even) to avoid jumps between code parts. Very impressive - not only work itself but also your feeling of rhythm.
- sklivvz1971 11y agoAerodynamic in 1 line of bash: firefox https://www.youtube.com/watch?v=Mjpu0-o9iek https://www.youtube.com/watch?v=Mjpu0-o9iek
- adrianN 11y agoThat's not portable bash though. Could you maybe provide a Docker image with the dependencies?
- duncanawoods 11y agoI'm interested in taking a closer look at one of Sonic Pi, Supercollider, WavePot, Chuck, CSound etc. Can anyone suggest how to choose which one to invest some time in?
- jm547ster 11y agoIt 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?
- duncanawoods 11y agoI have no fixed goal so interested to know the different trade-offs between each one e.g. which ones excel at different goals you suggest? Also general comments about things like quality, extendibility, community, momentum, learning curve, level of fun, reliability etc. would be really helpful - thanks!
- jm547ster 11y agoPersonally I always loved "patching" style environments like Pure Data for fun and experimentation only reaching for the likes of Csound or Supercollider when I wanted extensibility or portability. ChucK I've had the least experience with of those more mature toolkits (I didn't even know it was still actively maintained or developed), however I'd thoroughly recommend Supercollider due to the emphasis on live coding, mature community and integration with many languages. Unfortunately I cannot speak to the qualities of Sonic Pi, this being the first I've heard of it, although I must say it looks great!
- BFay 11y agoI'll have to look into WavePot, but I'll say that SonicPi is built first and foremost for live-coding; making music in realtime while coding. There's some other languages that focus on this - Gibber in the browser, Tidal in Haskell. Those are probably the best languages to start playing with if you want to get something musical happening quickly. SuperCollider is much more general - you have a server that can build and execute graphs of unit generators, and a language that has a ton of convenience features for interacting with the server, and abstractions for scheduling events. (sidenote, I'm starting to build an audio patching environment using SuperCollider. It doesn't do anything yet but I'm hoping to have something soon https://github.com/YottaSecond/Triggerfish https://github.com/YottaSecond/Triggerfish) SuperCollider also has a great community - questions on the mailing list are usually answered within a couple of hours, and there's a team of people furiously working on the upcoming 3.7 release. I love Pure Data to death, it has an amazing community and is actively being developed, but I have some trouble recommending it because of the aging Tcl/Tk interface. ChucK looks really interesting. In most environments you need to write unit generators in C/C++ to actually do low-level audio processing. ChucK uses a "strongly-timed" programming model, where you can actually use the same language to process sound sample-by-sample and schedule things at real musical intervals. Extempore is also worth looking into if you aren't afraid of lisp. So yeah, it depends largely on what you want to do. The live-coding languages like SonicPi are probably the best for getting music going quickly, but the others all have unique things to offer.
- runeb 11y agoDoes 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?
- baldfat 11y agoSonic-Pi can play the file as MIDI you would then just record the notes into Ableton Live. 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/sonic-pi-cheatsheet.pdf http://www.cl.cam.ac.uk/projects/raspberrypi/sonicpi/media/s...
- runeb 11y agoThey seem to concentrate on generating sound, not MIDI, even if they can read MIDI or use it internally. I'd like to generate my melodies algorithmically and then use the MIDI output of these programs as input in Ableton Live, Logic etc. Also check out alda: https://github.com/alda-lang/alda https://github.com/alda-lang/alda
- gosub 11y agoSuperCollider has a series of classes called Patterns for sequencing and algorithmic composition. The output can be sent to the embedded server for live synthesis or to a midi output (or directly to Ableton with a virtual midi cable) http://doc.sccode.org/Tutorials/A-Practical-Guide/PG_Cookbook04_Sending_MIDI.html http://doc.sccode.org/Tutorials/A-Practical-Guide/PG_Cookboo...
- eggy 11y agoGRACE,(Graphical Realtime Algorithmic Composition Environment) built on top of Common Music, can save the output to WAV or MIDI or using OSC, and it also interfaces nicely with LilyPond for a musical score printout. A lot of the livecoding programs allow you to direct the output to a file other than just audio out. I own Ableton, and you can use Max inside of it if you have the studio version, and now CSound can be used, but not for Livecoding if I understand it correctly.
- baldfat 11y agoHere is the video from OSCON in Amsterdam with the creator of Sonic Pi - https://www.youtube.com/watch?v=ENfyOndcvP0 https://www.youtube.com/watch?v=ENfyOndcvP0 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 11y agoAgreed, 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.
- dmoo 11y agoAlso check out heliosphan recreation in Sonic Pi YouTube https://www.youtube.com/embed/bgPpyfRk3rw https://www.youtube.com/embed/bgPpyfRk3rw
- canyonero 11y agoI'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. Great work, this is super cool!
- harisamin 11y agoSuper awesome. Here's my take on Arcade Fire's The Suburbs https://gist.github.com/hamin/1d3f45623b38504d72c8 https://gist.github.com/hamin/1d3f45623b38504d72c8
- hugozap 11y agoThat's really cool, I know nothing about music composition , where can I learn the basic theory/concepts/etc ?
- throwadeedee 11y agobbc how music works will make a nice basic inctroduction https://www.youtube.com/playlist?list=PLA7obRrq8OgRX3y0yO0PI9iDpxulWCxIr https://www.youtube.com/playlist?list=PLA7obRrq8OgRX3y0yO0PI...
- jayzalowitz 11y agoDid he put out source, id love to edit.
- aimxhaisse 11y agoYes, it's available here at the end: https://mxs.sbrk.org/aerodynamic-everything-en.html https://mxs.sbrk.org/aerodynamic-everything-en.html
- danyim 11y agoThe 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!