How can I slide pan of sample sound?


EDIT: I just found out about the Pan Slicer. That seems to do what I’m looking for. Still I would like to know how to _slide pan for more sophisticated sound design like make some sample sound sway from -0.6 to 0.2 at a specified speed…

I have a song almost made but I want a bunch of the sounds to have a sliding pan where they swag from left to right as the sample plays. I have tried making and LFO which starts at -1 and ends at 1 then using lfo.look as my pan value but realized this only is checked every time that sample executes, not continuously as the sample plays.

I’ve used _slide with some effects successfully. It looks like the pan FX has a pan_slide option but after testing it out I can’t seem to get any panning to occur. Not only that but I don’t understand where the pans starting value will be and what direction the panning is expected to happen (left to right… or right to left). Maybe someone could post an example code with a brief explanation.



maybe you are looking for something like that:

live_loop :panning do
  s = sample :guit_e_slide, rate: 0.75, pan: -1
  control s, pan: 1, pan_slide: 2
  sleep 4


Alternatively it looks like the smooth: paramter is what you want when using the fx version eg

live_loop :panner do
  with_fx :panslicer,phase: 0.5,smooth_up: 0.25,smooth_down: 0.25,pan_min: -0.8,pan_max: 0.8
    play :c4,attack: 0.05,sustain: 1.9,release: 0.05
    sleep 2

There are quite a few other paramters to play with with the fx. See the documentation.