EAIP Posted June 17, 2015 Share Posted June 17, 2015 Hi,Is there a way that I can randomize the size argument of GEN-INTERLEAVE in the following code?That is, not just initially but continuously, so you get a variable interleave size. All the best,Erik(ambitus '(g3 g5) (gen-interleave 5 (integer-to-pitch (gen-accumulate '(2 7) :start -5 :count 16))) :type :invert) Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted June 18, 2015 Share Posted June 18, 2015 Hi,here is a possible solution:(ambitus '(g3 g5) (mapcar (lambda(x) (gen-interleave x (integer-to-pitch (gen-accumulate '(2 7) :start -5 :count 16)))) '(5 7 4 3)) ;;; Here is your list of length for gen-interleave :type :invert)SB. Quote Link to comment Share on other sites More sharing options...
EAIP Posted June 18, 2015 Author Share Posted June 18, 2015 Hi, Thanks for the quick reply. Is it thus possible to "extend" OM-syntax with regular LISP expressions? All the best, Erik Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted June 18, 2015 Share Posted June 18, 2015 yes, you can add your own functions to Opusmodus, put your functions/extension files in the folder ~/Opusmodus/Extensions.SB. Quote Link to comment Share on other sites More sharing options...
EAIP Posted June 18, 2015 Author Share Posted June 18, 2015 Great to know, thanks. Allt the best, Erik Quote Link to comment Share on other sites More sharing options...
opmo Posted June 18, 2015 Share Posted June 18, 2015 (edited) Just added the possibility to use list.(gen-interleave '(1 2 2 3) '(c4 d4 e4 f4 g4 a4)) => ((c4) (d4 e4) (e4 f4) (f4 g4 a4) (g4))Examples:(ambitus '(g3 g5) (gen-interleave '(3 5 3 4) (integer-to-pitch (gen-accumulate '(2 7) :start -5 :count 16))) :type :invert) => ((g3 a3 e4) (a3 e4 fs4 cs5 eb5) (e4 fs4 cs5) (fs4 cs5 eb5 gs4) (cs5 eb5 gs4) (eb5 gs4 fs4 b3 a3) (bb4 c5 g5) (c5 g5 f5 bb4) (g5 f5 bb4) (a4 e5 fs5 b4 a4) (e5 fs5 b4) (fs5 b4 a4 d4) (cs5 eb5 gs4))now with random size:(ambitus '(g3 g5) (gen-interleave (rnd-sample 15 '(3 5 3 4) :seed 45) (integer-to-pitch (gen-accumulate '(2 7) :start -5 :count 16))) :type :invert) => ((g3 a3 e4) (a3 e4 fs4 cs5 eb5) (e4 fs4 cs5 eb5) (fs4 cs5 eb5 gs4 fs4) (cs5 eb5 gs4) (eb5 gs4 fs4 b3) (bb4 c5 g5) (c5 g5 f5 bb4) (g5 f5 bb4 gs4 cs4) (a4 e5 fs5) (e5 fs5 b4 a4) (fs5 b4 a4 d4) (cs5 eb5 gs4 fs4) (eb5 gs4 fs4))This is part of version 1.1 now. Edited July 24, 2015 by opmo Quote Link to comment Share on other sites More sharing options...
EAIP Posted June 19, 2015 Author Share Posted June 19, 2015 Oh, great!I guess it's generally a good thing that an argument could be either a single value, a list or a function that returns a single value or a list.I've been doing some work using Patterns in SuperCollider and I find it really flexible, but I'm sure the developers at Opusmodus are already familiar with that concept.Having a good time over here going through the tutorials of Opusmodus.All the best,Erik Quote Link to comment Share on other sites More sharing options...
opmo Posted June 19, 2015 Share Posted June 19, 2015 I think this is good idea and we will add this functionality with time. EAIP 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.