Jump to content

AM

Members
  • Content Count

    598
  • Joined

  • Last visited

Everything posted by AM

  1. two functions i needed for working with POLYTEMPO-NETWORK http://philippekocher.ch/#109 http://polytempo.zhdk.ch greetings andré (defun length-to-decimal (alist &key (sum nil)) (let ((list (loop for i in (omn :length alist) collect (float (* i 4))))) (if (equal sum t) (sum list) list))) ;;; result: q = 1 / h. = 3 ...etc... (length-to-decimal '(h. h. 3q 5e 3h)) => (3.0 3.0 0.33333334 0.1 0.6666667) (length-to-decimal '(h. h. 3q 5e 3h) :sum t) => 7.1 (defun length-to-sec (alist tempo &key (sum nil))
  2. "I changed your keyword arguments to plain arguments, because in my code I retain keyword arguments for named optional arguments, but the arguments of this function are not optional (there is no default value)." sometimes i'm using keyword arguments for "better understandig"/legibility/overview of the function. but i see it's not "state of the art", thanks for the hint! :-)
  3. thanx!! you are totally right... i have documanted it in my OM-library (but not in the code) ...will answer you later... have also a look to: it's more useful for me grettings andré
  4. an output-seq of "a little stupid bot" (works with stochastic broken-symmetrical elements and PM..) - could produce for eternety (never ending)... it works and i am going for holidays now greetings andré
  5. AM

    AM

  6. hi wim, thank you for the link... also interesting are "non-trivial machines" (heinz von förster / radical constructivism): http://www.cybsoc.org/heinz.htm greetings andré
  7. that is clear to me ... I tried only to find out what the motivation / idea behind the question of WIM is.
  8. okay, i understand your wish... you would like to have some code which produces/composes a "nearly complete piece" for you - like a bot (for my own use i call this programs BOTS and code it by myself). such bots: a nightmare or a dream for a composer :-) some important books/links TORSTEN already listed. maybe we should not forget DAVID COPE - with his EMMY-things ... https://www.youtube.com/channel/UC2Ma0T4VZtmtB6kMmNw7QIA https://en.wikipedia.org/wiki/David_Cope p.s. i am not convinced of such "style exercises" (using TOOLS to imitate musical s
  9. could you tell me your exact definition/specification of OM-"out-of-the-box"-algorithms?
  10. (defun merge-voices** (seq &key insert bar/beat) (car (last (let ((bar) (beat) (distance)) (progn (setf bar (loop for i in bar/beat collect (car i)) beat (loop for j in bar/beat collect (cadr j))) (loop for ba in bar for be in beat for ins in insert with time-sign = (get-time-signature seq) with ord-time-sign = (get-time-signature seq) do (setf time-sign (if (listp (car time-sign)) (loop for i in time-sign
  11. i know POSITION-ATTRIBUTE, but the output-format seems to be a bit different. one of the "problems" for coding the function is to distinguish the "pattern-match" (=> multiple-values of pitches/lengths/... comibinations of these parameters) that's seems not very simple, single-values are okay... ...but at the moment i have other things to do (composing/playing), so it will take some time, but perhaps anyone else would create such a function (stéphane, thorsten..?)
  12. dear janusz what do you think about the idea(s) to work with "bar/beat" for post-processing the scores. i see that's - in my momentary work - very useful... for example: insert at bar/beat, cut-out bar/beat/span, overwrite bar/beat, pattern-matching bar/beat/span ... ? by the way i'm coding a little bit on a function which gets me the positions of perhaps a pattern-match (single values and patterns), in the format (bar (beat)), for example (1 (3 4)), but it's not so simple... (a lot of specialities, and i can't put it into ONE code) ... gree
  13. thanky you, stephane, i'll test it today!
  14. i would like to "structure" my user-library in "UTILITIES", there are so many functions in there so i would like to organize it more specific... like: PATTERN MATCHING SYMMETRIES EDITING SCORE etc... is there a possibility? thanx andré
  15. ;;; SPLITS CHORDS INTO APP/ACC ;;; SUB -> could be replaced by an original-OPMPO-function (defun omn-component-replace (omn-sequence replace-component) (make-omn :length (if (lengthp (car replace-component)) (append replace-component) (omn :length omn-sequence)) :pitch (if (or (pitchp (car replace-component)) (chordp (car replace-component))) (append replace-component) (omn :pitch omn-sequence)) :velocity (if (velocityp (car replace-component)) (append repl
  16. here is a function that can be used for "post-..." of an OMN score... you could INSERT a sequence by BAR/BEAT (a slightly modified variant of OVERWRITE), so you can place your insert exactly! greetings andré ;;; INSERTING (defun get-resolution2 (be) (cond ((member (cadr be) '(3 6 12 24 48)) 1/24) ((member (cadr be) '(1 2 4 8 16 32)) 1/16) ((member (cadr be) '(5 10 20 40)) 1/20) ((member (cadr be) '(7 14 28 56 1)) 1/28))) (defun insert (seq &key insert bar/beat) (car (last (le
  17. an "old user-function" from my library - just "habit", better with MEMBER. it's now replaced
  18. i think, it works like that :-) now, you could OVERWRITE you original OMN sequentially with inserts... (it's very useful for "post-production" of your generated score!). i have changed the input-format (bar/beat), and it also works with changing time-signatures... i know, janusz or the opmp-programmers could code it smarter, but my concept/code seems to work... so take it and optimize it!!! greetings andré p.s. when wil be approx. the release of vers 2 of OPMO? ;;; OVERWRITING (defun get-resolution2 (be) (cond ((member (cadr be) '(3 6 12 24
  19. EXAMPLE 3 -> inserts "by hand" ;;; ----------------------------------------------------------------------------- ;;; EXAMPLE 3 PLACING BY HAND AT BAR/BEAT ;;; ----------------------------------------------------------------------------- (init-seed 5) ;(init-seed (random 5)) ;;; GENERATING A "NONSENSE STRUCTURAL NET" (setf basic-mat (omn-to-time-signature (make-omn :pitch (integer-to-pitch (rnd-row)) :length (flatten (gen-mix (gen-length (gen-repeat 12 1) 1/16) (gen-length (mapcar
  20. ;;; ----------------------------------------------------------------------------- ;;; EXAMPLE -> an abstract example how it works (get-position/inserting-on-bar/beat*) ;;; ----------------------------------------------------------------------------- ;;; SUB (defun get-position (seq value &key (get 'all)) (let ((beat) (bar (car (loop for i in seq for bar = 1 then (incf bar) append (loop for j in (single-events i) when (pattern-matchp j (list value)) collect bar))))) (progn
  21. hi, yes - with this two functions (get-posititon & inserting-on-bar/beat*) you will have a lot of possibilities... 1) post-processing an OMN without changing the global time structure 2) working with "strukturnetze" (lachenmann) 3) countrepoints 4) idea of palimpsts .... ...so, perhaps OPMO could code it smarter then me (that's not complicated :-))? ... i try to do an example today with something like a "strukturnetz"
  22. ;;; gets the position => bar and beat where the value is ;;; => could be used in combination with "inserting-on-bar/beat*", ;;; if you are looking for a specific value to sprout a sequqnce ;;; FUNCTION (defun get-position (seq value &key (get 'all)) (let ((beat) (bar (car (loop for i in seq for bar = 1 then (incf bar) append (loop for j in (single-events i) when (pattern-matchp j (list value)) collect bar))))) (progn (setf beat (loop for k in (loop for i in (single-e
  23. hi all the following function could be usefull, it's a first sketch, but it seems to work.... if you want to INSERT a new OMN-seq, perhaps in bar 2 on the 3/20 in your BASIC-OMN-sequence... with this function you can do this, it will overwrite your original phrase. test it or tell me whatelse would be better... greetings andré ;;; ------------------------------------------------------------------------ ;;; INSERTING SEQ BY OVERWRITING ;;; ------------------------------------------------------------------------ ;;; SUB (defun get-resol
  24. why is such an overwrite-function so usefull.... (also with no PM or ...)?
×
×
  • Create New...