Jump to content

AM

Members
  • Content Count

    573
  • Joined

  • Last visited

Posts posted by AM


  1. with these functions you could write your CENTS for tuning directly into OMN-attributes, and extract it afterwards

     

    1. generate by add-cents-tuning-to-text-atrributes the cent values into text-attributes (only one time), you could decide if it will be shown in the score "as CENTS or as FLOAT"

    2. now you could write your CENTS for tuning into OMN-attributes like 50ct, -34ct ...also in combination with other text-attributes legno+50ct, pizz+-65ct, -45ct+batt

    3. you could EXTRACT afterwards your LIST for TUNING directly from OMN by   get-tuning-from-omn*.if an EVENT has no cent-attribute it will be unchangend (= 0 cents)

     

     

    ;;; -------------------------------------------------------------------------------------------------------------------
    ;;; -------------------------------------------------------------------------------------------------------------------
    ;;; this function adds CENTS or FLOATS to text-attributes, in this way you can notate 
    ;;; - have a look how it's written in the score -> all combinations of attributes possible
    ;;; -------------------------------------------------------------------------------------------------------------------
    ;;; -------------------------------------------------------------------------------------------------------------------
    
    
    (defun add-cents-tuning-to-text-atrributes (&key (centlist nil) (type nil))
      (loop for i in (loop for x in (if (null centlist)
                                      (append (loop for i from 0 upto 99 collect i) (loop for i from 1 upto 99 collect (neg! i)))
                                      centlist)
                       collect (compress (list x 'ct)))
        append (add-text-attributes (list i (write-to-string (if (equal type :float) 
                                                               (float (/ (append (compress (if (equal (car (explode i)) '-)
                                                                                             (if (= (length (explode i)) 5)
                                                                                               (filter-first 3 (explode i))
                                                                                               (filter-first 2 (explode i)))
                                                                                             (if (= (length (explode i)) 4)
                                                                                               (filter-first 2 (explode i))
                                                                                               (filter-first 1 (explode i)))
                                                                                             ))) 100))
                                                               i))))))
    
    
    
    
    ;;; EXAMPLES
    
    (add-cents-tuning-to-text-atrributes :type :float)
    ;; have a look to notation: cmd3
    (-q -q  e c4 fff q c4 mf 50ct e c4 mf -40ct e c5 ff)
    
    
    (add-cents-tuning-to-text-atrributes :type :cents) ;; cents are written
    ;; have a look to notation: cmd3
    (-q -q  e c4 fff q c4 mf 50ct e c4 mf -40ct e c5 ff)
    
    
    
    ;;; -------------------------------------------------------------------------------------------------------------------
    ;;; -------------------------------------------------------------------------------------------------------------------
    ;;; this function get out all notated microtones for TUNING ;;; if there is nothing written it will be 0 cents (0)
    ;;; you can combine all kinds of attributes
    ;;; -------------------------------------------------------------------------------------------------------------------
    ;;; -------------------------------------------------------------------------------------------------------------------
    
    (defun memberp (n liste)
      (not (equal 'nil (member n liste))))
    
    (defun find-duplicates (lst)
      (cond ((null lst) '())
            ((member (car lst) (cdr lst)) (cons (car lst) (find-duplicates (cdr lst))))
            (t (find-duplicates (cdr lst)))))
    
    
    (defun get-tuning-from-omn* (omnlist centlist)
      (loop for i in (single-events (length-rest-remove omnlist))
        with n = 0
        when (not (null (find-duplicates (append (disjoin-attributes (car (last i))) centlist))))
        do (setf n  (float (/ (append (compress 
                                       (remove-if-not #'numberp (explode (car 
                                                                          (find-duplicates 
                                                                           (append (disjoin-attributes (car (last i)))
                                                                                   centlist))))))) 
                              100)))
    
        and collect (if (equal (car (explode (car (find-duplicates  (append (disjoin-attributes (car (last i))) 
                                                                            centlist)))))
                               '-)
                      (* -1 n)
                      n)
    
        else collect 0))
    
    
    
    
    
    ;;; EXAMPLES
    
    (setf centlist (add-cents-tuning-to-text-atrributes :type :float))
    
    ;;; evaluate this and you will get the tuning-list with all combinations of attributes
    (get-tuning-from-omn* '(-q -q  e c4 fff q c4 mf legno+50ct+num1 e c4 mf -50ct+legno+batt e c5 ff pizz+-34ct) centlist)
    => (0 0.5 0.5 -0.34)
    
    (get-tuning-from-omn* '(-q -q  e c4 fff -34ct+pizz q c4 mf legno+50ct e c4 mf -50ct+legno+batt e c5 ff pizz+-34ct) centlist)
    => (-0.34 0.5 -0.5 -0.34)
    
    (get-tuning-from-omn* '(-q -q  e c4 fff -34ct+pizz+num11 q c4 mf legno+50ct e c4 mf -50ct+legno+batt e c5 ff pizz+-34ct) centlist)
    => (-0.34 0.5 -0.5 -0.34)
    
    
    
    ;;; cmd3 for LAYOUT/SCORE
    (-q -q  e c4 fff -34ct+pizz+num11 q c4 mf legno+50ct e c4 mf -50ct+legno+batt e c5 ff pizz+-34ct)
    (-q -q  e c4 fff q c4 mf legno+50ct+num1 e c4 mf -50ct+legno+batt+num2 e c5 ff pizz+legno+-34ct)

     


  2. here is a solution - on attributes-level. next step will be to do/code it with "JOINED-attributes"... 

    thanxs for tests and hints! 🙂

     

    
    
    ;;; -------------------------------------------------------------------------------------------------------------------
    ;;; -------------------------------------------------------------------------------------------------------------------
    ;;; -------------------------------------------------------------------------------------------------------------------
    ;;; this function adds CENTS or FLOATS to text-attributes, in this way you can notate 
    ;;; - have a look how ii's written in the score
    ;;; 
    
    (defun add-cents-tuning-to-text-atrributes (&key (centlist nil) (type nil))
      (loop for i in (loop for x in (if (null centlist)
                                      (append (loop for i from 1 upto 99 collect i) (loop for i from 1 upto 99 collect (neg! i)))
                                      centlist)
                       collect (compress (list x 'ct)))
        append (add-text-attributes (list i (write-to-string (if (equal type :float) 
                                                               (float (/ (append (compress (if (equal (car (explode i)) '-)
                                                                                             (if (= (length (explode i)) 5)
                                                                                               (filter-first 3 (explode i))
                                                                                               (filter-first 2 (explode i)))
                                                                                             (if (= (length (explode i)) 4)
                                                                                               (filter-first 2 (explode i))
                                                                                               (filter-first 1 (explode i)))
                                                                                             ))) 100))
                                                               i))))))
    
    
    ;;; EXAMPLES
    
    (add-cents-tuning-to-text-atrributes :type :float)
    ;; have a look to notation: cmd3
    (-q -q  e c4 fff q c4 mf 50ct e c4 mf -40ct e c5 ff)
    
    
    (add-cents-tuning-to-text-atrributes :type :cents) ;; cents are written
    ;; have a look to notation: cmd3
    (-q -q  e c4 fff q c4 mf 50ct e c4 mf -40ct e c5 ff)
    
    
    ;;; -------------------------------------------------------------------------------------------------------------------
    ;;; -------------------------------------------------------------------------------------------------------------------
    ;;; -------------------------------------------------------------------------------------------------------------------
    ;;; this function get out all notated microtones for TUNING ;;; if there is nothing written it will be 0 cents (0)
    
    (defun memberp (n liste)
      (not (equal 'nil (member n liste))))
    
    (defun get-tuning-from-events (omnlist centlist)
      (loop for i in (single-events (length-rest-remove omnlist))
        when (memberp (car (last i)) centlist)
        do (setf n  (float (/ (append (compress (remove-if-not #'numberp (explode (car (last i)))))) 100)))
        and collect (if (equal (car (explode (car (last i)))) '-)
                      (* -1 n)
                      n)
        else collect 0))
    
    
    (setf centlist (add-cents-tuning-to-text-atrributes :type :float))
    
    ;;; evaluate this and you will get the tuning-list
    (get-tuning-from-events '(-q -q  e c4 fff q c4 mf 50ct e c4 mf -40ct e c5 ff) centlist)
    => (0 0.5 -0.4 0)  
    
    
    

     


  3. i need something like this 

    ((t b4 mp nr0 0.3) (-he.) (-whe..) (s. eb4 ppp nr3 0.5) (s g4 pp nr4 0) (t fs3 fff mute 0.3) (s. gs4 ppp nr6 0) (-e..))

    so it's possible keep the overview which PITCH is TUNED and which is not... this way i can make precise assignments.

    for example: i code a score with no microtonal structures, but afterwards i want to INSERT/OVERWRITE some pitches/liitle sections with microtonal... 

    so the EVENT-thing seems better for me to keep the overview/control, then to have ALWAYS a seperate list. so i will write TUNING-float into  EVENTS, and a function GENERATES afterwards the correct LIST for tuning.

     

    i will post the FUNCTIONS later..

     


  4. I do not work / almost never with DAW's. OPMO (before pwgl) and sibelius.

    i think the conTimbre library is much better - not all samples are quite perfect, but the selection of playing techniques eg. in the strings or in the drums is just very good. my last piece was for ensemble, virtual conductor and e-player (a piece whitch generates its form in quasi-realtime (completely new every time) - by sochastic/markov-procedures)

     

     

    - it was possible to play the add-SCORE from the library directly at the concert (midi-files read out with flexible tempo and played on CT) without any problems - mix extremely well with the live instruments. 

     

    I do not think the library is very user-friendly, but I do not produce music (i compose, which - in my view - is a different kind of thinking), so that's not so important for me. but it contains many extra features and (or information about sound analysis (and apparently a direct access to LISP to make algorithmic orchestrations)

    as I said, not quite smart designed, but the possibilities (compared to the IRCAM library) I feel as much bigger. CT can now also play well from SIBELIUS / FINALE over VST.

     

    so I would be much happier if CT ran so well (with microtonal stuff) on OPUSMODUS.


  5. the only answer i got was that it works with "midi pitch bend" and with MAX.

     

    ConTimbre:
    "With Max you can just send floating point pitches, and with MIDI you can either send pitch bend values, but that always affects the whole voice.
    But you can also detune every key and, for example, use several Voices with the same timbre, but they have mutually detuned keyboards to get more than 128 pitches. "

     

    this will probably not solve the problem. maybe it would be best if OPMO's and ConTimbre's guys communicate directly? that would be in the interest of both companies...(?)


  6. 9 hours ago, torstenanders said:

    BTW: You meanwhile should also have quite a sizeable collection of custom functions for Opusmodus. While not sharing them together in some kind of library as well? 

     

    yes, of course - from "BOTs" to a lot of small simple FUNCTIONS... but: not very well/smart coded (🙄) - i'm musician but only an "amateur programmer" with few experience -  and it's really NOT well documentated for other users. and another point, i have no idea how do that professionally with GUTHUB and these installation-things 😕

     

    as ORDINARY text - no problem. perhaps i will share it like that on my website...

     

     


  7. - it works not as it should for conTimbre. conTimbre works well with SIBELIUS (via pitch-bend-messages in the score like ~B0,64 or  ~B0,90, like that) => no idea what i shoud do in OPMO?

     

    - TUNING: don't work with conTimbre

     

    - another thing is, i can't work well with OPMO+microtonality, when it's not possible to have microtonal-notation => so i will do it in SIBELIUS


  8. perhaps OPMO could extend its GEN-ROTATE like that (or use this CODE for it)... not only single-steps, also a list of steps...

     

    ;;; SIMPLE FUNCTION
    
    (defun gen-rotate* (alist seq)
      (loop 
        for i in alist
        collect (setf seq (gen-rotate i seq))))
    
    ;;; EXAMPLES
    
    (list-plot 
     (flatten 
      (gen-rotate* '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18) '(1 2 3 4 5 6 7 8 9 10)))
       :join-points t :point-radius 0 :style :fill)
    
    (list-plot 
     (gen-rotate* '(9 8 7 6 5 4 3 2 1) '(1 2 3 4 5 6 7 8 9 10))
       :join-points t :point-radius 0 :style :fill)
    
    (list-plot 
     (flatten 
      (gen-rotate* '(1 2 3 4 5 4 3 2 1) '(1 2 3 4 5 6 7 8 9 10)))
       :join-points t :point-radius 0 :style :fill)
    
    (list-plot 
     (gen-rotate* '(1 2 3 4 5 4 3 2 1) '(1 2 3 4 5 6 7 8 9 10))
     :join-points t :point-radius 0 :style :fill)

     


  9.  

    RESPELL/ENHARMONIC

     

    here is a solution for that (i hope i got all cases) - could be usefull in OPMO - it was/is a explode/compress-thing of the pitch-symbols and to think about all cases. please check it!!

    greetings

    andré

     

    (defun enharmonic* (pitches)
      (let ((liste '((cs db)
                     (ds eb)
                     (e fb)
                     (es f)
                     (fs gb)
                     (gs ab)
                     (as bb)
                     (b cb)
                     (bs c))))
    
        (loop for n in pitches
          collect (let ((octave (car (last (explode n))))
                        (pitchname (compress (butlast  (explode n)))))
                    
                    (append (compress (list (car (set-difference 
                                                  (loop for i in liste
                                                    
                                                    ;; cases with octave-change
                                                    when (or (and (equal i '(bs c))
                                                                  (equal pitchname 'bs))
                                                             (and (equal i '(b cb))
                                                                  (equal pitchname 'b)))
                                                    do (setf octave (1+ octave))
                                                    
                                                    when (or (and (equal i '(bs c))
                                                                  (equal pitchname 'c))
                                                             (and (equal i '(b cb))
                                                                  (equal pitchname 'cb)))
                                                    do (setf octave (1- octave))
                                                  
                                                  ;; ordinary cases
                                                  when (member pitchname i)
                                                  append i) 
                                                (list pitchname)))
    
                                            octave)))))))
    
    
    (enharmonic* '(fb4 fb4 cb5))
    => (e4 e4 b4)
    
    (enharmonic* '(f4 b7))
    => (es4 cb8)
    
    (enharmonic* '(bs4 cs5 cb5))
    => (c5 db5 b4)
    
    (enharmonic* '(c6 gs7 gb4))
    => (bs5 ab7 fs4)

     


  10. short question: is it possible to add a text-attribute to/above a rest? i didn't find a solution for that...

     

    for post-editing my score i would like to delete/augment/... specific values... for example: AUGMENT rest number 12, or DELETE pitch number 27 (like every EVENT woud has its number) - to do that i numbered all the pitches in the score, but seems not possible to number (by adding text-attributes) the rest-values?? 

     

    it's no problem to extend the EVENTS by any extra-data-slots (i wrote such a function), but i don't know how to display text above RESTS?

     

    thanx for help

    andré

     


  11. here are 2 sound-examples of such a process

    - evaluate the FUNCTIONS: incf/decf-alist and round-to

    - evaluate example with cmd2/cmd3

    - have a look to the list-plot

    (progn
      (setf durations  (rnd-number 10 1 19 :prob 0.4))
      
      (setf seq1 (append
                  (make-omn :length (gen-length (flatten 
                                                 (incf/decf-alist 
                                                  100 
                                                  (rnd-order durations)
                                                  :steps (rnd-number 10 1 5 :prob 0.2) :end 2))
                                                 32)
                            :pitch '(c4)
                            :velocity '(pp))
    
                  (make-omn :length (gen-length (flatten
                                                 (incf/decf-alist 
                                                 100 
                                                 (rnd-order durations)
                                                 :steps (rnd-number 10 1 5 :prob 0.2) :end 3))
                                                32)
                            :pitch '(b4)
                            :velocity '(f))
                  
                  (make-omn :length (gen-length (reverse 
                                                 (flatten
                                                  (incf/decf-alist 
                                                   100 
                                                   (rnd-order durations)
                                                   :steps (rnd-number 10 1 5 :prob 0.2) :end 1)))
                                                32)
                            :pitch '(f4)
                            :velocity '(mf)))))
    
      
    (length-list-plot (omn :length seq1))
    
    
    (progn
      (setf durations  (rnd-number 10 1 7 :prob 0.4))
      
      (setf seq2 (make-omn :length (gen-length (append (reverse 
                                                        (flatten
                                                         (incf/decf-alist 
                                                          50 
                                                          (setf list (rnd-order durations))
                                                          :steps (rnd-number 10 1 5 :prob 0.2) :end 2)))
                                                       (flatten
                                                        (incf/decf-alist 
                                                         50 
                                                         list
                                                         :steps (rnd-number 10 1 5 :prob 0.2) :end 1)))
                                               32)
                            :pitch '(f4)
                            :velocity '(mf))))
    
      
    (length-list-plot (omn :length seq2))

     

     


  12. 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))

    Ohne Titel.jpeg

     


  13. 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

×
×
  • Create New...