I got into sonic pi because I want to make soundscapes and ambient music, mainly because I am becoming obsessed with Brian Eno’s work. I stumbled upon this article by Reverb Machine breaking down two tracks from Music for airports.
The album is mainly made from loops with different lengths that slowly get out of sync. And because the article provides with some choir and piano samples I could very easily recreate the Eno sound with a bunch of live loops.
I left sonic pi running in the background until it sounded like a good intro and pressed record for a few minutes, here’s the final product.
Here’s the code!
##| Music for airports ##| 2.5 sampchoir = "C:/Users/Alex/Music/samples/Music for Airports Loops/Choir" samppiano = "C:/Users/Alex/Music/samples/Music for Airports Loops/Piano" live_loop :piano1 do sample samppiano, 0 sleep sample_duration samppiano, 0 end live_loop :piano2 do sample samppiano, 1 sleep sample_duration samppiano, 1 end live_loop :piano3 do sample samppiano, 2 sleep sample_duration samppiano, 2 end live_loop :piano4 do sample samppiano, 3 sleep sample_duration samppiano, 3 end live_loop :piano5 do sample samppiano, 4 sleep sample_duration samppiano, 4 end live_loop :piano6 do sample samppiano, 5 sleep sample_duration samppiano, 5 end live_loop :piano7 do sample samppiano, 6 sleep sample_duration samppiano, 6 end live_loop :piano8 do sample samppiano, 7 sleep sample_duration samppiano, 7 end live_loop :chorus1 do sample sampchoir, 0 sleep sample_duration sampchoir, 0 end live_loop :chorus2 do sample sampchoir, 1 sleep sample_duration sampchoir, 1 end live_loop :chorus3 do sample sampchoir, 2 sleep sample_duration sampchoir, 2 end live_loop :chorus4 do sample sampchoir, 3 sleep sample_duration sampchoir, 3 end live_loop :chorus5 do sample sampchoir, 4 sleep sample_duration sampchoir, 4 end live_loop :chorus6 do sample sampchoir, 5 sleep sample_duration sampchoir, 5 end live_loop :chorus7 do sample sampchoir, 6 sleep sample_duration sampchoir, 6 end
I know the code is real simple, but I find it super nice how simple code creates great results. And I think sonic pi is great for those type of projects.
I just learned about defining my own functions, so I quickly created my own looper just to save up on some space and make the code be more compact. Here’s the new shortened version:
##| Music for airports ##| 2.5 sampchoir = "C:/Users/Alex/Music/samples/Music for Airports Loops/Choir" samppiano = "C:/Users/Alex/Music/samples/Music for Airports Loops/Piano" define :enoloop do |n, samp| in_thread do loop do sample samp, (n - 1) sleep sample_duration samp, (n - 1) end end end enoloop 1, samppiano enoloop 2, samppiano enoloop 3, samppiano enoloop 4, samppiano enoloop 5, samppiano enoloop 6, samppiano enoloop 7, samppiano enoloop 8, samppiano enoloop 1, sampchoir enoloop 2, sampchoir enoloop 3, sampchoir enoloop 4, sampchoir enoloop 5, sampchoir enoloop 6, sampchoir enoloop 7, sampchoir
I guess it could be even more compact because it still has tons of repetition, if I figure a way to do that ill post it here