Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 09/23/2018 in Posts

  1. 5 points
    opmo

    Circle-Pitch-Plot

    A new CIRCLE-PITCH-PLOT function (examples below) will be part of the forthcoming Opusmodus 1.3. The function CIRCLE-PIOTCH-PLOT returns a geometrical representation of relationships among the 12 pitch classes of the chromatic scale in pitch class space and provides an easy way to identify patterns and similarities between harmonic structures. Clockwise motion represents ascending pitch motion, and counterclockwise motion represents descending pitch motion. Examples: Major Triad (circle-pitch-plot '(c4e4g4)) Minor Triad (circle-pitch-plot '(c4f4ab4)) Augmented Triad (circle-pitch-plot '(c4e4gs4)) All 4 augmented triads (circle-pitch-plot '(c4e4gs4 db4f4a4 d4fs4bb4 eb4g4b4)) With :style :fill (circle-pitch-plot '(c4e4gs4 db4f4a4 d4fs4bb4 eb4g4b4) :style :fill) Example with chord names. Fully-Diminished 7th Chord (circle-pitch-plot 'dim7) All 3 fully-diminished 7th chords (circle-pitch-plot '((c4 dim7) (cs4 dim7) (d4 dim7))) Whole-Tone Scale (circle-pitch-plot '(0 2 4 6 8 10)) The complex of 2 Whole-Tone Scale (circle-pitch-plot '((0 2 4 6 8 10) (1 3 5 7 9 11)) :style :fill) Chromatic Scale (circle-pitch-plot 'chromatic :point-radius 4) The complex of 6 tritones (circle-pitch-plot '((0 6) (1 7) (2 8) (3 9) (4 10) (5 11)) :point-radius 4) Tonalities (circle-pitch-plot 'mixolydian-greek :point-radius 4) (circle-pitch-plot 'bartok :point-radius 4) (circle-pitch-plot 'messiaen-mode3 :point-radius 4) (circle-pitch-plot 'hyojo :point-radius 4) Contrary Motion (circle-pitch-plot '(0 1 11 2 10 3 9 4 8 5 7 6) :sort nil :join-first nil) (circle-pitch-plot '((0 1) (0 2) (0 3) (0 4) (0 5) (0 6) (0 7) (0 8) (0 9) (0 10) (0 11)) :point-radius 4) Example with Forte notation (circle-pitch-plot '(6-32 6-7)) Example with omn-form sequence and :type :pitches (circle-pitch-plot '(((leg s g2 p dbow+sul d3 sul b3 dig1 a3 b3 d3 b3 d3) (leg g2 d3 b3 a3 b3 d3 b3 d3))) :type :pitches) Circle types (circle-pitch-plot '((4 9 11) (3 5 10) (0 3 6 9)) :style :fill) (circle-pitch-plot '((4 9 11) (3 5 10) (0 3 6 9)) :type :pitches :style :fill) (circle-pitch-plot '((4 9 11) (3 5 10) (0 3 6 9)) :type :fifths :style :fill) Examples with :sort and :remove-duplicates set to nil (circle-pitch-plot '(0 2 6 0 3 7 0 4 8)) (circle-pitch-plot '(0 2 6 0 3 7 0 4 8) :sort nil) (circle-pitch-plot '(0 2 6 0 3 7 0 4 8) :sort nil :remove-duplicates nil) (circle-pitch-plot '(0 2 6 0 3 7 0 4 8) :sort nil :remove-duplicates nil :join-first nil) (circle-pitch-plot '(8 4 2 0 10 2 8 10 4 6 8) :sort nil :remove-duplicates nil) Best wishes, Janusz
  2. 4 points
    opmo

    Circle-Pitch-Plot

    (-e e q e q e) (e q e q q)
  3. 3 points
    AM

    count-up/down

    use it or not... greetings andré ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; count-up/down => not well coded but it works ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; A FUNCTION which counts a integer-list from its values (individual) ;;; to value B (all the same end-value :to (default is 1)) ;;; n => how many output values (approx: depends on input/round... was not important for my project) ;;; up or down (default is 'down) ;;; with variabel STEPS => sequencieally (horizontal) or with steps for each value individiual (vertical) ;;; with COUNT => means how many lists with same values (like "global-steps") ;;; SUB (defun round-to (number precision &optional (what #'round)) (let ((div (expt 10 precision))) (/ (funcall what (* number div)) div))) ;;; MAIN (defun count-up/down (n intlist &key (steps '(1)) (count 1) (type 'horizontal) (direction 'down) (to 1)) (let* ((cycles (round-to (/ (1- n) (length intlist)) 0)) (intlists (cond ((equal type 'horizontal) (loop repeat cycles for cnt = 0 then (incf cnt) for stp in (if (< (length steps) cycles) (filter-first cycles (flatten (gen-repeat cycles steps))) steps) when (= cnt 0) append (loop repeat count collect intlist) when (integerp (/ cnt count)) collect (setf intlist (if (equal direction 'down) (loop for i in intlist when (>= (- i stp) to) collect (- i stp) else collect to) (loop for i in intlist when (<= (+ i stp) to) collect (+ i stp) else collect to))) else collect intlist)) ((equal type 'vertical) (loop repeat cycles for cnt = 0 then (incf cnt) when (= cnt 0) append (loop repeat count collect intlist) when (integerp (/ cnt count)) collect (setf intlist (if (equal direction 'down) (loop for i in intlist for stp in steps when (>= (- i stp) to) collect (- i stp) else collect to) (loop for i in intlist for stp in steps when (<= (+ i stp) to) collect (+ i stp) else collect to))) else collect intlist))))) (loop repeat cycles for x in intlists collect x))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; SIMPLE EXAMPLES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (list-plot (flatten (count-up/down 100 '(9 8 7 6 7 9 8 7 6 7) :to 3 :direction 'down)) :join-points t) => ((9 8 7 6 7 9 8 7 6 7) (8 7 6 5 6 8 7 6 5 6) (7 6 5 4 5 7 6 5 4 5) (6 5 4 3 4 6 5 4 3 4) (5 4 3 3 3 5 4 3 3 3) (4 3 3 3 3 4 3 3 3 3) (3 3 3 3 3 3 3 3 3 3) (3 3 3 3 3 3 3 3 3 3) (3 3 3 3 3 3 3 3 3 3) (3 3 3 3 3 3 3 3 3 3)) (list-plot (flatten (count-up/down 100 '(9 8 7 6 7 9 8 7 6 7) :count 2 :to 5 :direction 'down)) :join-points t) => ((9 8 7 6 7 9 8 7 6 7) (9 8 7 6 7 9 8 7 6 7) (8 7 6 5 6 8 7 6 5 6) (8 7 6 5 6 8 7 6 5 6) (7 6 5 5 5 7 6 5 5 5) (7 6 5 5 5 7 6 5 5 5) (6 5 5 5 5 6 5 5 5 5) (6 5 5 5 5 6 5 5 5 5) (5 5 5 5 5 5 5 5 5 5) (5 5 5 5 5 5 5 5 5 5)) (list-plot (flatten (count-up/down 100 '(9 8 7 6 7 9 8 7 6 7) :to 15 :direction 'up)) :join-points t) => ((9 8 7 6 7 9 8 7 6 7) (10 9 8 7 8 10 9 8 7 8) (11 10 9 8 9 11 10 9 8 9) (12 11 10 9 10 12 11 10 9 10) (13 12 11 10 11 13 12 11 10 11) (14 13 12 11 12 14 13 12 11 12) (15 14 13 12 13 15 14 13 12 13) (15 15 14 13 14 15 15 14 13 14) (15 15 15 14 15 15 15 15 14 15) (15 15 15 15 15 15 15 15 15 15)) (list-plot (flatten (count-up/down 200 '(9 8 7 6 7 9 8 7 6 7) :count 2 :to 15 :direction 'up)) :join-points t) => ((9 8 7 6 7 9 8 7 6 7) (9 8 7 6 7 9 8 7 6 7) (10 9 8 7 8 10 9 8 7 8) (10 9 8 7 8 10 9 8 7 8) (11 10 9 8 9 11 10 9 8 9) (11 10 9 8 9 11 10 9 8 9) (12 11 10 9 10 12 11 10 9 10) (12 11 10 9 10 12 11 10 9 10) (13 12 11 10 11 13 12 11 10 11) (13 12 11 10 11 13 12 11 10 11) (14 13 12 11 12 14 13 12 11 12) (14 13 12 11 12 14 13 12 11 12) (15 14 13 12 13 15 14 13 12 13) (15 14 13 12 13 15 14 13 12 13) (15 15 14 13 14 15 15 14 13 14) (15 15 14 13 14 15 15 14 13 14) (15 15 15 14 15 15 15 15 14 15) (15 15 15 14 15 15 15 15 14 15) (15 15 15 15 15 15 15 15 15 15) (15 15 15 15 15 15 15 15 15 15)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; MORE COMPLEX/INTERESTING EXAMPLES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; horizontal means every cycle has a new step-value (list-plot (flatten (count-up/down 100 '(9 8 7 6 7 15 8 7 6 7) :steps '(1 2 1 1 1 1 1 1 1 1) :type 'horizontal :to 2)) :join-points t) => ((9 8 7 6 7 15 8 7 6 7) (8 7 6 5 6 14 7 6 5 6) (6 5 4 3 4 12 5 4 3 4) (5 4 3 2 3 11 4 3 2 3) (4 3 2 2 2 10 3 2 2 2) (3 2 2 2 2 9 2 2 2 2) (2 2 2 2 2 8 2 2 2 2) (2 2 2 2 2 7 2 2 2 2) (2 2 2 2 2 6 2 2 2 2) (2 2 2 2 2 5 2 2 2 2)) ;; vertical means every value has its individual step (list-plot (flatten (count-up/down 100 '(9 8 7 6 7 30 8 7 6 7) :steps '(1 2 1 1 1 5 1 1 1 1) :type 'vertical :to 2)) :join-points t) => ((9 8 7 6 7 30 8 7 6 7) (8 6 6 5 6 25 7 6 5 6) (7 4 5 4 5 20 6 5 4 5) (6 2 4 3 4 15 5 4 3 4) (5 2 3 2 3 10 4 3 2 3) (4 2 2 2 2 5 3 2 2 2) (3 2 2 2 2 2 2 2 2 2) (2 2 2 2 2 2 2 2 2 2) (2 2 2 2 2 2 2 2 2 2) (2 2 2 2 2 2 2 2 2 2)) (list-plot (flatten (count-up/down 100 '(9 8 7 6 7 30 8 7 6 7) :steps '(1 2 1 3 1 5 3 1 2 1) :type 'vertical :to 1)) :join-points t) could be extended: would be nice if the END-VALUE (:to) would/could be also "in between" the start values... start '(6 7 5 1 2 3 9 19) => :to 4 => values incf, and decf to 4
  4. 3 points
    AM

    Help with seed and semi-colons

    in my personal view: - for algorithmic composition ...you have first to be a composer/musician - because it's a lot more about music then about code (i learned a little bit to code, because i was interested in this "kind of thinking" about art and music - so, i think, if you want to work with algorithms you have to handle some code (like in music you have to handle some pitches/sound/rhythms) - when you have a look to the history of algorithmic composition you see some software like: common music, open music, pwgl, patchwork, also supercollider or MAX etc, it has always to do with computer/code/algorithm. also PWGL, commonmusic, openmusic... are working with LISP (or parts of it), so i think, that's the thing. mostly i like in OPUSMODUS the direct connection to the SCORE etc... i like it also because it's very OPEN for some own things/code/ideas (because it's close to the basic COMMON LISP)... - you could work with all the EXAMPLES in the library, take it, do some smooth changes and have a look what happens... greetings andré
  5. 2 points
    opmo

    Circle-Pitch-Plot

    In the later date we can make a CIRCLE-RHYTHM-PLOT function especially designed for that. Thank you for the links.
  6. 2 points
    AM

    replace-velocity-of-a-length

    if you like to change dynamics/velocity of specific lengths (defun replace-velocity-of-a-length (omnseq length/velocity-map) (loop for i in (single-events (flatten omnseq)) when (length-restp (car i)) collect i else append (omn-replace :velocity (cadr (assoc (car (omn :length i)) length/velocity-map)) i))) (setf omn-seq '(s c4 ffff e e s e. s q q q q q)) (replace-velocity-of-a-length omn-seq '((1/16 mp) (2/16 pp) (3/16 ppp))) => (s c4 mp e c4 pp e c4 pp s c4 mp e. c4 ppp s c4 mp q c4 ffff q c4 ffff q c4 ffff q c4 ffff q c4 ffff)
  7. 2 points
    AM

    replace-articulation-of-a-length

    ....you are totally right!!!! i did not know this function, i did not find it when i was searching 😕 so, perhaps somebody could need/read my function "as a LISP-example"... in OPMO: (setf omn-seq '(s c4 ffff ord e ord e ord s ord e. ord s ord q ord q q q q)) (length-map '((1/16 mute) (2/16 pizz) (3/16 arco)) omn-seq) => (s c4 ffff mute e pizz c4 pizz s mute e. arco s mute q ord c4 c4 c4 c4)
  8. 2 points
    AM

    replace-articulation-of-a-length

    if you like to change the articulation of specific lengths (defun replace-articulation-of-a-length (omnseq length/articulation-map) (loop for i in (single-events (flatten omnseq)) when (length-restp (car i)) collect i else append (omn-replace :articulation (cadr (assoc (car (omn :length i)) length/articulation-map)) i))) (setf omn-seq '(s c4 ffff ord e ord e ord s ord e. ord s ord q ord q q q q)) (replace-articulation-of-a-length omn-seq '((1/16 mute) (2/16 pizz) (3/16 arco))) => (s c4 ffff mute e c4 ffff pizz e c4 ffff pizz s c4 ffff mute e. c4 ffff arco s c4 ffff mute q c4 ffff ord q c4 ffff q c4 ffff q c4 ffff q c4 ffff)
  9. 2 points
    opmo

    Help with seed and semi-colons

    The best way to progress quickly is to test and play with each of the examples in the 'How To' section which you will find in Utilities. You will see the omn form expression (scoring like on paper) and some simple self explanatory algorithms. Examine the input and output in the Listener. Snippet will help as well.
  10. 2 points
    JulioHerrlein

    Help with seed and semi-colons

    I think the best idea is to test musical ideias from annotated scores. Here are an example of a parametric composition with step by step decisions documented. Hope it can help you. The Nigel Morgan book is also very useful as well as the tutoriais by Janusz here in the fórum. The best is read the book testing the code in Opusmodus at the same time. Best Julio
  11. 1 point
    o_e

    Circle-Pitch-Plot

    You surely know that..? http://www.dynamictonality.com/xronomorph.htm Maybe you can get some inspiration from it..
  12. 1 point
    I will see what I can do.
  13. 1 point
    torstenanders

    Help with seed and semi-colons

    > but ((((((( ))))))))) drives me nuts! Actually, the editor helps you there. Just place the cursor directly before an opening or after a closing parenthesis, and the matching parenthesis is shown. Now, I am probably biased after using Lisp for quite some time, but I actually appreciate this simple syntax. I also programmed in various other languages, and I meanwhile prefer the Lisp syntax... Best, Torsten
  14. 1 point
    torstenanders

    Seed numbers?

    > the random state number. Seed values are only relevant for functions that do some random operations. In layman's terms, think of rolling a dice. You want to ensure that the dice always rolls the same number, and for that purpose, you put some glue on one of its sides. The seed number effectively controls on which side of your dice you put the glue. It is not the same as the number that is the result, but controls which number will be the result. Now think of having some more complex algorithm than just a dice, where you have a similar mechanism to control what the output should be and that way fixing the output to a static value that can be re-computed multiple times.
  15. 1 point
    Stephane Boussuge

    Pattern for Piano

    Hi Julio, it could be possible but a bit outside my programming capabilities, but Janusz is certainly capable to achieve this. And , as you, i would love this feature 🙂 S.
  16. 1 point
    JulioHerrlein

    Pattern for Piano

    Dear Janusz, It would be great to have this function in the core functions of version 1.3 Best, Julio Dear Stephane, Can we use this function to add more than one interval to each note ? This can add one interval, but I'm refering to add also two intervals, forming a trichord. 1) So the interval list would look like this, for adding intervals: (add-interval-if-length '((q c4 d4 e4 f4 e g4 a4) (e f4 e4 q d4 c4 a4 g4 f4)) :interval-list '(5 4)) 2) And like this, to alternate beetween a major triad and a perfect fourth: (add-interval-if-length '((q c4 d4 e4 f4 e g4 a4) (e f4 e4 q d4 c4 a4 g4 f4)) :interval-list '((4 3) 5)) Is it possible ? Any suggestion ? Best, Julio
  17. 1 point
    JulioHerrlein

    Circle-Pitch-Plot

    http://www.milesokazaki.com/musicians-visual-reference-2014/ http://www.milesokazaki.com/wp-content/uploads/2016/02/visual-reference-smaller.pdf All the Best !!! Looking Forward to the 1.3 version !!! Julio
  18. 1 point
    JulioHerrlein

    Circle-Pitch-Plot

    MARVELLOUS Function ! Thanks ! Necklace diagrams are a really important feature for many reasons: 1) Visualizing and teaching post tonal theory; 2) Visualizing the Rhythms (in conjuntion with the new Pcs-Rhythm function) and the Rhythm/Pitch Isomorphism; 3) Using the geometry relations to express harmonic properties and proportions; 4) Using the geometry relations to express rhythmic properties and proportions; 5) Visualizing Hauer's Trope Structures. ><><><><>< Database on tone rows and tropes Harald Fripertinger, Peter Lackner Last update: September 6, 2018 http://143.50.47.149/music/ ><><><><><>< Chord Diagrams http://143.50.47.149/music/chord_diagrams1.html SUGGESTION: Insert an option that enable to make circles with 3, 4, 5, 12, 16, any number of points. This can be very useful in modelling rhythms.
  19. 1 point
    AM

    count-up/down

    a less flexible version but with nicer output/usage... greetings (defun round-to (number precision &optional (what #'round)) (let ((div (expt 10 precision))) (/ (funcall what (* number div)) div))) ;;; (defun incf/decf-alist (n alist &key (steps '(1 2)) (end 1)) (let ((span (round-to (/ n (length alist)) 0))) (progn (setf alist (loop for start in alist for step in (if (< (length steps) (length alist)) (filter-first (length alist) (loop repeat (length alist) append steps)) steps) when (> start end) collect (loop for i from start downto end by step collect i) else collect (loop for i from start to end by step collect i))) (setf alist (loop for i in alist collect (append i (gen-repeat (- span (length i)) end)))) (loop repeat (length (car alist)) for cnt = 0 then (incf cnt) collect (loop for i in alist collect (nth cnt i)))))) (list-plot (flatten (incf/decf-alist 90 '(9 8 7 1 7 30 8 7 6 1) :steps '(1 2 1 3 1 5 3 1 2 1) :end 11)) :join-points t) =>((9 8 7 1 7 30 8 7 6 1) (10 10 8 4 8 25 11 8 8 2) (11 11 9 7 9 20 11 9 10 3) (11 11 10 10 10 15 11 10 11 4) (11 11 11 11 11 11 11 11 11 5) (11 11 11 11 11 11 11 11 11 6) (11 11 11 11 11 11 11 11 11 7) (11 11 11 11 11 11 11 11 11 8) (11 11 11 11 11 11 11 11 11 9))
  20. 1 point
    You can also use the Opusmodus function length-map for doing that. SB.
  21. 1 point
    Stephane Boussuge

    Background colour

    😉 SB.
  22. 1 point
    born

    Help with seed and semi-colons

    It's actually (setf motifx12 (rnd-order (gen-repeat 12 (list motif)) :seed 3)) Achim
  23. 1 point
    AM

    Help with seed and semi-colons

    some LISP tutorials... http://lisp.plasticki.com/show?H9 https://curry.ateneo.net/~jpv/cs171/LispTutorial.pdf https://www.cs.cmu.edu/~dst/LispBook/book.pdf https://www.cs.umd.edu/~nau/cmsc421/norvig-lisp-style.pdf or paper in GERMAN... https://www.amazon.de/Programmieren-COMMON-LISP-Otto-Mayer/dp/3860257102
  24. 1 point
    Stephane Boussuge

    Background colour

    I don't know because i am on the beta of the future Opusmodus version and on this one, i can change the background color in real time, ie. move the color cursor and color changes immediately. May be try to use the Toggle dark option in preference to see if it works. SB.
  25. 1 point
    AM

    As a beginner how important is learning Lisp ?

    i think it's very helpful. you could code also your own FUNCTIONS - you would learn to understand how it works - and it helps to handle opusmodus. there is an enormous potential in it.... greetings andré
×