Hi @mrbombmusic
that’s actually not too complicated: I started with looking for a way to make fading of any paramater in a smooth way. Which means: make the fade somehow independant of the length of the live_loop it runs in. If I have a loop that runs for 8 beats I don’t want to wait that long until the parameter change and goes to the next value. So it was clear that I had to use control. My initial attempt goes like this (in the code above this is example 2):
- Provide a
ringof values and step through it usingtick - use a control value and use
tickagain to advance within thering - if e. g. I have a
ringlike(ring 0, 0.25, 0.5, 0.75, 1)the initial value for (let’s say)ampshould be0; then thecontroltakes over and sets theampto0.25. And here comes, what’s wrong about this: Now, in the next loop run, the 3rdtickdoes not start at0.25but with0.5and goes to0.75with the nextcontrol. - so it was clear, I needed another
ringfor that (and I got input from Sam about that). Theringmust look like:(ring 0, 0.25, 0.25, 0.5, 0.5, 0.75, 0.75, 1). That is, what the expression:(line 60, 100, steps: 10, inclusive: true).stretch(2).drop(1).butlastin example 1 is about. See the discussion in Manipualation of Rings to get further details about that. - now the 1st
tick(to stay with the example of theampvalue) takes the0, the followingcontrolwill take0.25with the 2ndtick, and then the 3rdtickwill also have the0.25because theringprovides every value except the first one (.drop(1)) and the last one (.butlast) twice. (The.reflectin example 1 just let’s the filter value go back, when it has reached the maximum value.)
Hope this makes the background of my solution search more understandable
Now I would like 1. to have a function that provides me with a simple way to construct rings of that kind (which I sketched out here) and furthermore a way to be able to fade in/out a live_loop at any time, which is a bit more complicated because you will have to deal with the tick value to set it back. One way is to a) set the filter, amp or whatever value to the last reached position and then b) reset tick. After that you can use you ring again with the desired values (e. g. first you fade in the loop and then, after a while, you want to fade it out). So I know how, but I was wondering if it is somehow possible to cover that with one conveniant function …
Martin