Jump to content

AM

Members
  • Posts

    792
  • Joined

  • Last visited

Reputation Activity

  1. Like
    AM got a reaction from JulioHerrlein in chord-contraction/expansion   
    you should also share your ideas/thoughts/concepts!!??
  2. Like
    AM got a reaction from loopyc in chord-contraction/expansion   
    hi julio
     
    it's too complicated to share the code...the FUNCTION is made for a specific idea of the work (not common), so it's made for MY need...
    here is a short sketch of the work... (part of it)
     
    a) generating a pitch-sequence => by using a 12-tone-seq + its expansion by a sorting-algorithm (with GEN-SORT) => an INTERVAL-order mutates to a SCALE (see the list-plot)
    b) pitches are projected on a sequence of symmetrical expanding/compressing FIELDS (with CHORD-CONTR...) => you see how the pitch-seq is contracted/exapnded in "space"
     
    - result is a kind of interference of this processes => at the end you see (in list-plot) that the interference is going more and more to ONE LEVEL - to a SCALE 
    - so its a kind of inside/out. the inherent structure, the inherent process/order is more and more recognizable during the process (start with compr/exp. 12-tone-row to the simple SCALE)
     
     

     
     
    the project is a bit larger. this sequence (which rhythm is based on a binary-event-filter (data of a jpeg of an artist))  is only the structural background (some ideas developed by LACHENMANN) - on this NET (the score you see) there will be other GESTALTS/MOTIFS etc...
    because my needs are such specific to my and my idea - most of the functions i had to code for myself, or modify/enlarge the OPMO functions, great that this is possible on this platform.
     
    sorry a bit complicated and i can't not describe it properly with a few words 🧐
     
     
     
     
  3. Like
    AM got a reaction from lviklund in chord-contraction/expansion   
    hi julio
     
    it's too complicated to share the code...the FUNCTION is made for a specific idea of the work (not common), so it's made for MY need...
    here is a short sketch of the work... (part of it)
     
    a) generating a pitch-sequence => by using a 12-tone-seq + its expansion by a sorting-algorithm (with GEN-SORT) => an INTERVAL-order mutates to a SCALE (see the list-plot)
    b) pitches are projected on a sequence of symmetrical expanding/compressing FIELDS (with CHORD-CONTR...) => you see how the pitch-seq is contracted/exapnded in "space"
     
    - result is a kind of interference of this processes => at the end you see (in list-plot) that the interference is going more and more to ONE LEVEL - to a SCALE 
    - so its a kind of inside/out. the inherent structure, the inherent process/order is more and more recognizable during the process (start with compr/exp. 12-tone-row to the simple SCALE)
     
     

     
     
    the project is a bit larger. this sequence (which rhythm is based on a binary-event-filter (data of a jpeg of an artist))  is only the structural background (some ideas developed by LACHENMANN) - on this NET (the score you see) there will be other GESTALTS/MOTIFS etc...
    because my needs are such specific to my and my idea - most of the functions i had to code for myself, or modify/enlarge the OPMO functions, great that this is possible on this platform.
     
    sorry a bit complicated and i can't not describe it properly with a few words 🧐
     
     
     
     
  4. Like
    AM got a reaction from JulioHerrlein in chord-contraction/expansion   
    hi julio
     
    it's too complicated to share the code...the FUNCTION is made for a specific idea of the work (not common), so it's made for MY need...
    here is a short sketch of the work... (part of it)
     
    a) generating a pitch-sequence => by using a 12-tone-seq + its expansion by a sorting-algorithm (with GEN-SORT) => an INTERVAL-order mutates to a SCALE (see the list-plot)
    b) pitches are projected on a sequence of symmetrical expanding/compressing FIELDS (with CHORD-CONTR...) => you see how the pitch-seq is contracted/exapnded in "space"
     
    - result is a kind of interference of this processes => at the end you see (in list-plot) that the interference is going more and more to ONE LEVEL - to a SCALE 
    - so its a kind of inside/out. the inherent structure, the inherent process/order is more and more recognizable during the process (start with compr/exp. 12-tone-row to the simple SCALE)
     
     

     
     
    the project is a bit larger. this sequence (which rhythm is based on a binary-event-filter (data of a jpeg of an artist))  is only the structural background (some ideas developed by LACHENMANN) - on this NET (the score you see) there will be other GESTALTS/MOTIFS etc...
    because my needs are such specific to my and my idea - most of the functions i had to code for myself, or modify/enlarge the OPMO functions, great that this is possible on this platform.
     
    sorry a bit complicated and i can't not describe it properly with a few words 🧐
     
     
     
     
  5. Like
    AM got a reaction from lviklund in chord-contraction/expansion   
    ;;; THIS FUNCTION DOING SYMM TRANSPOSITIONS TO CONRACT (OR EXPAND, depends on INTERVAL) A CHORD or PITCH-SEQ ;;; default setting: it changes in every generation the highest and lowest pitch by an OCTAVE ;;; by changing :position (see examples) you could change which position should be changed/transposed ;;; default interval is 12 ;;; FUNCTION (defun chord-contraction/expansion (n pitchlist &key (position nil) (interval 12) (chord nil)) (let* ((pitchlist (if (chordp (car pitchlist)) (melodize pitchlist) pitchlist)) (position (if (null position) (list 0 (1- (length pitchlist))) (if (listp position) position (list position (- (1- (length pitchlist)) position))))) (pitchlist (cons pitchlist (loop repeat n collect (setf pitchlist (sort-asc (flatten (position-replace position (list (pitch-transpose interval (list (nth (car position) pitchlist))) (pitch-transpose (neg! interval) (list (nth (cadr position) pitchlist)))) pitchlist)))))))) (if (null chord) pitchlist (chordize pitchlist)))) ;;; EXAMPLES: evaluate by cmd3 (setf 12-tone-field '(f3 fs3 gs3 c4 d4 e4 b4 cs5 eb5 g5 a5 bb5)) (chord-contraction/expansion 4 12-tone-field :chord t) => ((f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (fs3gs3c4d4e4f4bb4b4cs5eb5g5a5) (gs3c4d4e4f4fs4a4bb4b4cs5eb5g5) (c4d4e4f4fs4g4gs4a4bb4b4cs5eb5) (d4eb4e4f4fs4g4gs4a4bb4b4c5cs5)) (chord-contraction/expansion 4 12-tone-field :chord t :interval 48) => ((f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (bb1fs3gs3c4d4e4b4cs5eb5g5a5f7) (f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (bb1fs3gs3c4d4e4b4cs5eb5g5a5f7) (f3fs3gs3c4d4e4b4cs5eb5g5a5bb5)) ;;; with spezific positions (inner change) (chord-contraction/expansion 4 12-tone-field :chord t :position 3) => ((f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (f3fs3gs3d4eb4e4b4c5cs5g5a5bb5) (f3fs3gs3cs4eb4e4b4c5d5g5a5bb5) (f3fs3gs3d4eb4e4b4c5cs5g5a5bb5) (f3fs3gs3cs4eb4e4b4c5d5g5a5bb5)) (chord-contraction/expansion 4 12-tone-field :chord t :position '(0 5)) => ((f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (e3fs3gs3c4d4f4b4cs5eb5g5a5bb5) (f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (e3fs3gs3c4d4f4b4cs5eb5g5a5bb5) (f3fs3gs3c4d4e4b4cs5eb5g5a5bb5)) ;;;; with different intervals (chord-contraction/expansion 4 12-tone-field :chord t :interval 11) => ((f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (fs3gs3c4d4e4e4b4b4cs5eb5g5a5) (gs3c4d4e4e4f4bb4b4b4cs5eb5g5) (c4d4e4e4f4g4gs4bb4b4b4cs5eb5) (d4e4e4e4f4g4gs4bb4b4b4b4cs5)) (chord-contraction/expansion 4 12-tone-field :chord t :interval 7) => ((f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (fs3gs3c4c4d4e4b4cs5eb5eb5g5a5) (gs3c4c4cs4d4e4b4cs5d5eb5eb5g5) (c4c4cs4d4eb4e4b4c5cs5d5eb5eb5) (c4cs4d4eb4e4g4gs4b4c5cs5d5eb5))  
  6. Like
    AM got a reaction from loopyc in chord-contraction/expansion   
    ;;; THIS FUNCTION DOING SYMM TRANSPOSITIONS TO CONRACT (OR EXPAND, depends on INTERVAL) A CHORD or PITCH-SEQ ;;; default setting: it changes in every generation the highest and lowest pitch by an OCTAVE ;;; by changing :position (see examples) you could change which position should be changed/transposed ;;; default interval is 12 ;;; FUNCTION (defun chord-contraction/expansion (n pitchlist &key (position nil) (interval 12) (chord nil)) (let* ((pitchlist (if (chordp (car pitchlist)) (melodize pitchlist) pitchlist)) (position (if (null position) (list 0 (1- (length pitchlist))) (if (listp position) position (list position (- (1- (length pitchlist)) position))))) (pitchlist (cons pitchlist (loop repeat n collect (setf pitchlist (sort-asc (flatten (position-replace position (list (pitch-transpose interval (list (nth (car position) pitchlist))) (pitch-transpose (neg! interval) (list (nth (cadr position) pitchlist)))) pitchlist)))))))) (if (null chord) pitchlist (chordize pitchlist)))) ;;; EXAMPLES: evaluate by cmd3 (setf 12-tone-field '(f3 fs3 gs3 c4 d4 e4 b4 cs5 eb5 g5 a5 bb5)) (chord-contraction/expansion 4 12-tone-field :chord t) => ((f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (fs3gs3c4d4e4f4bb4b4cs5eb5g5a5) (gs3c4d4e4f4fs4a4bb4b4cs5eb5g5) (c4d4e4f4fs4g4gs4a4bb4b4cs5eb5) (d4eb4e4f4fs4g4gs4a4bb4b4c5cs5)) (chord-contraction/expansion 4 12-tone-field :chord t :interval 48) => ((f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (bb1fs3gs3c4d4e4b4cs5eb5g5a5f7) (f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (bb1fs3gs3c4d4e4b4cs5eb5g5a5f7) (f3fs3gs3c4d4e4b4cs5eb5g5a5bb5)) ;;; with spezific positions (inner change) (chord-contraction/expansion 4 12-tone-field :chord t :position 3) => ((f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (f3fs3gs3d4eb4e4b4c5cs5g5a5bb5) (f3fs3gs3cs4eb4e4b4c5d5g5a5bb5) (f3fs3gs3d4eb4e4b4c5cs5g5a5bb5) (f3fs3gs3cs4eb4e4b4c5d5g5a5bb5)) (chord-contraction/expansion 4 12-tone-field :chord t :position '(0 5)) => ((f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (e3fs3gs3c4d4f4b4cs5eb5g5a5bb5) (f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (e3fs3gs3c4d4f4b4cs5eb5g5a5bb5) (f3fs3gs3c4d4e4b4cs5eb5g5a5bb5)) ;;;; with different intervals (chord-contraction/expansion 4 12-tone-field :chord t :interval 11) => ((f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (fs3gs3c4d4e4e4b4b4cs5eb5g5a5) (gs3c4d4e4e4f4bb4b4b4cs5eb5g5) (c4d4e4e4f4g4gs4bb4b4b4cs5eb5) (d4e4e4e4f4g4gs4bb4b4b4b4cs5)) (chord-contraction/expansion 4 12-tone-field :chord t :interval 7) => ((f3fs3gs3c4d4e4b4cs5eb5g5a5bb5) (fs3gs3c4c4d4e4b4cs5eb5eb5g5a5) (gs3c4c4cs4d4e4b4cs5d5eb5eb5g5) (c4c4cs4d4eb4e4b4c5cs5d5eb5eb5) (c4cs4d4eb4e4g4gs4b4c5cs5d5eb5))  
  7. Thanks
    AM got a reaction from JulioHerrlein in Help on WILDCARDS ? *   
    often helpful in PATTERN MATCH things... (like in OPMO pattern-match-functions)
     
    here is a short IDEA for an octave-independent PITCH-PATTERN-MATCHP with possible WILDCARD, perhaps could help you...
     
    ;;;-------------------------------------------------------------- ;;; PITCH PATTERN-MATCHP octave-independent ;;;-------------------------------------------------------------- ;;; SUB (defun convert-pitch (pitches) (loop for i in pitches when (pitchp i) collect (compress (butlast (explode i))) else collect i)) ;;; MAIN (defun pitch-pattern-matchp (pitchlist pattern) (let ((pitchlist (convert-pitch pitchlist)) (pattern (convert-pitch pattern))) (pattern-matchp pitchlist pattern))) (pitch-pattern-matchp '(c4 d4 eb4 f4 g4) '(c ? e)) => nil (pitch-pattern-matchp '(c4 d4 eb4 f4 g4) '(c ? eb)) => t  
  8. Like
    AM reacted to opmo in how to keep omn-notation?   
    (setf sequence '((t s t)                  (3q 3e_s. t)                  (5h 5h 5q_7q 7q 7q 7q 7q 7q 7q_5q 5h 5h)                  (t s._3e 3q))) (gen-retrograde sequence) => ((t s t)     (t s._3e 3q)     (5h 5h 5q_7q 7q 7q 7q 7q 7q 7q_5q 5h 5h)     (3q 3e_s. t))
     
    best, JP
  9. Like
    AM reacted to opmo in how to keep omn-notation?   
    Will be fixed in the next update. The problem not the ratios but the tied lengths. What we need to do is to reverse the order of tied lengths:
    5q_7q = 7q_5q
  10. Like
    AM reacted to Stephane Boussuge in how to keep omn-notation?   
    (gen-retrograde durations1 :omn t) => ((t s t) (t 13/96 3q) (5h = 3/35 7q = = = = 3/35 5h =) (3q 13/96 t) (t s t)) S.
  11. Like
    AM got a reaction from JulioHerrlein in transpose-on-event-number   
    thanx for the span-ignore-pause-HINT! ...but it makes no sense to me - when you are working with EVENTS (by numbering it) - to ignore some of them 😉
    the idea behind this concept is, that you could work with a (finished) score by changing some parameters or enlarge rests - like a kind of "post-production". in this way it's not necessary to go deep inside you generating-algorithms, you can only change things a little bit like in a notation-software (i think it's on that level). some months ago i had the idea to do such changes (post...) by positions with BARS/BEATS - but at the moment i think it's much better to signify the EVENTS and work directly on them. less errors and easy to code such post...-functions.
     
  12. Like
    AM got a reaction from JulioHerrlein in transpose-on-event-number   
    it's not a common solution, only a specific for my project... 
     
    1) it should also work with chords - because it's made for EVENTS it's always one chord = one event
    2) of course, you have to decide/check if you like to merge rests or not => because i'm filtering the texture by a binary-seq (binaries from a jpeg, like a sieve) it's not the idea to merge the rests, but you could do that in a seperate step. but in my case every note/event (before filtering) is numbered, so with/when BINARY-FILTER/SIEVE you will keep the numbering concise.
     
  13. Thanks
    AM reacted to opmo in transpose-on-event-number   
    With EDIT-EVENT (ver1.3) function you will be able to edit any parameter in any given bar:
    (edit-event '(               (0 0 '(pitch-transpose 12 x) :pitch)               (0 2 '(chord-inversion 2 x) :pitch)               (0 3 '(pitch-variant x :variant 'i) :pitch)               (2 1 '(chord-inversion 1 x) :pitch)               (2 2 '(chord-inversion 1 (pitch-transpose 12 x)) :pitch)               (3 1 '(chord-inversion 1 (pitch-transpose 12 x)) :pitch)               (3 2 '(chord-inversion 2 x) :pitch)               (3 3 '(chord-inversion 2 x) :pitch)               (3 5 '(chord-inversion 4 x) :pitch)               (3 6 'g3e4c5 :pitch)               )             '((e c2 c3e3g3 c3e3g3 c3e3g3) (e f2 c3f3a3 c3f3a3 c3f3a3)               (e e2 e3g3c4 e3g3c4 e3g3c4) (e gs2 e3b3 e3b3 e3b3 g2 d3g3b3 d3g3b3 d3g3b3))) => ((e c3 mf c3e3g3 g3c4e4 c3gs2f2) (e f2 c3f3a3 c3f3a3 c3f3a3) (e e2 mf g3c4e4 g4c5e5 e3g3c4) (e gs2 mf b4e5 e4b4 e4b4 g2 g4b4d5 g3e4c5 d3g3b3))  
  14. Like
    AM got a reaction from lviklund in transpose-on-event-number   
    greetings
    andré
     
    ;;; --------------------------------------------------------------------------------------------------- ;;; because i'm working with numbered-events (to have some more control) i has to code ;;; a specific tranposition-function, which is transposing on specific spans/positions ;;; --------------------------------------------------------------------------------------------------- ;;; SUB (defun and-span (n a b) (and (>= n a) (<= n b))) ;;; MAIN (defun transpose-on-event-number (omn-list &key positions/transpose-list) (loop for i in (single-events omn-list) for cnt = 0 then (incf cnt) with position-list = (loop for x in positions/transpose-list collect (car x)) with transpose-list = (loop for y in positions/transpose-list collect (rest y)) with cnt2 = 0 when (and (and-span cnt (car (nth cnt2 position-list)) (cadr (nth cnt2 position-list))) (not (length-restp (car (omn :length i))))) collect (pitch-transpose-n (nth cnt2 transpose-list) i) else collect i when (and (= cnt (cadr (nth cnt2 position-list))) (< cnt (cadar (last position-list)))) do (incf cnt2))) ;;; ZERO-based (like in lisp) (transpose-on-event-number '(q g4 -q q g4 g4 g4 g4 g4 g4 g4 g4) :positions/transpose-list '(((0 5) 1) ((6 7) -3) ((8 9) 12))) => ((q gs4 mf) (-q) (q gs4 mf) (q gs4 mf) (q gs4 mf) (q gs4 mf) (q e4 mf) (q e4 mf) (q g5 mf) (q g5 mf))  
  15. Like
    AM got a reaction from lviklund in replace-on-event-number   
    the same idea with INSERT/REPLACE
     
    (defun replace-on-event-number (omn-list &key position/list (type 'replace) (output nil)) (progn (setf omn-list (loop for i in (single-events omn-list) for cnt = 0 then (incf cnt) with position-list = (loop for x in position/list collect (car x)) with list = (loop for y in position/list collect (rest y)) with cnt2 = 0 when (= cnt (nth cnt2 position-list)) collect (cond ((equal type 'replace) (if (listp (nth cnt2 list)) (flatten (nth cnt2 list)) (nth cnt2 list))) ((equal type 'add) (list i (nth cnt2 list)))) else collect i when (and (= cnt (nth cnt2 position-list)) (< cnt (car (last position-list)))) do (incf cnt2))) (if (equal output 'flatten) (flatten omn-list) omn-list))) ;;; EXAMPLES REPLACE (replace-on-event-number '(q g4 -q q g4 g4 g4 -q g4 g4 g4 g4) :position/list '((1 (q g5d5)) (5 -q)) :type 'replace) => ((q g4 mf) (q g5d5) (q g4 mf) (q g4 mf) (q g4 mf) (-q) (q g4 mf) (q g4 mf) (q g4 mf) (q g4 mf)) (replace-on-event-number '(q g4 -q q g4 g4 g4 -q g4 g4 g4 g4) :position/list '((1 (q g5d5)) (5 -q)) :type 'replace :output 'flatten) => (q g4 mf q g5d5 q g4 mf q g4 mf q g4 mf -q q g4 mf q g4 mf q g4 mf q g4 mf) ;;; EXAMPLES ADD (replace-on-event-number '(q g4 -q q g4 g4 g4 -q g4 g4 g4 g4) :position/list '((1 -e.) (5 -w)) :type 'add :output nil) => ((q g4 mf) ((-q) (-e.)) (q g4 mf) (q g4 mf) (q g4 mf) ((-q) (-w)) (q g4 mf) (q g4 mf) (q g4 mf) (q g4 mf)) (replace-on-event-number '(q g4 -q q g4 g4 g4 -q g4 g4 g4 g4) :position/list '((1 (w g6 ffff)) (5 -w)) :type 'add :output 'flatten) => (q g4 mf -q w g6 ffff q g4 mf q g4 mf q g4 mf -q -w q g4 mf q g4 mf q g4 mf q g4 mf) ;;;;  
  16. Thanks
    AM got a reaction from JulioHerrlein in transpose-on-event-number   
    greetings
    andré
     
    ;;; --------------------------------------------------------------------------------------------------- ;;; because i'm working with numbered-events (to have some more control) i has to code ;;; a specific tranposition-function, which is transposing on specific spans/positions ;;; --------------------------------------------------------------------------------------------------- ;;; SUB (defun and-span (n a b) (and (>= n a) (<= n b))) ;;; MAIN (defun transpose-on-event-number (omn-list &key positions/transpose-list) (loop for i in (single-events omn-list) for cnt = 0 then (incf cnt) with position-list = (loop for x in positions/transpose-list collect (car x)) with transpose-list = (loop for y in positions/transpose-list collect (rest y)) with cnt2 = 0 when (and (and-span cnt (car (nth cnt2 position-list)) (cadr (nth cnt2 position-list))) (not (length-restp (car (omn :length i))))) collect (pitch-transpose-n (nth cnt2 transpose-list) i) else collect i when (and (= cnt (cadr (nth cnt2 position-list))) (< cnt (cadar (last position-list)))) do (incf cnt2))) ;;; ZERO-based (like in lisp) (transpose-on-event-number '(q g4 -q q g4 g4 g4 g4 g4 g4 g4 g4) :positions/transpose-list '(((0 5) 1) ((6 7) -3) ((8 9) 12))) => ((q gs4 mf) (-q) (q gs4 mf) (q gs4 mf) (q gs4 mf) (q gs4 mf) (q e4 mf) (q e4 mf) (q g5 mf) (q g5 mf))  
  17. Thanks
    AM got a reaction from JulioHerrlein in transpose-on-event-number   
    what you could do with it? 
    a precise "projection on a curve" of a generated OMN (in this example: a 12-tone-row, which is been permuted (by a SORTING-algorithm) from start to end, till it's a symmetrical scale)
     

  18. Like
    AM got a reaction from torstenanders in Creating Custom Chord Symbols   
    i think it's good and important to see that opusmodus is not a notation software (like sibelius/finale/dorico...). the potential is rightly in another area and i believe that it is important to keep the basic idea of opusmodus in focus (it's important to have restrictions/limitations) - and i think the development team is very aware of that .
    you can not have everything, but what is possible should be very very smart in its kind.
     
    the longer i work with opusmodus, the more i realize, for what i can use it ...and when I have to switch to another platform. 
    and because it is so open, it is then possible for me to find solutions for my specific needs, by being able to program myself and not simply having to do what the existing tools / functions allow.
     
    okay i admit i'm a big fan of opusmodus, although i do not even compose with it but can try/simulate basic ideas of my work - doing abstract/new things and see what happens - like working in an LAB 🙂
     
  19. Thanks
    AM got a reaction from JulioHerrlein in how to number pitches   
    thanks, so i have to code an algorithm to write such a library (till 1000) - or do it by hand 😉
    any idea to code such a format? - i don't know how to code/write such a format with single lists (and not lists in lists) inside a function...
     
    thanx for help
    andré
  20. Thanks
    AM got a reaction from JulioHerrlein in how to number pitches   
    this is the simple solution...
    (defun add-numbers-to-text-attributes (a b) (loop for i from a to b append (add-text-attributes (list (compress (list 'nr i)) (write-to-string i))))) (add-numbers-to-text-attributes 12 23) => (nr12 nr13 nr14 nr15 nr16 nr17 nr18 nr19 nr20 nr21 nr22 nr23)  
  21. Thanks
    AM got a reaction from JulioHerrlein in length-invert** (works with ties)   
    ;;; FUNCTION: for some coding-cases i needed THIS function, to keep the OMN-notation ;;; and not to change to RATIO (otherwise i got strange results in NOTATION because the "ties are gone") (defun length-invert** (length-val) (append (compress (list '- length-val)))) ;;; EXAMPLES ;;; new => keeps OMN (length-invert** (car '(q e4 mp))) => -q ; in this case i wanted to keep the format with tie (length-invert** (car '(3q_q e4 mp))) => -3q_q ;;; original => changes to ratio (length-invert (car '(q e4 mp))) => -1/4 ; no tie here! i was in trouble :-) (length-invert (car '(3q_q e4 mp))) => -1/3  
  22. Thanks
    AM got a reaction from JulioHerrlein in why a alternative version of LENGTH-INVERT is useful   
    i coded a new/alternative version of LENGTH-INVERT. i used it for a so called BINARY-FILTER (for events) - have a look to the example and you see the reason.
    in some cases you will have a much better DISPLAY/SCORE, is there an OPMO version for that?
     
    greetings
    andré
     
    ;;; -------------------------------------------------------- ;;; VERSION WITH OPMO length-invert ;;; -------------------------------------------------------- (defun binary-filter-old (alist bin-list) (let ((event-list (cond ((omn-formp alist) (single-events alist)) (t alist)))) (flatten (loop for i in event-list for j in bin-list when (= j 1) collect i else append (list (length-invert (car i))))))) ;;; -------------------------------------------------------- ;;; VERSION WITH OWN length-invert ;;; -------------------------------------------------------- (defun binary-filter* (alist bin-list) (let ((event-list (cond ((omn-formp alist) (single-events alist)) (t alist)))) (flatten (loop for i in event-list for j in bin-list when (= j 1) collect i else append (list (length-invert** (car i))))))) (defun length-invert** (length-val) (append (compress (list '- length-val))))  
     
    EXAMPLE WITH THE ORIGINAL VERSION:
     
    ;;; EXAMPLE => complex rhythms (setf omn-seq (make-omn :length '(t s t 3q 3e_s. t 5h 5h 5q_7q 7q 7q 7q 7q 7q 7q_5q 5h 5h t s._3e 3q t s t) :pitch '(a4))) ;;; when you use my BINARY-FILTER_OLD which has the OPMO length-invert you will get a strange display-result (looks bad) ;; have a look with cmd3 (binary-filter-old omn-seq '(0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1)) => (-1/32 s a4 mf -1/32 3q a4 mf -13/96 t a4 mf -1/10 5h a4 mf -3/35 7q a4 mf -1/28 7q a4 mf -1/28 7q a4 mf 7q_5q a4 mf 5h a4 mf 5h a4 mf t a4 mf s._3e a4 mf 3q a4 mf)
     
     
     
    EXAMPLE WITH USING THE ALTERNATIVE VERSION:
     
    ;;; EXAMPLE => complex rhythms (setf omn-seq (make-omn :length '(t s t 3q 3e_s. t 5h 5h 5q_7q 7q 7q 7q 7q 7q 7q_5q 5h 5h t s._3e 3q t s t) :pitch '(a4))) ;;; when you use the new BINARY-FILTER with the new length-invert** ;; have a look with cmd3 (binary-filter* omn-seq '(0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1)) => (-t s a4 mf -t 3q a4 mf -3e_s. t a4 mf -5h 5h a4 mf -5q_7q 7q a4 mf -7q 7q a4 mf -7q 7q a4 mf 7q_5q a4 mf 5h a4 mf 5h a4 mf t a4 mf s._3e a4 mf 3q a4 mf) ;;; you see the FORMAT (-3e_s.) didn't changed in the rests (not -13/96), so it will be displayed well
     
  23. Thanks
    AM got a reaction from JulioHerrlein in Creating Custom Chord Symbols   
    i think it's good and important to see that opusmodus is not a notation software (like sibelius/finale/dorico...). the potential is rightly in another area and i believe that it is important to keep the basic idea of opusmodus in focus (it's important to have restrictions/limitations) - and i think the development team is very aware of that .
    you can not have everything, but what is possible should be very very smart in its kind.
     
    the longer i work with opusmodus, the more i realize, for what i can use it ...and when I have to switch to another platform. 
    and because it is so open, it is then possible for me to find solutions for my specific needs, by being able to program myself and not simply having to do what the existing tools / functions allow.
     
    okay i admit i'm a big fan of opusmodus, although i do not even compose with it but can try/simulate basic ideas of my work - doing abstract/new things and see what happens - like working in an LAB 🙂
     
  24. Like
    AM got a reaction from Stephane Boussuge in Creating Custom Chord Symbols   
    i think it's good and important to see that opusmodus is not a notation software (like sibelius/finale/dorico...). the potential is rightly in another area and i believe that it is important to keep the basic idea of opusmodus in focus (it's important to have restrictions/limitations) - and i think the development team is very aware of that .
    you can not have everything, but what is possible should be very very smart in its kind.
     
    the longer i work with opusmodus, the more i realize, for what i can use it ...and when I have to switch to another platform. 
    and because it is so open, it is then possible for me to find solutions for my specific needs, by being able to program myself and not simply having to do what the existing tools / functions allow.
     
    okay i admit i'm a big fan of opusmodus, although i do not even compose with it but can try/simulate basic ideas of my work - doing abstract/new things and see what happens - like working in an LAB 🙂
     
  25. Like
    AM reacted to Stephane Boussuge in Make-chord-if-length study   
    Here's a small piano study using my new function make-chord-if-length and few others from my personal lib.
    Enjoy 😉
    SB.
     
    ;;; UTILITIES ;;; ======================================== ;;; GEN-PITCH-LINE ;;; Fonction de génération de hauteurs basées sur une conversion de vecteur de bruit ;;; avec un grand choix de type de bruit, taux de compression du vecteur, filtrage des répétitions et ambitus. (defun gen-pitch-line (nb-pitch &key (compress 1) (ambitus '(c4 c6)) seed filter-repeat (type :white)) (setf seed (rnd-seed seed)) (let (pitches) (do-verbose ("gen-pitch-line :seed ~s" seed) (labels ((white-or-pink (nb-pitch seed type) (if (eq type ':pink) (gen-pink-noise nb-pitch :seed seed) (gen-white-noise nb-pitch :seed seed :type (if (eq type ':white) :normal type)))) (process (nb-pitch &key (compress 1) (ambitus '(c4 c6)) seed filter-repeat type) (setf pitches (vector-to-pitch ambitus (vector-smooth compress (white-or-pink nb-pitch seed type)))) (when filter-repeat (setf pitches (gen-trim nb-pitch (filter-repeat filter-repeat pitches)))) pitches) ) (process nb-pitch :compress compress :ambitus ambitus :filter-repeat filter-repeat :seed (seed) :type type))))) #| USAGE (gen-pitch-line 24 :compress 0.42 :type :white :filter-repeat 1) (gen-pitch-line 24 :compress 0.42 :type :pink :filter-repeat 1) (gen-pitch-line 24 :compress 0.42 :type :extreme :filter-repeat 1) (gen-eval 8 '(make-omn :pitch (gen-pitch-line 24 :compress 0.42 :type :white :filter-repeat 1) :length (euclidean-rhythm 16 1 16 's :type 2) ) :seed 33) |# ;;; OMN-ARTICULATION-PROCESSOR (defun omn-articulation-processor (map omn-mat &key (section nil)) (do-verbose ("omn-articulation-processor") (let ((artic (pattern-map map (omn :length omn-mat) :otherwise '(default) :section section)) ) (omn-replace :articulation artic omn-mat) ))) ;;; MAKE-CHORD-IF-LENGTH (defun make-chord-if-length-aux (omn &key (test #'>) (length-val 1/8) (interval-list '((4 7)(7 12))) (cycle t)(relative nil) seed) (setf seed (rnd-seed seed)) (let ((s-events (single-events omn))) (loop for e in s-events when (funcall test (omn-encode (first e)) length-val) append (omn-replace :pitch (gen-chord3 (list (second e)) interval-list :cycle cycle :relative relative :seed (seed)) e ) else append e))) (defun make-chord-if-length (omn &key (test #'>) (length-val 1/8) (interval-list '((4 7)(7 12)))(cycle nil)(relative nil) seed) (setf seed (rnd-seed seed)) (do-verbose ("make-chord-if-length :seed ~s :length-val ~s :interval-list ~s :cycle ~s :relative ~s" seed length-val interval-list cycle relative) (let ((test-fn (case test (> #'>) (< #'<) (= #'=) (otherwise test)))) (if (listp (car omn)) (mapcar #'(lambda (x) (make-chord-if-length-aux x :test test-fn :length-val (omn-encode length-val) :interval-list interval-list :cycle cycle :relative relative :seed (seed))) omn) (make-chord-if-length-aux omn :test test-fn :length-val (omn-encode length-val) :interval-list interval-list :cycle cycle :relative relative :seed (seed)))))) ;;; ======================================== ;;;--------------------------------------------------------- ;;; Parameters ;;;--------------------------------------------------------- (setf size 24) (setf flow1 (pitch-transpose -7 (make-omn :pitch (gen-pitch-line 128 :compress 0.33 :seed 729353) :length (rnd-sample size '((s s s s s s s s -q) (e e h)(h.)(q q e e) (e e q q)(s s s s q q) (q s s s s q)(s s e -e s s q) ) :seed 729355) :velocity (rnd-sample size '((ppp)(pp)(p)(mp)(mf)) :seed 729356) ))) (setf flow2 (pitch-transpose -4 (make-omn :pitch (gen-pitch-line 128 :compress 0.73 :seed 353) :length (rnd-sample size '((h. ) (q. e q)(h.)(q q q) (h -q)(e e h) (h e e) ) :seed 729355) :velocity (rnd-sample size '((ppp)(pp)(p)) :seed 729356) ))) (setf flow3 (pitch-transpose -7 (make-omn :pitch (gen-pitch-line 128 :compress 0.33 :seed 7353) :length (rnd-sample size '((s s s s s s s s -q) (e e h)(h.)(q q e e) (e e q q)(s s s s q q) (q s s s s q)(s s e -e s s q) ) :seed 7255) :velocity (rnd-sample size '((ppp)(pp)(p)(mp)(mf)) :seed 7256) ))) ;;; Articulation remap (setf map '(((1/16 1/16 1/16 1/16)(leg leg leg default)))) (setf with-ch1 (omn-articulation-processor map (pitch-ornament (make-chord-if-length flow1 :interval-list '((-7 -19 3 9)(-4 -16 3 7) (-5 -17 4 12)(-3 -15 7)) :cycle nil :relative t :seed 729358 )))) (setf with-ch2 (omn-articulation-processor map (pitch-ornament (make-chord-if-length flow2 :interval-list '((-7 -19 3 9)(-4 -16 3 7) (-5 -17 4 12)(-3 -15 7)) :cycle nil :relative t :seed 729358 )))) (setf with-ch3 (omn-articulation-processor map (pitch-ornament (make-chord-if-length flow3 :interval-list '((-7 -19 3 9)(-4 -16 3 7) (-5 -17 4 12)(-3 -15 7)) :cycle nil :relative t :seed 729358 )))) ;;; SCORE ASSEMBLY (setf piano-rh (omn-replace :articulation '(default leg leg leg default fermata-l) (ambitus-filter '(c4 c8) (assemble-seq with-ch1 with-ch2 with-ch3)) :section '(71))) (setf piano-lh (omn-replace :articulation '(default fermata-l) (ambitus-filter '(c0 b3) (assemble-seq with-ch1 with-ch2 with-ch3)) :section '(71))) ;;;--------------------------------------------------------- ;;; Score and Layout ;;;--------------------------------------------------------- (def-score Study (:title "Mcil-study" :composer "S.Boussuge" :copyright "Copyright © 2018 s.boussuge " :key-signature 'chromatic :time-signature '((1 1 1) 4) :tempo 82 :layout (piano-solo-layout 'piano-rh 'piano-lh)) (piano-rh :omn piano-rh :channel 1 :sound 'gm :program 'acoustic-grand-piano :volume 100 :pan 64 :controllers (91 '(48)) ) (piano-lh :omn piano-lh :channel 2 :controllers (91 '(48)) ) )  
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy