# Welcome to Sonic Pi notes = [50, 62, 58, 47] notes2 = [53, 66, 55, 50] n = 0 rates = [1, 0.9] r = 0 with_fx :reverb do with_fx :echo, phase: 0.125, decay: 4 do 2.times do 8.times do play notes[n] sleep 0.5 sample :elec_plip, rate: rates[r] sleep 0.5 n += 1 r += 1 n = n % 4 r = r % 2 end 8.times do play notes2[n] sleep 0.5 sample :elec_plip, rate: rates[r] sleep 0.5 n += 1 r += 1 n = n % 4 r = r % 2 end end end end