Doffu - Cloud Dancers | クラウドダンサー

Believe it or not, I used almost the exact same code to construct the bulk of this as I did for my Polybius remix. Also saw a really awesome tutorial by Ben Marriott showing how to get this nice CRT type look so I have to give it a try. Let me know what you think, it’s definitely giving me some cyberpunk vibes.

# INITIALIZE MASTER VALUES
use_bpm 74
counter0 = 0
use_random_seed 0 #14 #8 #3#

# LOAD IN SAMPLE LIBRARIES
barretA = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/REF/"
barretDrum = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/Barret Drums/"
barretBreak = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/Nutype Loops/"
barretB = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/RED XIII"
barretC = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/Side Quest VOX/"
barretD = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/Barret Loops/D"
barretE = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/Barret Loops/E"
barretF = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/B - Breaks"
barretG = "/Users/sheakennedy/Desktop/Elder Desktop/DESKTOP/Drum Kits _ Samples/Homebrew/Side Quest Loops"

# AUTOMATION
line_Riser0 = (line 10, 0, inclusive: true, steps: 16)
line_Riser1 = (line 8, 0, inclusive: true, steps: 128)
line_Riser2 = (line 4, 0, inclusive: true, steps: 128)
lfo0 = (line 70, 100, inclusive: true, steps: 16).mirror
lfo1 = (line 0.8, 0.99, inclusive: true, steps: 32).mirror
lfo2 = (line 120, 60, inclusive: true, steps: 4).mirror
lfo3 = (line 120, 100, inclusive: true, steps: 8)
lfo4 = (line 0.7, 0.99, inclusive: true, steps: 4).mirror
lfo5 = (line 0.3, 0.99, inclusive: true, steps: 2).mirror

# LEVELS
inst0_lvl           = 0
inst1_lvl           = 0 #1 thru 5
inst2_lvl           = 0
inst3_lvl           = 0
inst4_lvl           = 0
inst5_lvl           = 0
inst6_lvl           = 0
trap_lvl            = 0

# MODIFIERS
trap_sleep_mod     = 1
rate_mod           = 16 

live_loop :e2 do
  if(inst0_lvl == 1)
    with_fx :level, amp: inst0_lvl do
      puts tick
      #with_fx :echo, mix: 0.8 do
      sample barretA, 0, rate: 1
      #end
    end
  end
  sleep 32
end


live_loop :e3 do
  if(inst1_lvl == 1)
    puts tick
    with_fx :level, amp: (ring 1,0,1,0).look do #choose([1,0]) do
      sample barretB, 2, rate: 1, onset: (ring 1,0,0,2,6,4,5,  1,0,0,7,7,8,2,0).look, release: 0.01
    end
  end
  sleep 0.125
end

live_loop :trip2 do
  puts tick
  if(inst2_lvl == 1)
    with_fx :level, amp: choose([1])  do
      sample barretC, 0, rate: (ring 4,1,2,1).look, onset: (ring 4,1,2,0,3,0,0,6).look, release: 0.01 if (spread 12, 16).look
    end
  end
  sleep (ring 0.5, 0.25, 0.25).look #Switch between these to change pacing
  #sleep (ring 0.25, 0.125, 0.125).look
end

live_loop :trip3 do
  puts tick
  if(inst3_lvl == 1)
    with_fx :level, amp: choose([1])  do
      sample barretG, 2, rate: (ring 4,8,2,4).look, onset: (ring 11).look, release: 0.01 if (spread 16, 16).look
    end
  end
  sleep (ring 0.5, 1.5).look #Switch between these to change pacing
  #sleep (ring 0.25, 0.125, 0.125).look
end

# TRAP HATS
define :trap_hats do |smp, div, s_rate, e_rate|
  with_sample_defaults sustain: 0.015, release: 0.015, amp: 2 do
    rate_div = (s_rate - e_rate) / div.to_f
    div.times do
      sample smp, sustain: 0.02, amp: rrand(0.5, 0.9), rate: s_rate*rate_mod
      sleep (0.5/div)*trap_sleep_mod
      s_rate = s_rate - rate_div
    end
  end
end

live_loop :hats do
  # SPECIFY TRAP SAMPLES
  trap0 = barretG, choose([0])
  with_fx :level, amp: trap_lvl*0.5 do
    with_fx :flanger, wave: choose([0, 1, 2, 3, 4]) do
      #trap_hats(:perc_till, [1, 2, 3, 4, 6, 8, 12, 16].choose, rrand(0.7, 1.3), rrand(0.7, 1.3))
      trap_hats(trap0, [1, 2, 3, 4].choose, rrand(0.7, 1.3), rrand(0.7, 1.3))
    end
  end
end

live_loop :a3 do
  if(inst4_lvl == 1)
    puts tick
    with_fx :level, amp: choose([1,1])  do
      sample barretBreak, 0, rate: 4, onset: pick, sustain: 0, release: choose([0.1, 0.2])
    end
  end
  sleep 0.125
end

live_loop :a4 do
  if(inst5_lvl == 1)
    puts tick
    with_fx :level, amp: choose([1,1])  do
      sample barretBreak, 1, rate: 1, onset: pick, sustain: 0, release: choose([0.1, 0.2])
    end
  end
  sleep 0.125
end

live_loop :a5 do
  if(inst6_lvl == 1)
    puts tick
    with_fx :level, amp: choose([1,1])  do
      #with_fx :distortion do
      #with_fx :gverb do
      sample barretC, 0, rate: 1, onset: pick, sustain: 0, release: choose([0.1, 0.2])
      #end
      #end
    end
  end
  sleep 0.125
end
4 Likes

Hi,

Cool piece of music. congratulations ! All made into Sonic Pi ? If you want, would you give us more informations about your setup ? Software, external synths etc.
Cheers

I laid out the basic melody in Logic. Then in Sonic Pi I took various samples from old projects and newly created samples and superimposed them over the looping melody. Once I was finished layering everything up in the way I wanted, I exported each individual Sonic Pi track and pulled them back into Logic. I used Logic to arrange the song and individually mix, EQ, effect the tracks. So I spend about 50% of my time in each program.

Sorry I thought I had linked the code, I’ve provided it now. I use all external samples so if you want to try out the code you’ll have to link it up to your own sample folders.

1 Like