Need help with sample control ( solved)!

Hi again, last step for my deam come true :stuck_out_tongue_winking_eye:
i want to control the sample but the amp always jumps back when the control loop sleeps

  live_loop :samplesliced do
  
    
    a = (ring  0.5,    0.5,    0.9,   0).tick  #sequencer
    b = (ring   0.6,    0.2,    1,   0.2).tick
    
    
    s = sample :loop_amen, start: a, finish: b, rate: 0.9, amp: 0, amp_slide: 1, pitch_slide: 1
    
    set(:s, s)
    
    sleep sample_duration :loop_amen, start: a, finish: b, rate: 0.9
    
      end
end

live_loop :control do
  sleep 1
  control get(:s), amp: 1
  sleep 1
  control get(:s), amp: 1
  sleep 1
  control get(:s), amp: 1
  sleep 1
  
end

in the next one the control works, but slide won´t work like this, which is pretty important for me.

  live_loop :löl do
 
    
    a = (ring  0.5,    0.5,    0.9,   0).tick  #sequencer
    b = (ring   0.6,    0.2,    1,   0.2).tick
    
    
    s = sample :loop_amen, start: a, finish: b, rate: 0.9, amp: get(:a), amp_slide: 1, pitch_slide: 1
    
    set(:s, s)
    
    sleep sample_duration :loop_amen, start: a, finish: b, rate: 0.9
    
   end
end


live_loop :sampiii do
  
  control get(:s), amp: set(:a, 0)
  sleep 2
  control get(:s), amp: set(:a, 1)
  sleep 2
  control get(:s), amp: set(:a, 6)
  sleep 2
  
end

you guys are awewsome!!!
Thanks in advance!!!

Since each time around the loop creates a new sample, it’s going to be very tricky to make the slide continue from one sample to the next.
I think a better way to achieve this would be to wrap the loop in a with_fx :level, and then control the amp on that. Something like:

with_fx :level, amp: 1, slide: 1 do |fx|
  if not get :myfx then
    set :myfx, fx
  end
  
  live_loop :samplesliced do
    
    a = (ring  0.5,    0.5,    0.9,   0).tick  #sequencer
    b = (ring   0.6,    0.2,    1,   0.2).tick
    
    
    sample :loop_amen, start: a, finish: b, rate: 0.9, amp: 1
    
    sleep sample_duration :loop_amen, start: a, finish: b, rate: 0.9
    
  end
end


live_loop :control do
  sleep 1
  control get(:myfx), amp: 1
  sleep 1
  control get(:myfx), amp: 0
  sleep 1
  control get(:myfx), amp: 0.5
  sleep 1
  
end

well i see, i thought about that, but can i complety outsource the control of the sample to fx?#
i mean is this the same or dont i loose somewhat overall control and possibilites?

I guess it depends what you want to control: for controlling the amp, this should be the same; likewise for pan, lpf and hpf (with the appropriate fx).

If you want to control something like the pitch, then I think you’ll have to do that on the sample itself. If you want to control that live, with a slide that spans over more than one sample, that’s going to start getting tricky.

well yeah thats exactly what i need, i already contacted aaron maybe he can help me

well i found out that u can control the pitch, so its obsolete to directly control the sample

with_fx :slicer, phase_slide: 0.125, phase: 0.125, pulse_width: 0.8, pulse_width_slide: 0.125 do |slice|
  with_fx :pitch_shift, pitch: 1, pitch_slide: 2 do |pit|
    
    live_loop :löl do
      
      
      if tick(:firsttime) == 0 then
        set :pit, pit
       set :slice, slice
      end
      
      
      a = (ring  0,    0.2,    0.2,   0.5).tick  #sequencer
      b = (ring   3,    0.1,    3,   0.81).tick
      
      samp = sample :loop_amen, start: a, finish: b, rate: 0.9
      
      sleep sample_duration :loop_amen, start: a, finish: b, rate: 0.9
      
    end
  end
end




live_loop :slice1 do
  slice = get[:slice]
  sleep 1
  control slice, phase: 0.125, pulse_width: 0.125
  sleep 1
  control slice, phase: 0.125, pulse_width: 0.125
  sleep 1
  control slice, phase: 0.25, pulse_width: 0.25
  sleep 1
  
end

live_loop :pit1 do
  pit = get[:pit]
  sleep 2
  control pit, pitch: 1
  sleep 2
  control pit, pitch: -5
  sleep 2
  control pit, pitch: 5
  sleep 2
  
end
2 Likes

That’s wild! :smile:

1 Like