Jump to content

AM

Members
  • Joined

  • Last visited

Everything posted by AM

  1. just a snippet... how i/you can use OPMO for some other things (TIME LAPS test mode, just to see if my code is working correctly). i like the openness of the system. Bildschirmaufnahme 2023-08-30 um 23.09.15.mov
  2. okay, then i will try again 😁
  3. Practical Common Lisp GIGAMONKEYS.COM
  4. funny 😄 but of course it is far far away from bach or a choral harmonization I think there are various difficulties, on the one hand whether chatGPT finds enough information on the net about the harmonization of chorales and probably far too little about OPUSMODUS and LISP. chatGPT doesn't really manage to program usefully in LISP (e.g. I tested sorting algorithms), but chatGPT explained to me extensively how the resulting code works, but it was always full of errorr/bugs. never worked, not fixable either. there is simply still a large amount of data missing for the system. But of course I'm not a specialist, I just tried it (chatGPT) out in an amateurish way
  5. thanx! this software is such a great tool!!!
  6. was it not like...? (rnd-sample-seq 2 '(1 2 3 4 5)) => (1 2) => (3 4) (rnd-sample-seq 3 '(1 2 3 4 5)) => (2 3 4) => (3 4 5)
  7. what is the new name of the function "rnd-sample-seq" thanx for a quick help! andré
  8. i like the concept of "brownian bridge" to produce complex curves from a to b, but not completely randomized or controlled. in the video you see all the generations for one evaluation... how it could sound - mapped on different tonalities Brownsche Brücke – Wikipedia DE.WIKIPEDIA.ORG for understanding in OPMO: axiom: start end (50 23) gen1 => 1 step (50 8 23) gen2 => 3 steps (50 15 8 -3 23) gen3 => 7 steps (50 40 15 13 8 -14 -3 29 23) gen4 => 15 steps (50 58 40 33 15 22 13 4 8 4 -14 -16 -3 17 29 17 23) ...and so on ------------------------------------------------------------------------------- some evaluations with same AXIOM: Bildschirmaufnahme 2023-07-08 um 11.09.51.mov ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; BROWNIAN BRIDGE -> could be use as a rnd-process from A to B (integers or pitches) ;;; if you have a look to example with ":all-gen t", you will see the process with all generations, how it works ;;; or take a look to: ;;; https://de.wikipedia.org/wiki/Wiener-Prozess#/media/File:BrownscheBewegung.png ;;; https://de.wikipedia.org/wiki/Brownsche_Brücke ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; SUB (defun pick (a b &key (span 5)) (let ((rnd1 (car (rnd-number 1 (+ a span) (- a span)))) (rnd2 (car (rnd-number 1 (+ b span) (- b span)))) (n)) (progn (setf n (car (rnd-number 1 rnd1 rnd2))) (if (or (= n a) (= n b)) (+ (rnd-pick '(1 -1)) n) n)))) (pick 2 3) ;;; MAIN ;;; MAIN (defun gen-brownian-bridge (n startend &key (all-gen nil) (output 'integer) (span 5)) (let ((seq)) (progn (setf seq (append (list startend) (loop repeat n with liste = startend do (setf liste (filter-repeat 1 (loop repeat (1- (length liste)) for cnt = 0 then (incf cnt) append (append (list (nth cnt liste) (pick (nth cnt liste) (nth (1+ cnt) liste) :span span) (nth (1+ cnt) liste)))))) collect liste))) (setf seq (if (equal all-gen t) seq (car (last seq)))) (if (equal output 'pitch) (integer-to-pitch seq) seq)))) ;;; EXAMPLES ;; SPAN influence -> span 2 (loop repeat 20 do (list-plot (gen-brownian-bridge 5 '(1.2 5.4) :span 2 :all-gen t) :zero-based t :point-radius 3 :join-points t) do (sleep 2)) ;; SPAN influence -> span 10 (list-plot (gen-brownian-bridge 5 '(50 23) :span 20 :all-gen t) :zero-based t :point-radius 3 :join-points t) ;;; SPAN default (5) (list-plot (gen-brownian-bridge 5 '(50 23) :all-gen t) :zero-based t :point-radius 3 :join-points t) (list-plot (gen-brownian-bridge 5 '(50 23)) :zero-based t :point-radius 3 :join-points t) (gen-brownian-bridge 5 '(50 23) :all-gen t :output 'pitch) (gen-brownian-bridge 5 '(50 23) :output 'pitch)
  9. ;;; quick-function (defun make-seq (&key (prob 0.5) (possible-pitches (make-scale 'c4 11))) ;; prob = length/rest-weight (make-omn :pitch (rnd-sample 10 possible-pitches) :length (gen-length (loop for i in (rnd-sum-to-size 20 10 '(1 2 3 4 5)) collect (if (probp prob) (* -1 i) i)) '1/16) :span :length)) ;;; EVAL (make-seq) (make-seq :possible-pitches (midi-to-pitch (gen-integer 10 110))) ;; with rnd-pitches of course... with 60bpm
  10. ....or use some technology 😉 https://polytempo.zhdk.ch Dirigierende Maschinen WWW.TRANSCRIPT-VERLAG.DE Eine musik- und technikgeschichtliche Abhandlung zur musikalischen Aufführungspraxis mit technischer Tempovermittlung.
  11. AM posted a topic in Function Examples
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; subfunction (defun reset-integer-sequence (alist &key (offset 0) (flatten nil)) (let ((min (find-min (flatten alist)))) (progn (setf alist (cond ((listp (car alist)) (loop for j in alist collect (loop for i in j collect (+ (- i min) offset)))) (t (loop for i in alist collect (+ (- i min) offset))))) (if (equal flatten t) (flatten alist) alist)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; check it out ;; command-1 (list-plot (length-staccato (gen-length (reset-integer-sequence (ffth 6 0.075 (x-b (rnd-order '(44 52 22 23 13 44 68 6 22 9 73 28 68)) 3) :type 'integer)) 1/64) :value 1/64) :point-radius 2 :join-points t) (list-plot (length-staccato (gen-length (reset-integer-sequence (ffth 4 0.075 (x-b (rnd-order '(44 52 22 23 13 44 68 6 22 9 73 28 68)) 3) :type 'integer)) 1/64) :value 1/64) :point-radius 2 :join-points t) with 4 voices.... eval -> (command-3) (defun reset-integer-sequence (alist &key (offset 0) (flatten nil)) (let ((min (find-min (flatten alist)))) (progn (setf alist (cond ((listp (car alist)) (loop for j in alist collect (loop for i in j collect (+ (- i min) offset)))) (t (loop for i in alist collect (+ (- i min) offset))))) (if (equal flatten t) (flatten alist) alist)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setf s1 (make-omn :pitch '(c1) :length (length-staccato (gen-length (reset-integer-sequence (ffth 6 0.075 (x-b (rnd-order '(44 52 22 23 68 6 22 9 73 28 68)) 3) :type 'integer) :offset 4) 1/64) :value 1/32)) s2 (make-omn :pitch '(cs4) :length (length-staccato (gen-length (reset-integer-sequence (ffth 6 0.075 (x-b (rnd-order '(44 52 22 23 13 44 68 9 73 28 68)) 3) :type 'integer) :offset 4) 1/64) :value 1/32)) s3 (make-omn :pitch '(d5) :length (length-staccato (gen-length (reset-integer-sequence (ffth 6 0.075 (x-b (rnd-order '(44 52 22 23 68 6 22 9 73 28 68)) 3) :type 'integer) :offset 4) 1/64) :value 1/32)) s4 (make-omn :pitch '(ds7) :length (length-staccato (gen-length (reset-integer-sequence (ffth 6 0.075 (x-b (rnd-order '(44 52 22 23 68 6 22 9 73 28 68)) 3) :type 'integer) :offset 4) 1/64) :value 1/32))) (omn-to-time-signature (merge-voices s1 s2 s3 s4) '(4 4))
  12. @opmo: are there any plans for that?
  13. great! (progn (setf r1 (gen-length '(11 13 7 17 13 11 17 23 19 2 17 5) 1/20)) (setf r2 (gen-length '(11 13 7 17 13 11) 1/8)) (unify-rhythms r1 r2))
  14. oh, thx, did not know, that APPLY works on functions "first to the remaining arguments."!
  15. if i understand you correctly.... you could COMPILE the score - and with :next-index t - you can keep all the versions (compile-score 'myscore :file "My Score" :new-index t) "If :new-index is including as an argument the composer is able to collect as saved named incremented files compilation after compilation. This can be invaluable if the score has lots of randomised possibilities that need to be explored and compared to find the 'best version'."
  16. some "ugly code" ...but it works.... 😃 you want to use (merge-voices) with ONE list as input? (setf test '((w c2) (h c4 d4) (q g5 g5 g5 g5))) (defun your-merge-voices (alist) (merge-voices (first alist) (second alist) (third alist) (fourth alist) (fifth alist))) (your-merge-voices test)
  17. I would be very interested in it, since the interface over Midi is far too imprecise for reasonably complex rhythms, maybe an interface via Musicxml would be better?
  18. AM replied to AM's topic in OMN Lingo
    if you adapt the code for LISPWORKS... could work like that
  19. AM replied to AM's topic in Function Examples
    only trust your own code 😉
  20. AM replied to AM's topic in Function Examples
    "program me a sorting algorithm in common lisp, which shows me all sorting cycles. Input: list of values. Output: all cycles of the sorting process." interesting! ChatGPT tells me how the code works, but it has a BUG 😀 doesn't work Bildschirmaufnahme 2023-03-18 um 14.33.32.mov
  21. Bildschirmaufnahme 2023-03-18 um 14.05.56.mov OPMO
  22. different approach... (pitch-to-interval '(c4d4e4f6)) => intervals between neighbours (get-all-intervals '(c4d4e4f6)) => all intervals INSIDE the chord (between all pitches)
  23. just tried in 3min. ouput correct or perhaps some BUGs in thinking? 😁 greetings andré (defun get-all-intervals (alist) (let ((alist (sort-asc (flatten (pitch-to-midi (if (chordp alist) (melodize alist) alist)))))) (rest (sort-asc (remove-duplicates (loop repeat (length alist) for cnt = 0 then (incf cnt) append (x-b (filter-last (- (length alist) cnt) alist) (nth cnt alist)))))))) (get-all-intervals '(c4 d4 e4)) => (2 4) (get-all-intervals '(c4d4e4f6)) => (2 4 25 27 29)

Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy