I would just like to promote a page of Sonic Pi ideas written by Professor Dr. Hiroshi Tachibana @H_Tachibana on this site. He is a long time promoter of Sonic Pi in Japan, and has a web page here.
The page is in Japanese, but the code can be copied directly from it. You can read comments and descriptions by feeding the page through google translate
using this url, however the code is mucked up with extra spaces and can’t be copied directly from the translated page.
To whet your appetite here are a couple snippets from the page.
First a nice recursive program
use_bpm 130
use_debug false
define :tarai do |x,y,z|
a=[:D4,:E4,:F4,:G4,:A4,:B4,:C5,:D5,:E5,:F5,:G5,:A5,:B5]
2.times do
puts x,y,z
play_pattern_timed [a[x+1],a[x+1]+12,a[y+1],a[y+1]+12,a[z+1],a[z+1]+12,a[y+1],a[y+1]+12],0.25
end
n=n+1
if(x<=y)
return y
else
return tarai( tarai(x-1,y,z), tarai(y-1,z,x), tarai(z-1,x,y))
end
end
tarai 10,5,0
secondly traversing the circle of fifths at random
# Random walk around on the Circle of Fifth
use_debug false
use_random_seed Time.new.usec
use_synth :pluck
i=0
loop do
2.times do
play_pattern_timed (chord 48 + i%12, :major),0.01
puts i/7, note_info(48 + i%12)
sleep 0.5
end
i=i+(rrand_i(0,2)-1)*7
end
A wide range of topics are covered on the page, including some nice sonification examples. Worth a look.