opmo Posted January 10, 2017 Share Posted January 10, 2017 New: passing-intervals map sequence &key chord flat section exclude seed omn [Function] Arguments and Values: map list of integers (<interval> <steps>). sequence a sequence (omn-form list). chord NIL or T (includes or excludes chords from processing). The default is NIL. flat NIL or T. The default is NIL. section an integer or list of integers. Selected list or lists to process. The default is NIL. exclude an integer or list of integers. Excluded list or lists from process. The default is NIL. omn NIL or T. If true force OMN style output. The default is NIL. seed NIL or an integer. The default is NIL. Description: The function PASSING-INTERVALS inserts a set of steps (intervals) between given intervals and divides the length value by the number of the added steps. The length span of the output is unchanged. (setf omn1 '(q c4 d4 c4)) omn1 intervals: (2 -2) (passing-intervals '((2 (1 1)) (-2 (-1 -1))) omn1) => (e c4 mf cs4 d4 cs4 q c4) (setf omn2 '(q c4 d4 d4f4 g4)) omn2 intervals: (2 (0 3) 2) (passing-intervals '((2 (1 1)) (-2 (-1 -1)) (3 (1 1 1))) omn2) => (e c4 mf cs4 q d4 d4f4 g4) To add chords to the process we set the keyword :chord to T (passing-intervals '((2 (1 1)) (-2 (-1 -1)) (3 (1 1 1))) omn2 :chord t) => (e c4 mf cs4 q d4 e d4f4 fs4 q g4) Example: (setf map1 '((2 (1 1)) (-2 (-1 -1)) (3 (1 1 1)))) (setf sequence1 '(q c4 e4 g4 c5)) (passing-intervals map1 sequence1) => (q c4 mf 3q e4 f4 fs4 q g4 c5) Example with sublists: (setf sequence2 '((q gs4 gs4 f4 f4) (q d4 f4 b4 d5) (q f5 e5 gs4 e5) (q b4 d5 e5 f5) (q g5 e5 e5 e5) (h d5 gs4))) (passing-intervals map1 sequence2) => ((q gs4 mf gs4 f4 f4) (3q d4 mf eb4 e4 q f4 3q b4 c5 cs5 q d5) (q f5 mf e5 gs4 e5) (3q b4 mf c5 cs5 e d5 eb5 q e5 f5) (q g5 mf e5 e5 e5) (h d5 mf gs4)) To make the sublists into one continuing list (internally) we set the keyword :flat to T. (passing-intervals map1 sequence2 :flat t) => ((q gs4 mf gs4 f4 f4) (3q d4 eb4 e4 q f4 3q b4 c5 cs5 d5 eb5 e5) (q f5 e5 gs4 e5) (3q b4 c5 cs5 e d5 eb5 q e5 e f5 fs5) (q g5 e5 e5 e e eb5) (h d5 gs4)) (setf map2 '((2 (1 1)) (-2 (-1 -1)) (3 (1 1 1)) (4 (1 1 1 1)))) (setf sequence3 '(q bb3 a3 g3 a3c4f4 a4 bb4 c5 b4 c5d5eb5 f5 eb5 d5 c5)) (omn-to-time-signature (passing-intervals map2 sequence3) '(4 4)) => ((q bb3 mf e a3 gs3 g3 gs3 q a3c4f4) (q a4 e bb4 b4 q c5 b4) (q c5d5eb5 e f5 e5 q eb5 e d5 cs5) (q c5)) (passing-intervals map2 sequence3 :chord t) => ((q bb3 mf e a3 gs3 g3 gs3 s a3c4f4 fs4 g4 gs4) (q a4 e bb4 b4 q c5 b4) (e c5d5eb5 e5 f5 e5 q eb5 e d5 cs5) (q c5)) (setf sequence4 '((q c4 d4 e4 fs4 e a4 c5 q ds5 cs5) (q cs5 ds5 c5 a4 e fs4 e4 q d4 c4))) In the example below we use nested step sets. The interval 2 has two sets of steps and the interval 3 has four sets of steps to choose from. The step set is selected at random. (setf map4 '((-2 (1 1)) (2 (-1 -1) (-1 1 1)) (3 (1 1 1) (-1 -1 -1) (2 1) (1 2)))) (passing-intervals map4 sequence4 :seed 23) => ((3q c4 mf b3 c4 cs4 c4 cs4 e d4 cs4 c4 cs4 s eb4 e4 3e fs4 f4 e4 e eb4 e4 q f4) (3q cs5 mf c5 cs5 q d5 b4 gs4 s f4 fs4 g4 gs4 e a4 bb4 q b4)) (setf map5 '((-11 (6 -11) (-1 -1 -1 -1)) (-5 (1 1) (-1 1) (6 -11) (-1 -1 -1 -1)) (3 (1 2 1) (2 2 2) (2 1) (1 2 2 2)) (-3 (-1 -1 11) (2 2 2) (2 1) (1 2 2 2)) (20 (13 -11 13 -11)))) (setf sequence5 '((q f4 cs6 gs7 b7) (q c7 bb3 g3 e2) (e a0 fs4 d6 eb6))) (passing-intervals map5 sequence5 :flat t :seed 246) => ((s f4 mf fs5 g4 gs5 q a4 s e6 f6 g6 a6 b6 bb6 a6 gs6) (q g6 3q f3 e3 eb3 q d4 b2) (e e1 t cs5 d6 eb5 e6 e f5 fs5)) Stephane Boussuge 1 Link to comment Share on other sites More sharing options...
Recommended Posts