; OM File Header - Saved 2013/09/14 22:11:55 ; (6.070001 :patc (om-make-point 334 10) (om-make-point 271 166) (om-make-point 1234 621) "" 183 0 "2013/09/14 15:04:06" "2013/09/14 22:11:55") ; End File Header (in-package :om)(load-lib-for (quote nil))(setf *om-current-persistent* (om-load-patch1 "loop-ex" (quote ((om-load-boxcomment "comment" (om-make-point 251 88) (quote "If the constrainst are too strict (relations betwee the interval list, the initial pitch and the min/max limits) the loop may never terminate !$(in this case: cmd+A to abort)") "" (om-make-point 878 259) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcall (quote genfun) "DX->X" (quote dx->x) (quote ((om-load-inputfun (quote input-funbox) "a number" "START" 0) (om-load-inputfun (quote input-funbox) "a list of numbers" "LIST" (list 1 1)))) (om-make-point 715 374) nil nil nil nil 1) (om-load-editor-box1 "CHORD-SEQ" (quote chord-seq) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "pitches (mc): list or list of lists" "lmidic" (list 6000)) (om-load-inputfun (quote input-funbox) "onsets (ms): list" "lonset" (list 0 200)) (om-load-inputfun (quote input-funbox) "durations (ms): list or list of lists" "ldur" (list 1000)) (om-load-inputfun (quote input-funbox) "velocities (0-127): list or list of lists" "lvel" (list 100)) (om-load-inputfun (quote input-funbox) "offsets (ms): list or list of lists" "loffset" (list 0)) (om-load-inputfun (quote input-funbox) "MIDI channels (1-16): list or list of lists" "lchan" (list 1)) (om-load-inputfun (quote input-funbox) "relative chords duration (0-100)" "legato" 0))) (om-make-point 576 452) (om-make-point 450 107) (let ((newobj (when (find-class (quote chord-seq) nil) (make-instance (quote chord-seq) :lmidic (quote ((6500) (6100) (6600) (6800) (6100) (6300) (6800) (6100) (6200) (6400) (6600) (6800) (6100) (6600) (6700) (6800) (6100) (6200) (6300) (6800) (6100) (6300) (6400) (6000) (6800) (6400) (6000) (6800) (6100) (6200) (6300))) :lonset (quote (0 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 3200 3400 3600 3800 4000 4200 4400 4600 4800 5000 5200 5400 5600 5800 6000 7000)) :ldur (quote ((1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000))) :lvel (quote ((100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100))) :loffset (quote ((0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0))) :lchan (quote ((1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1))) :legato 0)))) (load-port-info newobj (quote ((0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0)))) (init-mus-color newobj (quote nil)) (set-extra-pairs newobj (quote nil)) (set-patch-pairs newobj (quote nil)) (set-name newobj nil) (set-tonalite newobj nil) newobj) nil nil (pairlis (quote (approx fontsize staff cmnpref deltapict outport inport player zoom notechancolor? grillestep mode winsize winpos score-mode obj-mode cursor-mode show-stems scale)) (list 2 24 (quote g) (let ((newobj (make-instance (quote edition-values)))) (setf (paper-size newobj) (om-make-point 600 800)) (setf (top-margin newobj) 2) (setf (left-margin newobj) 1) (setf (right-margin newobj) 1) (setf (bottom-margin newobj) 1) (setf (orientation newobj) nil) (setf (scale newobj) nil) (setf (system-space newobj) (quote (1))) (setf (system-color newobj) (quote nil)) (setf (line-space newobj) 1) (setf (title newobj) nil) (setf (show-title? newobj) nil) (setf (show-page? newobj) nil) (setf (sheet-id newobj) nil) (setf (page-mode newobj) nil) newobj) (om-make-point 0 0) nil 0 (quote :midishare) 47/50 nil 1000 0 (om-make-point 604 237) (om-make-point 407 670) 0 1 (quote :normal) (quote t) nil)) t nil nil nil) (om-load-boxcomment "comment" (om-make-point 158 77) (quote "There exist other ways of doing this... find the one who best suits your needs !") "" (om-make-point 1042 459) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 104 61) (quote "One possible solution using OMLoop:") "" (om-make-point 691 150) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 175 61) (quote "We now want to restrict the sequence to a specific pitch domain...") "" (om-make-point 694 41) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 157 114) (quote "This program generates a random sequence of n notes starting from a given pitch and using only a given set of intervals...") nil (om-make-point 31 11) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:italic)) :mode (quote nil))) (om-load-boxwithed1 (quote box-with-win) "OMLOOP" (quote omloop) (quote ((om-load-inputfun (quote input-funbox) "" "intervals" nil) (om-load-inputfun (quote input-funbox) "" "start-pitch" nil) (om-load-inputfun (quote input-funbox) "" "length" nil) (om-load-inputfun (quote input-funbox) "" "min" nil) (om-load-inputfun (quote input-funbox) "" "max" nil))) (om-make-point 649 294) (om-make-point 197 63) nil nil (list (om-load-boxcomment "comment" (om-make-point 114 70) (quote "When the iteration stops, return the list of intervals") "" (om-make-point 680 309) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 154 62) (quote "Continue while the list of intervals is under the desired length") "" (om-make-point 617 501) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 141 74) (quote "If the test is TRUE, we collect this new interval (beware of the eval-once mode!)") "" (om-make-point 363 492) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 106 62) (quote "dx->x gives us the list of pitches so far") "" (om-make-point 290 343) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 165 111) (quote "At each iteration, we pick a random interval and text if this interval + the last value of the current sequence so far is between the min/max limits") "" (om-make-point 16 367) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 70 34) (quote "OMAND") "" (om-make-point 69 624) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 126 34) (quote "<= eval-once !!") "" (om-make-point 106 149) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcall (quote genfun) "DX->X" (quote dx->x) (quote ((om-load-inputfun (quote input-funbox) "a number" "START" 0) (om-load-inputfun (quote input-funbox) "a list of numbers" "LIST" (list 1 1)))) (om-make-point 244 360) nil nil nil nil 1) (om-load-boxcall (quote genfun) "OMIF" (quote omif) (quote ((om-load-inputfun (quote input-funbox) "IF" "TEST" nil) (om-load-inputfun (quote input-funbox) "THEN" "ACTION" nil))) (om-make-point 301 674) (om-make-point 81 61) nil nil nil 1) (om-load-boxcall (quote genfun) "OM>=" (quote om>=) (quote ((om-load-inputfun (quote input-funbox) "a number" "NUM1" 0) (om-load-inputfun (quote input-funbox) "a number" "NUM2" 1))) (om-make-point 252 567) nil nil nil nil 1) (om-load-boxcall (quote genfun) "OM<=" (quote om<=) (quote ((om-load-inputfun (quote input-funbox) "a number" "NUM1" 0) (om-load-inputfun (quote input-funbox) "a number" "NUM2" 1))) (om-make-point 100 567) nil nil nil nil 1) (om-load-boxcall (quote genfun) "OMAND" (quote omand) (quote ((om-load-inputfun (quote input-funbox) "something" "SELF" nil) (om-load-inputfun (quote input-funbox) "other things" "REST" nil))) (om-make-point 141 621) (om-make-point 80 35) nil nil nil 1) (om-load-boxcall (quote genfun) "OM+" (quote om+) (quote ((om-load-inputfun (quote input-funbox) "number or list" "ARG1" 0) (om-load-inputfun (quote input-funbox) "number or list" "ARG2" 0))) (om-make-point 197 500) nil nil nil nil 1) (om-load-boxcall (quote genfun) "LAST-ELEM" (quote last-elem) (quote ((om-load-inputfun (quote input-funbox) "a list" "LIST" nil))) (om-make-point 232 432) nil nil nil nil 1) (om-load-boxcall (quote genfun) "NTH-RANDOM" (quote nth-random) (quote ((om-load-inputfun (quote input-funbox) "a list" "LIST" nil))) (om-make-point 31 145) nil nil "&" nil 1) (om-load-boxcall (quote genfun) "OM<" (quote om<) (quote ((om-load-inputfun (quote input-funbox) "a number" "NUM1" 0) (om-load-inputfun (quote input-funbox) "a number" "NUM2" 1))) (om-make-point 563 499) (om-make-point 42 35) nil nil nil 1) (om-load-boxcall (quote lispfun) "LENGTH 2" (quote length) (quote ((om-load-inputfun (quote input-funbox) "SEQUENCE" "SEQUENCE" nil))) (om-make-point 531 417) nil nil nil nil 1) (om-load-boxcall (quote genfun) "collect" (quote listing) (quote ((om-load-inputfun (quote input-funbox) "anything" "DATA" nil))) (om-make-point 449 219) (om-make-point 126 63) nil nil nil 3) (om-load-boxcall (quote genfun) "while" (quote whileloop) (quote ((om-load-inputfun (quote input-funbox) "condition" "EXPR" nil))) (om-make-point 550 550) nil nil nil nil 0) (om-load-boxin "max" 4 (om-make-point 101 482) "" "max" nil nil) (om-load-boxin "min" 3 (om-make-point 277 499) "" "min" nil nil) (om-load-boxin "length" 2 (om-make-point 590 422) "" "length" nil nil) (om-load-boxin "start-pitch" 1 (om-make-point 198 284) "" "start-pitch" nil nil) (om-load-boxin "intervals" 0 (om-make-point 43 77) "" "intervals" nil nil) (om-load-seqbox "finally" (quote finaldo) (quote ((om-load-inputfun (quote input-funbox) "value to return" "VAL" nil))) (om-make-point 635 319) nil nil nil 0) (om-load-seqbox "eachTime" (quote loopdo) (quote ((om-load-inputfun (quote input-funbox) "operations to do" "OP" nil))) (om-make-point 307 741) nil nil nil 0)) (quote ((22 0 7 0 nil 0) (17 1 7 1 nil 0) (11 0 8 0 nil 0) (17 0 8 1 nil 0) (12 0 9 0 nil 0) (20 0 9 1 nil 0) (12 0 10 0 nil 0) (19 0 10 1 nil 0) (10 0 11 0 nil 0) (9 0 11 1 nil 0) (14 0 12 0 nil 0) (13 0 12 1 nil 0) (7 0 13 0 nil 0) (23 0 14 0 nil 0) (16 0 15 0 nil 0) (21 0 15 1 nil 0) (17 1 16 0 nil 0) (14 0 17 0 nil 0) (15 0 18 0 nil 0) (17 1 24 0 nil 0) (8 0 25 0 nil 0))) 1 "omloop" nil) (om-load-boxcomment "comment" (om-make-point 106 30) (quote "min/max limits") "" (om-make-point 766 219) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcall (quote bastype) "list 3" (quote list) (quote nil) (om-make-point 812 253) (om-make-point 52 34) 6800 "6800" nil) (om-load-boxcall (quote bastype) "list 3" (quote list) (quote nil) (om-make-point 757 253) (om-make-point 52 34) 6000 "6000" nil) (om-load-editor-box1 "CHORD-SEQ" (quote chord-seq) (quote ((om-load-inputfun (quote input-funbox) "object" "self" nil) (om-load-inputfun (quote input-funbox) "pitches (mc): list or list of lists" "lmidic" (list 6000)) (om-load-inputfun (quote input-funbox) "onsets (ms): list" "lonset" (list 0 200)) (om-load-inputfun (quote input-funbox) "durations (ms): list or list of lists" "ldur" (list 1000)) (om-load-inputfun (quote input-funbox) "velocities (0-127): list or list of lists" "lvel" (list 100)) (om-load-inputfun (quote input-funbox) "offsets (ms): list or list of lists" "loffset" (list 0)) (om-load-inputfun (quote input-funbox) "MIDI channels (1-16): list or list of lists" "lchan" (list 1)) (om-load-inputfun (quote input-funbox) "relative chords duration (0-100)" "legato" 0))) (om-make-point 55 443) (om-make-point 450 107) (let ((newobj (when (find-class (quote chord-seq) nil) (make-instance (quote chord-seq) :lmidic (quote ((6500) (7000) (7500) (7600) (6900) (6500) (7300) (6600) (6700) (7500) (8000) (7600) (8100) (8200) (8700) (8800) (8400) (7700) (7300) (7800) (8600) (7900) (8000) (7600) (7200) (7300) (8100) (8200) (7500) (7700) (7300))) :lonset (quote (0 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 3200 3400 3600 3800 4000 4200 4400 4600 4800 5000 5200 5400 5600 5800 6000 7000)) :ldur (quote ((1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000) (1000))) :lvel (quote ((100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100) (100))) :loffset (quote ((0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0))) :lchan (quote ((1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1))) :legato 0)))) (load-port-info newobj (quote ((0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0) (0)))) (init-mus-color newobj (quote nil)) (set-extra-pairs newobj (quote nil)) (set-patch-pairs newobj (quote nil)) (set-name newobj nil) (set-tonalite newobj nil) newobj) nil nil (pairlis (quote (approx fontsize staff cmnpref deltapict outport inport player zoom notechancolor? grillestep mode winsize winpos score-mode obj-mode cursor-mode show-stems scale)) (list 2 24 (quote g) (let ((newobj (make-instance (quote edition-values)))) (setf (paper-size newobj) (om-make-point 600 800)) (setf (top-margin newobj) 2) (setf (left-margin newobj) 1) (setf (right-margin newobj) 1) (setf (bottom-margin newobj) 1) (setf (orientation newobj) nil) (setf (scale newobj) nil) (setf (system-space newobj) (quote (1))) (setf (system-color newobj) (quote nil)) (setf (line-space newobj) 1) (setf (title newobj) nil) (setf (show-title? newobj) nil) (setf (show-page? newobj) nil) (setf (sheet-id newobj) nil) (setf (page-mode newobj) nil) newobj) (om-make-point 0 0) nil 0 (quote :midishare) 47/50 nil 1000 0 (om-make-point 604 237) (om-make-point 407 670) 0 1 (quote :normal) (quote t) nil)) t nil nil nil) (om-load-boxcall (quote genfun) "DX->X" (quote dx->x) (quote ((om-load-inputfun (quote input-funbox) "a number" "START" 0) (om-load-inputfun (quote input-funbox) "a list of numbers" "LIST" (list 1 1)))) (om-make-point 386 363) nil nil nil nil 1) (om-load-boxcall (quote genfun) "NTH-RANDOM" (quote nth-random) (quote ((om-load-inputfun (quote input-funbox) "a list" "LIST" nil))) (om-make-point 235 209) nil nil nil nil 1) (om-load-boxcall (quote genfun) "REPEAT-N" (quote repeat-n) (quote ((om-load-inputfun (quote input-funbox) "something" "SELF" nil) (om-load-inputfun (quote input-funbox) "times" "N" 0))) (om-make-point 300 292) nil nil nil nil 1) (om-load-boxcall (quote bastype) "aux" (quote t) (quote nil) (om-make-point 341 116) (om-make-point 47 38) 100 "100" nil) (om-load-boxcall (quote genfun) "OM*" (quote om*) (quote ((om-load-inputfun (quote input-funbox) "number or list" "ARG1" 0) (om-load-inputfun (quote input-funbox) "number or list" "ARG2" 0))) (om-make-point 311 153) (om-make-point 50 35) nil nil nil 1) (om-load-boxcall (quote bastype) "list 3" (quote list) (quote nil) (om-make-point 415 114) (om-make-point 39 37) 30 "30" nil) (om-load-boxcomment "comment" (om-make-point 25 30) (quote "N") "" (om-make-point 421 80) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcall (quote bastype) "list 2" (quote list) (quote nil) (om-make-point 377 255) (om-make-point 52 34) 6500 "6500" nil) (om-load-boxcomment "comment" (om-make-point 133 34) (quote "starting pitch") "" (om-make-point 429 252) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcomment "comment" (om-make-point 133 34) (quote "allowed intervals") "" (om-make-point 251 45) nil (om-make-color 0 0 0) (om-make-font "Verdana" 12.0 :family "Verdana" :style (quote (:plain)) :mode (quote nil))) (om-load-boxcall (quote bastype) "list" (quote list) (quote nil) (om-make-point 252 78) (om-make-point 108 34) (list 1 2 5 -4 8 -7) "(1 2 5 -4 8 -7)" nil))) (quote ((19 0 1 0 nil 0) (7 0 1 1 nil 0) (1 0 2 1 nil 0) (16 0 7 0 nil 0) (19 0 7 1 nil 0) (17 0 7 2 nil 0) (10 0 7 3 nil 0) (9 0 7 4 nil 0) (12 0 11 1 nil 0) (19 0 12 0 nil 0) (14 0 12 1 nil 0) (16 0 13 0 nil 0) (13 0 14 0 nil 0) (17 0 14 1 nil 0) (22 0 16 0 nil 0) (15 0 16 1 nil 0))) nil 6.070001))