Wednesday, 30 December 2015

playing with Sonic Pi

If you haven't played with it SonicPi ( 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
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

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 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

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

No comments:

Post a Comment

Answers not on the Screen

  2.  The answers not on the screen Hill, G. ,  Turner, S. J.  and  Childs, K.  (2017)  Abstract:  Reflection from two areas on the issues...