Play_pattern_timed vs sync of two live_loop?

I wonder why the two live_loop’s dont sync when I use “play_pattern_timed” ?

(They line up at “128” to sync again.)


# Jumping off point: "R3DN1K - I Adore You"
# https://www.youtube.com/watch?v=h90S0S0m3h8

set_volume! 2
with_fx :reverb, room: 0.4 do
  
  
  live_loop :a1 do
    tick
    #stop
    
    /kick/
    sample :bd_haus, cutoff: 80, amp: 2 if spread(1,4).look
    #sample :bd_fat, amp: 3 if spread(1,4).look
    
    /arp/
    use_synth :saw
    use_synth_defaults cutoff: line(60,90,steps: 32).look, release: 0.15
    n = :f3
    
    na = [n, n+3, n+7, n+3,  n, n+3, n+7, n+3]
    nb = [n, n+3, n+7, n+10, n+7, n+3, n, n+3]
    notes = knit(na, 8, nb, 8).look
    
    #play notes.look
    #play notes.look+12, pan: rdist(0.4)
    
    sleep 0.125
  end
  
  
  live_loop :b1 do
    # stop
    tick
    
    /bass (which is syncing every 128 ??) /
    use_synth :saw
    use_synth_defaults cutoff: line(90,120,steps: 32).look, release: 0.15, attack: 0.01
    n = :f2
    play_pattern_timed [n, n+2, n+3, n-4,  n, n+2, n+3, n-4+12 ], [3,0.5,0.5,4]
    
    sleep 0.125
  end
  
end

I have read and tried the “define” which also doesn’t sync for me.

(Ps. I know my bassline is not rhythmically correct to “R3DN1K - I Adore You”.)

I think your problem is the sleep 0.125 at the end of the :b1 live loop that shifts everything off by 1/8 of a beat each time around the loop. If you remove that everything stays in sync.

1 Like

Aha nice. I didn’t know that “play_pattern_timed” didnt’t need a “sleep” to work. Thank you @emlyn

Hmm how do I get “use_synth_defaults cutoff: line(90,120,steps: 32).look“ to work?

Hi

filter sweep works fine here, as expected

PD-Pi

1 Like

I think it is working, it’s just that it changes very slowly (one step for each time around the loop), so the whole phrase has to play 32 times before the full sweep finishes.

If you want it to change while the play_pattern_timed is running, you can do something like this:

    with_fx :lpf, cutoff: 60 do |fx|
      control fx, cutoff: 100, slide: 8
      play_pattern_timed [n, n+2, n+3, n-4,  n, n+2, n+3, n-4+12 ], [3,0.5,0.5,4]
    end
1 Like