I am working on a Granular Sampler. I am trying to have a Slider to set the start point for the sample and a slider to set the length of the sample. When I move the start slider the length should move accordingly... Don´t know if my explanation makes sense but here is what I came up with. It works but not so good... Any Ideas of how to do this properly?
position:length.pd
-
Connecting two Sliders for Playback Start Position and Length
-
@Krischomat Maybe this is going in your direction:
By moving the first slider, the second slider is set to its previous position plus the difference between current and previous position of the first slider.
-
yes! Thats doing the trick! I was close with my solution, but this is what I was looking for Thank you =)
-
@Krischomat Using the range message might make things more intuitive.
length.pd
-
Ah! That looks helpful. But it seems that this is part of a library?
Edit: Ah it is just a message, not an object...
-
@Krischomat Nope, plain old vanilla and documented in the help files. Open up the help file for sliders and explore those subpatches on the right hand side, lots of useful things you can do.
-
it seems that this solution always updates the "length" slider to the position of the "position"...
-
@Krischomat It depends what you want....
I wasn't shure what you meant by length but having assumed that it was the playback length I had prepared this........ sliders.pd
As I was unsure and others had posted solutions I kept it back but maybe it is useful.
It seemed to me that the options are fixed length or fixed end position.The range message can be applied to the sliders according to the actual (total number of samples) length..... or a better solution is to add some calculation, keeping all the sliders in the range zero to one which makes for easier use of [phasor~]
David.