AM Posted June 1, 2018 Share Posted June 1, 2018 (defun vector-range-drift (start end input &key (spread 8)) (let ((values (gen-divide (rnd-sum (length input) (primes spread)) input)) (n-values) (a-step) (b-step)) (progn (setf n-values (1- (length values))) (setf a-step (/ (car (difference (list (car start) (car end)))) n-values)) (setf b-step (/ (car (difference (list (cadr start) (cadr end)))) n-values)) (loop for i in values for a = (car start) then (incf a a-step) for b = (cadr start) then (incf b b-step) append (vector-range a b i))))) ;;;;; EXAMPLES -> MODULATE/DRIFT white-noise - with different spreads (list-plot (vector-range-drift '(-7.1 1) '(-0.1 10) (gen-white-noise 187) :spread 10)) (list-plot (vector-range-drift '(-7.1 1) '(-0.1 10) (gen-white-noise 187) :spread 6)) (list-plot (vector-range-drift '(-7.1 1) '(-0.1 5.6) (gen-white-noise 517))) (list-plot (vector-range-drift '(-1.1 1) '(-3.1 5.6) (gen-white-noise 317))) loopyc and Stephane Boussuge 1 1 Quote Link to comment Share on other sites More sharing options...
opmo Posted June 2, 2018 Share Posted June 2, 2018 Good one. I will add it to the system soon. Thank you Andre Quote Link to comment Share on other sites More sharing options...
AM Posted June 2, 2018 Author Share Posted June 2, 2018 perhaps you could expand the function when we could not only have "start->end-process/linear", also with a seq-curve (two) for LOW and HIGH values... would be very smart. so it's a kind of ambitus-modulation (with perhaps white-noise) lviklund 1 Quote Link to comment Share on other sites More sharing options...
opmo Posted June 4, 2018 Share Posted June 4, 2018 Could you explain more what you mean with seq-curve, low and high. Example could help or simply add the functionality to the function. Quote Link to comment Share on other sites More sharing options...
AM Posted June 4, 2018 Author Share Posted June 4, 2018 INPUT-curves could be like that: (in that way you could imitate some early "xenakis-curves" when you map it to pitches :-)) (setf curve1 '(-5.1 -2.3 -1.1 -0.8 -0.3 -2.5)) (setf curve2 '(1.0 1.2 1.5 2.1 4.6 10.6)) (vector-range-drift curve1 curve2 (gen-white-noise 250)) as result: "imitated" by my old/simple function: (list-plot (append (vector-range-drift '(-5.1 1) '(-2.3 1.2) (gen-white-noise 50)) (vector-range-drift '(-2.3 1.2) '(-1.1 1.5) (gen-white-noise 50)) (vector-range-drift '(-1.1 1.5) '(-0.8 2.1) (gen-white-noise 50)) (vector-range-drift '(-0.8 2.1) '(-0.3 4.6) (gen-white-noise 50)) (vector-range-drift '(-0.3 4.6) '(-2.5 10.6) (gen-white-noise 50)))) Stephane Boussuge and loopyc 2 Quote Link to comment Share on other sites More sharing options...
opmo Posted June 4, 2018 Share Posted June 4, 2018 I will make it that way. AM 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.