Random sample slicer

this is an improved version, yet simple :stuck_out_tongue_winking_eye: version of the random sample slicer

live_loop :metronom do
  sleep 1
  
end


live_loop :löl, sync: :metronom do
  
  use_random_seed 12332

  6.times do

    a = (ring  0 ,   0,    0  ,  0.5,  0.7).choose
    b = a + 0.3
    
    with_swing do

    sample "C:/Users/marce/Desktop/sonic pi/1.wav", start: a, finish: b, rate: 1 # , onset: pick
     
end
    
    sleep sample_duration :loop_amen, start: a, finish: b

  end
end
1 Like

hi @holz

may i suggest you to use built-in samples to allow folks to copy / paste your code into their sonic pi and test it

live_loop :metronom do
  sleep 1  
end

live_loop :löl, sync: :metronom do

  use_random_seed 12332
  6.times do
    
    a = (ring  0 ,   0,    0  ,  0.5,  0.7).choose
    b = a + 0.3    

    with_swing do      
      sample :loop_breakbeat, start: a, finish: b, rate: 1 # , onset: pick      
    end
     sleep sample_duration :loop_amen, start: a, finish: b    
  end
end

Cheers

2 Likes