g-eval
seed number function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | (g-eval 0.34 11 '(i-direction-rnd nil :rnd (g-integer 0 11))) --> ((0 1 -2 -3 -4 -5 -6 7 8 -9 10 11) (0 1 2 3 4 5 6 7 -8 -9 -10 11) (0 -1 -2 3 4 5 -6 -7 -8 -9 -10 11) (0 -1 2 3 -4 5 6 -7 -8 9 10 11) (0 1 2 -3 4 5 -6 -7 8 -9 -10 11) (0 -1 -2 -3 4 5 6 7 8 9 -10 11) (0 1 -2 -3 4 5 -6 7 8 9 10 -11) (0 -1 -2 -3 4 5 6 -7 -8 -9 -10 -11) (0 1 2 3 -4 5 6 -7 -8 9 10 -11) (0 1 -2 3 -4 5 6 7 8 -9 10 11) (0 1 2 3 4 -5 -6 7 -8 9 -10 11)) (g-eval 0.34 11 '(i-direction-rnd nil :list (g-integer 0 11))) --> ((0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11) (0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11) (0 1 2 3 4 5 6 7 8 9 10 11) (0 1 2 3 4 5 6 7 8 9 10 11) (0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11) (0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11) (0 1 2 3 4 5 6 7 8 9 10 11) (0 1 2 3 4 5 6 7 8 9 10 11) (0 1 2 3 4 5 6 7 8 9 10 11) (0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11) (0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11)) |
cpoint
seed type range now target
type :integer :symbol :pitch
The input can be integer, symbol or pitch list.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | (cpoint 0.45 :symbol '((-24 12) (-12 24) (-5 40) (-5 40)) '(-12 3 17 26) '((0 1 2 7) (0 1 2 6) (0 3 4 7) (0 2 3 5) (4 5 7 9))) --> ((-m d r [) (-l c t y) (-m b o _) (-r a p ]) (-m f p [) (-p h r ])) (cpoint 0.45 :pitch '((-24 12) (-12 24) (-5 40) (-5 40)) '(-12 3 17 26) '((0 1 2 7) (0 1 2 6) (0 3 4 7) (0 2 3 5) (4 5 7 9))) --> ((c3 d#4 f5 d6) (c#3 d4 g5 c6) (c3 c#4 d5 f#6) (g2 c4 d#5 e6) (c3 f4 d#5 d6) (a2 g4 f5 e6)) (cpoint 0.45 :integer '((-24 12) (-12 24) (-5 40) (-5 40)) '(-12 3 17 26) '((0 1 2 7) (0 1 2 6) (0 3 4 7) (0 2 3 5) (4 5 7 9))) --> ((-12 3 17 26) (-11 2 19 24) (-12 1 14 30) (-17 0 15 28) (-12 5 15 26) (-15 7 17 28)) (cpoint 0.45 :symbol '((-24 12) (-12 24) (-5 40) (-5 40)) '(-12 3 17 26) '((a b c h) (a b c g) (a d e h))) --> ((-m d r [) (-l c t y) (-m b o _) (-r a p ])) |
g-proportion
type start-symbol range operator per-cent1 per-cent2 pattern
type: nil :list :constant :consecutive
start-symbol: nil integer symbol pitch list
range: symbol integer pitch instrument-name
operator: > < <> ><
per-cent: integer1 integer2
pattern: symbols, intervals
This function lies somewhere between existing SCOM primitives symbol-scale and symbol-compress. It has the added attraction of enabling symbol lists or interval series to be used as source material for the generation of new material ‘in proportion’ to the source.
The function parameters allow for a wide range of possibilities.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ; Type Examples ; nil ; ( . . . . . . . . . ) ; symbols ; ( 50 38 25 12 0 -12 -25 -38 -50 ) ; '> 50 -50 ; nil ; (( . . . ) ( . . . ) ( . . . )) ; symbols ; ( 50 38 25 12 0 -12 -25 -38 -50 ) ; '> 50 -50 ; nil ; ( . . . . . . . . . ) ; symbols ; ( 35 35 35 35 35 35 35 35 35 ) ; '> 35 35 ; :list ; (( . . . ) ( . . . ) ( . . . )) ; symbols ; (( 50 50 50 ) ( 0 0 0 ) ( -50 -50 -50 )) ; '> 50 -50 ; :constant ; (( . . . ) ( . . . ) ( . . . )) ; symbols ; (( 50 0 -50 ) ( 50 0 -50 ) ( 50 0 -50 )) ; '> 50 -50 ; :consecutive ; (( . . . ) ( . . . ) ( . . . )) ; symbols ; (( 50 38 25 ) ( 12 0 -12 ) ( -25 -38 -50 )) ; '> 50 -50 |
The scope of this particular function is best described through a series of examples, as below.
Intervals
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | (setq op.31-var-for-orch '(1 7 9 6 8 0 5 4 10 11 2 3)) (setq interval-list (get-interval :all op.31-var-for-orch)) --> (6 2 -3 2 -8 5 -1 6 1 -9 1) (g-proportion nil 1 -5 45 '> 50 -50 interval-list) --> (b k n k n f k k p q l l) (g-proportion nil 1 -5 45 '> 50 50 interval-list) --> (b k n i l -b g e n o a b) (g-proportion nil 'c#4 'viola '<> -30 70 interval-list) --> (b g i f i -e e d m o f g) (setq interval-rotate (rotate-fc 2 interval-list)) --> ((6 2 -3 2 -8 5 -1 6 1 -9 1) (2 -3 2 -8 5 -1 6 1 -9 1 6) (-3 2 -8 5 -1 6 1 -9 1 6 2)) (setq interval-lists (g-chord .25 1 2 0 0 interval-rotate)) --> (((6 2) -3 (2 -8) (5 -1) 6 (1 -9) 1) (2 -3 (2 -8) (5 -1) 6 (1 -9) (1 6)) (-3 2 -8 (5 -1) (6 1) -9 (1 6) 2)) (g-proportion nil 1 -5 45 '<> -45 70 interval-lists) --> ((b fh f hb gg n pf h) (k g j-d gf q se gp) (l o f lk qr k lq s)) (g-proportion :list 1 -5 45 '<> -45 70 interval-lists) --> ((b fh g ie hh l mi j) (n i m-b hg r te gr) (m q d lk vx i kv z)) (g-proportion :constant 1 -5 45 '<> -45 70 interval-lists) --> ((b fh e h-e ed m of g) (i g ja ih s uj lq) (p r j qp [] p ry [)) (g-proportion :consecutive 1 -5 45 '<> -45 70 interval-lists) --> ((b fh f hb gg n pf h) (k g j-d gf q se gp) (l o f lk qr k lq s)) (g-proportion :consecutive '(0 1 2) -5 45 '<> -45 70 interval-lists) --> ((a eg e ga ff m oe g) (b e a dp yx \c \eW |Yb|) (c -c b k qp vw p qv x)) |
Symbols
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | (setq op.37-4-sq '(5 4 0 1 8 6 7 3 11 10 9 2)) (setq symbol-list (i-convert 5 'violin (get-interval :all op.37-4-sq))) --> (f e a b i g h d l k j c) (g-proportion nil 5 -5 45 '> 50 -50 symbol-list) --> (f d -c a j h i f m m m i) (g-proportion nil 'f -5 45 '> 50 50 symbol-list) --> (f d -d -c i f g a m k i -d) (g-proportion nil 'f4 'viola '<> -30 70 symbol-list) --> (f f c e o l n h t s r l) (setq symbol-rotate (rotate-fc 2 symbol-list)) --> ((f e a b i g h d l k j c) (e a b i g h d l k j c f) (a b i g h d l k j c f e)) (setq symbol-lists (g-chord .25 1 2 0 0 symbol-rotate)) --> ((fe ab i gh dl k jc) (e a b ig hd l kj cf) (a b i g hd lk j cf e)) (g-proportion nil nil -5 45 '<> -45 70 symbol-lists) --> ((ff de k jk hq p og) (j e g qn pj x wv kp) (j l u s uq yy y tw w)) (g-proportion nil 'd#4 -5 45 '<> -45 70 symbol-lists) --> ((dd bc i hi fo n me) (h c e ol nh v ut in) (h j s q so ww w ru u)) (g-proportion :list nil -5 45 '<> -45 70 symbol-lists) --> ((ff de i hi gl l li) (e -c a mj lf t sr gm) (a c o l nh vu t io n)) (g-proportion :list 0 -5 45 '<> -45 70 symbol-lists) --> ((aa -c-b d cd bg g gd) (-b f h tq sm [ zy nt) (-f -d j g ic qp o dj i)) (g-proportion :constant '0 -5 45 '<> -45 70 symbol-lists) --> ((aa -d-b i gi co n mh) (-b -d -c ge ga o nm fi) (-f -e c a c-d lk j bf f)) (g-proportion :consecutive 0 -5 45 '<> -45 70 symbol-lists) --> ((aa -c-b f ef cl k jb) (-b e g ro qk y xw mr) (-f -d g e gc kk k fi i)) (g-proportion :consecutive '(0 1 2) -5 45 '<> -45 70 symbol-lists) --> ((aa -c-b f ef cl k jb) (b -e -c jg ic q po ej) (c e n l nj rr r mp p)) |
g-set-series
seed type set
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | (g-set-series 0.23 :integer '(5 3 5 4 5 4 5)) --> ((0 1 2 5 6) (0 1 2) (0 1 2 3 7) (0 1 2 6) (0 1 3 5 6) (0 2 3 5) (0 2 3 4 7)) (g-set-series 0.23 :symbol '(5 3 5 4 5 4 5)) --> ((a b c f g) (a b c) (a b c d h) (a b c g) (a b d f g) (a c d f) (a c d e h)) (g-set-series 0.23 :interval '(5 3 5 4 5 4 5)) --> ((1 1 3 1) (1 1) (1 1 1 4) (1 1 4) (1 2 2 1) (2 1 2) (2 1 1 3)) |
g-tempo
seed size beat tempo length
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | (setq tempo1 (g-tempo 0.23 '(4 11) '1/4 (permute '(32 44 72 88)) 120)) (first tempo1) --> (3/2 1/1 3/2 7/4 2/1 9/4 2/1 5/4 3/2 2/1 3/2 11/4 9/4 2/1 5/2 9/4) (second tempo1) --> (32 44 72 88 32 44 88 72 32 72 44 88 32 72 88 44) (setq tempo2 (g-tempo 0.23 '((4 7) (3 6)) '1/4 '((32 44 72 88) (72 112)) '(60 60))) (first tempo2) --> (5/4 7/4 1/1 3/2 5/4 5/4 5/4 1/1 3/2 5/4 3/2 1/2 3/4 5/4 3/2 1/1 5/4 5/4 3/4 3/2 3/2 5/4 3/2 3/2) (second tempo2) --> (32 44 72 88 32 44 72 88 32 44 72 88 72 112 72 112 72 112 72 112 72 112 72 112) (setq len (g-tuplet nil 1 4 'd 'n '(4 4 4 4 4 4 4) '(5 3 4 5))) --> ((1/20 1/5) (1/6 1/12) (3/16 1/16) (3/20 1/10) (1/20 1/20 3/20) (1/6 1/12) (1/16 3/16)) (g-tempo 0.23 '(3 5) '1/8 (permute '(32 44 72 88)) len)) --> ((3/8 3/8 3/8 3/8 1/4) (32 44 72 88 32)) |
g-interleave
integer list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | (g-interleave 2 '(a b c d e f g h i j k l)) --> ((a b) (b c) (c d) (d e) (e f) (f g) (g h) (h i) (i j) (j k) (k l)) (g-interleave 4 (g-integer 1 33)) --> ((1 2 3 4) (2 3 4 5) (3 4 5 6) (4 5 6 7) (5 6 7 8) (6 7 8 9) (7 8 9 10) (8 9 10 11) (9 10 11 12) (10 11 12 13) (11 12 13 14) (12 13 14 15) (13 14 15 16) (14 15 16 17) (15 16 17 18) (16 17 18 19) (17 18 19 20) (18 19 20 21) (19 20 21 22) (20 21 22 23) (21 22 23 24) (22 23 24 25) (23 24 25 26) (24 25 26 27) (25 26 27 28) (26 27 28 29) (27 28 29 30) (28 29 30 31) (29 30 31 32) (30 31 32 33)) |
g-repeat
repeat-n pattern
0 and 1 – no repeat
The repeat-n argument determine the length of the output.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | (g-repeat '(1 1 3 1 1) '(a b c d e f g)) --> ((a) (b) (c c c) (d) (e)) (g-repeat '(1 2 3 0 3 2 1) '(a b c d e f g)) --> ((a) (b b) (c c c) (d) (e e e) (f f) (g)) (g-repeat '(1 2 3 0 3 2 1) '(a b c)) --> ((a) (b b) (c c c) (a) (b b b) (c c) (a)) (setq lis-rep (g-repeat '(1 2 3 5 3 2 1) '((1) (2) (3 2) (4) (3) (2) (1)))) --> ((1) ((2) (2)) ((3 2) (3 2) (3 2)) ((4) (4) (4) (4) (4)) ((3) (3) (3)) ((2) (2)) (1)) (flatten-sublist lis-rep) --> ((1) (2) (2) (3 2) (3 2) (3 2) (4) (4) (4) (4) (4) (3) (3) (3) (2) (2) (1)) |
g-retrograd
(list)
1 2 3 4 5 | (g-retrograd '(0 1 2 3 4 5 6 7 8 9)) --> (9 8 7 6 5 4 3 2 1 0) (g-retrograd '((a b c d) (b c d e) (c d e f) (g h i j))) --> ((d c b a) (e d c b) (f e d c) (j i h g)) |
g-retrograd-section
section list
0-based
1 2 3 4 5 6 7 8 9 | (g-retrograd-section '(0 2) '((a b c d) (b c d e) (c d e f) (g h i j))) --> ((d c b a) (b c d e) (f e d c) (g h i j)) (g-retrograd-section '(0 2) '((1 2 3 4) (1 2 3 4) (1 2 3 4) (1 2 3 4))) --> ((4 3 2 1) (1 2 3 4) (4 3 2 1) (1 2 3 4)) |
g-reflect
type list
0-based
1 2 3 4 5 6 7 8 9 10 11 | (g-reflect 'nil '((a b c d) (b c d e) (c d e f) (g h i j))) --> ((a b c d c b a) (b c d e d c b) (c d e f e d c) (g h i j i h g)) (g-reflect 'butlast '((a b c d) (b c d e) (c d e f) (g h i j))) --> ((a b c d c b) (b c d e d c) (c d e f e d) (g h i j i h)) |
g-reflect-section
type section list
0-based
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | (g-reflect-section 'nil '(0 2) '((a b c d) (b c d e) (c d e f) (g h i j))) --> ((a b c d c b a) (b c d e) (c d e f e d c) (g h i j)) (g-reflect-section 'butlast '(0 2) '((a b c d) (b c d e) (c d e f) (g h i j))) --> ((a b c d c b) (b c d e) (c d e f e d) (g h i j)) |