playing with Sonic Pi

If you haven't played with it SonicPi (http://sonic-pi.net/) is well worth a go, it combines programming, computational thinking and  music (or trying to create music in my case). Raspbian on the Raspberry Pi has it as standard, but  is great that SonicPi is available on the Mac and PC as well. 






Here is an simple (if I am honest, because of a lack of musical ability) piece I have been play with. You can end up playing for hours trying out different sounds, synths, effects etc.

in_thread do
  loop do
    sample  :ambi_choir, rate: 0.1, attack: 4, release: 4
    sleep 10
  end
end
2. times do
  sample :bass_trance_c, amp: 0.75, release: 3
  sleep 2
  sample :bass_trance_c, rate: 0.5, amp: 0.5, release: 5
  sleep 4
  sample :bass_trance_c, rate: 0.3, amp: 0.25, release: 9
  sleep 10
end

Here is the sneaky bit, even in the code above there a mixture of threads, loops, sequences as well designing of the 'shape' of the sounds. 

There is also a community producing material/examples. For example at https://gist.github.com/rbnpi/7713ac59ed553d3f336e you can find code for the Star Wars theme. It is very hard to resist playing with the theme and adding drums, etc.

There are some great tutorials available on The MagPi magazine site https://www.raspberrypi.org/magpi/issues/

All views are those of the author and should not be seen as the views of any organisation the author is associated with.

Comments

Popular posts from this blog

Have a Sphero BB-8 - now what?

Teaching social AI with robots and chatbots

Ohbot a social robot