with-vars-snapshotted ({var}+}){form}*) | [Macro] |
Creates a new variable binding for each var. Use inside loop to allow algorithms to reference unique values of the same loop variable.
Example:
? (merge foo () (loop for i in '(30 40 50) do (with-vars-snapshotted (i) (algorithm nil midi-note (length 20 rhythm 1 duration 1 amplitude .1) (setf note (+ i (random 7))))))) #<Algorithm: Foo>
See Also:
Describing Music Algorithmically