Meandering chord progressions and melody through Sonic Pi scales

I was looking at some of @mrbombmusic tutorials on youtube which are a good start to start playing with ideas, and developed one of them to produce the piece below. It can easily be altered or developed further.

#chord progressions and melody meandering through Sonic Pi's scales
#code by Robin Newman, inspired by a tutorial by Mr Bomb

use_debug false
use_bpm 110

sn= scale_names #internally defined scale names in Sonic Pi

define :dub do |n| #n is a list of notes
  #list n is duplicated an octave above and below the original
  #a rest (nil) is added to the list
  op=[nil] #output list initiated to a rest (nil) to add some rhythmic change to what is played
  n.each do |nv|
    op += [nv] #original
    op += [nv - 12] #down an octave
    op += [nv + 12] #up an octave
  return op #expanded list is returned

with_fx :reverb, room: 0.6,mix: 0.7 do
  live_loop :prog do
    use_synth :pluck #for melody notes
    #choose one of the two progressions. Could add others
    progression = [(ring, :i,:vi,:ii,:v),(ring, :i, :v,:vi,:iv)].choose
    puts progression
    s=scale_names.choose #.tick can be used instead to sequence through them all
    puts s
    tick_reset :prog #reset tick counter :prog
    progression.length.times do #iterate through the progression
      #take three note chord for each degree
      in_thread do #individual note thread played at same time as chord
        cx=dub(cn) #produced extended list using dub
        puts cx
        16.times do #play 16 notes/rests from the list
          play cx.choose,pan: rrand_i(-1,1)  #distribute note to pan -1,0 or 1
          sleep 0.25
      with_synth :tb303 do
        #play the next chord in the progression
        play cn,release: 4,cutoff: 90,amp: 0.5,pan: rrand_i(-1,1)
      sleep 4
1 Like

Thank You …
Good YouTubes … AND
Your piece is delightful …
" Artificial Musical Intelligence "
is a great possibility with scripted
audio . The most interesting facet
( to me ) being the interaction of
mind ( perception ) with the
performance . One man ’ s
( or moment ’ s ) music is
the next man ’ s ( or moment ’ s )
noise …