Improved random surfer

optimised !

#---------------------------------MASTER MIXER-------------------------#
set_mixer_control! amp: 3, lpf: 120

live_loop :metro do
  sleep 3
end
#--------------------------RANDOM SEED GENERATOR--------------------#

seeed = 140
slep = (ring 5, 5)

live_loop :seeeeds, sync: :bass do
  
  seeed = seeed + 1
  
  set :randseeed, seeed
  
  puts seeed
  
  sleep slep.tick
  
end

#---------------------------EFFELKTE---------------------------#

with_fx :slicer, phase: 0.125, pulse_width: 0.5 do |slice|
  
  #-----------------------------------------EFFEKT CONTROL MODULE (LOGIC)--------------------------------#
  
  live_loop :efx_control do
    
    if tick(:firsttime) == 0 then
      
      set :slice, slice
      
    end
    
    sleep 10
    
  end
  
  #-----------------------------------MELODIE-----------------------#
  
  notes = (ring 50, 51, 52, 55, 57, 58, 60).shuffle
  ampi = (ring 1, 1)  #spread???
  
  use_synth :tb303
  
  live_loop :bass, sync: :metro do
    
    use_bpm 120
    
    use_random_seed get(:randseeed)
    
    6.times do
      
      #with_swing 0.125, pulse: 3, shift: 0  do#(ring 0.2, 0.5 , 4, 8).choose do #rrand(1, 8)
      
      z = play notes.choose, attack: 0.1, release: 0.1, sustain: 0.1, amp: ampi.tick #, cutoff: rrand(70, 120), amp: ampi
      
      #end
      
      sleep 0.25
    end
  end
end

#--------------------------------------------EFFECT CONTROL------------------------#

live_loop :slice1, sync: :metro do
  # sync :löl
  
  slice = get[:slice]
  sleep 2
  control slice, phase: 0.125, pulse_width: 0.5, mix: 1
  sleep 2
  control slice, phase: 0.125, pulse_width: 0.5, mix: 1
  sleep 2
  control slice, phase: 0.125, pulse_width: 0.5, mix: 1
  sleep 2
  
end

1 Like