Jump to content

JulioHerrlein

Members
  • Posts

    814
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    JulioHerrlein reacted to opmo in Quantisation?   
    Achim Bornhoeft and I we had a brain storming session on quantisation here in Venice for two days.
    The code will be ready for testing in few days.
    The holidays might delay the release a bit.
    The test are already very promising :-)
  2. Thanks
    JulioHerrlein reacted to Wim Dijkgraaf in Neo-Riemannian approach (Tonnetz, etc.)   
    A little extra feature to play with:
     
    (apply-tonnetz '(c4 e4 g4) '(l r n s p)) => ((c4 e4 g4) (b3 e4 g4) (b3 d4 g4) (c4 eb4 g4) (b3 eb4 fs4) (b3 d4 fs4))  
    Ability to not include a move in the output (by putting that move between parentheses):
     
    (apply-tonnetz '(c4 e4 g4) '(l r n (s) p)) => ((c4 e4 g4) (b3 e4 g4) (b3 d4 g4) (c4 eb4 g4) (b3 d4 fs4))  
  3. Thanks
    JulioHerrlein reacted to Wim Dijkgraaf in Neo-Riemannian approach (Tonnetz, etc.)   
    Have published the initial Tonnetz implementation (really bad code, has to be refactored and has some bugs):
     
    This is my first attempt ... still completely novice in Common Lisp.
     
    https://github.com/willemdijkgraaf/ClTonnetz
     
    Big hug
    Thanks Torsten! Will check it out. I'm fluent in C#, Typescript and Javascript but will check it out anyway.
  4. Thanks
    JulioHerrlein reacted to Wim Dijkgraaf in Neo-Riemannian approach (Tonnetz, etc.)   
    I'm not an expert in Neo-Riemannian Theory at all but as a consequence of my Common Lisp study and writing of some functions to do Diatonic Neigbour Tones and Leading Tones, I bumped into this and it's kind of what I'm trying to accomplish musically.
     
    Does Opusmodus have functions for this (implicitly or explicitly) or does anyone know of a Common Lisp library that is already specialized in Neo-Riemannian transformation? Basically the ability to do P R and L motions using elegant functions and calculating the shortest modulation (shortest Tonnetz steps) from any triad to any other triad.
     
    One of the many explanations on youtube: 
     
     
     
     
     
  5. Like
    JulioHerrlein reacted to lviklund in Pcs: how to retrieve inverted forms from this function ?   
    Nice work and a good companion to Allan Forte.
     
    /Lasse
  6. Like
  7. Like
    JulioHerrlein reacted to loopyc in Pcs: how to retrieve inverted forms from this function ?   
    I opted for a 'physical copy', so will have to wait until Dec. 21st...just in time for a Christmas gift to myself ;-)
     
  8. Like
    JulioHerrlein reacted to loopyc in Pcs: how to retrieve inverted forms from this function ?   
    Going to, looks good...thanks for the notice ;-)
  9. Like
    JulioHerrlein reacted to Stephane Boussuge in After The Club for Piano   
    Hi,
     
    here's a quiet speed piece playing around the jazz piano ;-)
     

    SB.
     
     
  10. Like
    JulioHerrlein reacted to AM in muting every other note   
    code from another project, but should work in a similar way. take it, modify it, or code it properly :-)
    regards
    andré
     
    ;; gen-hoquetus.4 https://en.wikipedia.org/wiki/Hocket ;;; andré meier / 27-4-2016 ;;; write a instrumentation-list (instrument + techniques + velocity), pitch-list ;;; and length-list. the gen-hoquetus-function will split the melody ;;; off... in any possibilities, techniques/articulations/velocities will be added ;;; this is only a function i coded for my actual work... perhaps you could use ;;; it or code it properly :-) ;;; HAVE FUN! regards, andré (setq instrumentation '(((pno ponte ppp)) ((vn pizz p)) ((vn pizz f) (va ponte f)) ((pno tasto ff)) ((pno pizz fff)) ((vn tasto mf) (pno ord ff) (vc tasto mf) (trp ord pp)) ((trp mute pp) (vn ponte mf)))) ;; subfunctions (defun generate-events.4 (durations pitches &key (velocity '(mf)) (articulation '(-)) (optional_data 'nil)) (loop repeat (length durations) with cnt-d = 0 with cnt-rest = 0 when (> (nth cnt-d durations) 0) collect (list (nth cnt-d durations) (nth cnt-rest pitches) (nth cnt-rest velocity) (nth cnt-rest articulation) (nth cnt-rest optional_data)) and do (incf cnt-rest) and do (incf cnt-d) else collect (list (nth cnt-d durations) 'nil 'nil 'nil 'nil) and do (incf cnt-d))) (generate-events.4 '(1 2 -3 4) '(60 61 62) :optional_data instrumentation) ;; (defun filtering-color.4 (selected-color event-stream) (loop for i in event-stream with match = 0 append (loop for x in (fifth i) when (equal (first x) selected-color) do (setq articulation (second x) velocity (third x)) and do (setq match 1)) when (and (= match 1) (> (first i) 0)) append (list (first i) (second i) velocity articulation) else collect (* -1 (abs (first i))) do (setq match 0))) (filtering-color.4 'vn (generate-events.4 (gen-length '(1 -100 2 3 4 5) 1/32) '(c4 d4 e4 e5) :optional_data instrumentation)) ;; mainfuction: (defun gen-hoquetus.4 (filtered-instrument &key pitch length instrument-list) (let ((events (generate-events.4 length pitch :optional_data instrument-list))) (filtering-color.4 filtered-instrument events))) (gen-hoquetus.4 'vn :pitch '(c4 d4 e5 f6) :length '(1/32 2/32 3/32 4/32) :instrument-list instrumentation) ;; OMN_EXAMPLE: (setq pitches (midi-to-pitch '(60 61 62 63 64 65 66 67 68 69 70))) ; only an example (setq lengths (gen-length '(1 2 3 -4 5 6 5 -4 3 -2 1) 1/16)) ; only an example (setq instrumentation (loop repeat 10 collect (rnd-pick '(((pno ponte ppp)) ; only an example ((vn pizz p)) ((vn pizz f) (va ponte f)) ((pno tasto ff)) ((pno pizz fff)) ((vn tasto mf) (pno ord ff) (vc tasto mf) (trp ord pp)) ((trp mute pp) (vn ponte mf)))))) (def-score hoquetus.4 (:key-signature '(c maj) :time-signature '(4 4) :tempo '(120) :layout (bracket-group (trumpet-layout 'trumpet) (piano-grand-layout 'piano) (violin-layout 'violin) (viola-layout 'viola) (violoncello-layout 'violoncello))) (trumpet :omn (gen-hoquetus.4 'trp :pitch pitches :length lengths :instrument-list instrumentation) :channel 1) (piano :omn (gen-hoquetus.4 'pno :pitch pitches :length lengths :instrument-list instrumentation) :channel 1) (violin :omn (gen-hoquetus.4 'vn :pitch pitches :length lengths :instrument-list instrumentation) :channel 1) (viola :omn (gen-hoquetus.4 'va :pitch pitches :length lengths :instrument-list instrumentation) :channel 1) (violoncello :omn (gen-hoquetus.4 'vc :pitch pitches :length lengths :instrument-list instrumentation) :channel 1))  
  11. Like
    JulioHerrlein reacted to o_e in Length-Legato opposite function   
    thanks a lot!
  12. Thanks
    JulioHerrlein reacted to AM in Length-Legato opposite function   
    it was necessary to re-organize "OMN with ties" by "omn-merge-ties" first...
    and find a solution if  staccato-length = length ...
    added 2 minutes later you're welcome... 
    it's a bit like "BRAINFOOD" solving such things... but TORSTEN is the "code-master" for the complicated things!! 🙂
     
    so, i have to compose now, the real hard work.
  13. Thanks
    JulioHerrlein reacted to AM in Length-Legato opposite function   
    the solution...
     
    (defun length-staccato (n alist) (let ((newlengths) (new-omn (omn-merge-ties (flatten alist))) (time-sign (get-time-signature alist))) (progn (setf newlengths (loop for i in (omn :length new-omn) when (> i 0) append (if (= n i) (list i) (list n (* -1 (abs (- i n))))) else collect i)) (if (omn-formp alist) (omn-to-time-signature (make-omn :length newlengths :pitch (omn :pitch new-omn) :velocity (omn :velocity new-omn) :articulation (omn :articulation new-omn)) time-sign) newlengths)))) (length-staccato 1/16 '(q -q q q)) (length-staccato 1/16 '(q e4 mp q tasto q -q q q)) (length-staccato 1/16 '((e. c4 eb4 fs4 a4 tie) (s a4 e. cs4 e4 g4 e bb4 tie) (e bb4 e. d4 f4 gs4 s b4)))  
  14. Thanks
    JulioHerrlein reacted to o_e in Length-Legato opposite function   
    You are welcome! Maybe Janusz can chime in and tell us something about how to handle tied notes in functions like this. I really would like to know that!
  15. Thanks
    JulioHerrlein reacted to o_e in Length-Legato opposite function   
    Hi Julio,
     
    I've found two problems. The weird one you had I think I could find and solve, but the function also does not handle tied notes properly and I have no idea how to remedy that. That goes waay above my hacking abilities :-)

    (length-staccato 1/16 '((e. c4 eb4 fs4 a4 tie) (s a4 e. cs4 e4 g4 e bb4 tie) (e bb4 e. d4 f4 gs4 s b4))) -->((s c4 -e s eb4 -e s fs4 -e s a4 -e) (s a4 cs4 -e s e4 -e s g4 -e s bb4 -) (s bb4 - d4 -e s f4 -e s gs4 -e s b4))
     

     
    Nevertheless the code with the one correction, so it's not perfect but maybe somehow useful for you..
    best  ole

    (defun length-staccato (n alist)   (let ((newlengths (loop for i in (omn :length (flatten alist))                       when (> i n)                       append (list n (* -1 (abs (- i n))))                       else collect i)))     (if (omn-formp alist)       (omn-to-time-signature        (make-omn :length newlengths                 :pitch (omn :pitch alist)                 :velocity (omn :velocity alist)                 :articulation (omn :articulation alist))        (get-time-signature alist))       newlengths)))
  16. Thanks
    JulioHerrlein reacted to o_e in Length-Legato opposite function   
    Hi,
     
    Just a minor improvement, the function is now also working with sublists :-)
     
    best ole
     

    (defun length-staccato-lists (n alist)   (let ((newlengths (loop for i in (omn :length (flatten alist))                       when (> i 0)                       append (list n (* -1 (abs (- i n))))                       else collect i)))     (if (omn-formp alist)       (omn-to-time-signature        (make-omn :length newlengths                 :pitch (omn :pitch alist)                 :velocity (omn :velocity alist)                 :articulation (omn :articulation alist))        (get-time-signature alist))       newlengths))) (length-staccato-lists 1/16 '((q e4 mp q tasto q -q q q)(q e4 mp q tasto q -q q q))) -->((s e4 mp -e. s e4 tasto -e. s e4 -e. -q s e4 -e. s e4 -e.) (s e4 -e. s e4 tasto -e. s e4 -e. -q s e4 -e. s e4 -e.))
  17. Like
    JulioHerrlein reacted to AM in Length-Legato opposite function   
    dear julio
    i don't know if there is a solution in the om-library... coded quickly one for your problem...
    the basic-rhythms (denominator) should stay constant like in your examples, then it works...
     
    first value has to be your "stacc-length", second your omn-list or a length-list, have a look to the example...
    greetings
    andré
     
    (defun length-staccato (n alist) (let ((newlengths (loop for i in (omn :length alist) when (> i 0) append (list n (* -1 (abs (- i n)))) else collect i))) (if (omn-formp alist) (make-omn :length newlengths :pitch (omn :pitch alist) :velocity (omn :velocity alist) :articulation (omn :articulation alist)) newlengths))) (length-staccato 1/16 '(q e4 mp q tasto q -q q q))  
     
  18. Like
    JulioHerrlein reacted to opmo in Saving Plots and Piano Rolls to PDF Vectorial Graphics ETC   
    This will save a PNG file in the Opusmodus/Graphs folder:
     
    (setf length '(q e = s = = = -q e - = s = = -e.) pitch '(c4 cs5 d4 ds5 e4 f5 fs4 g5 gs4 a5 as4 b5)) (length-pitch-list-plot length pitch :file "length-pitch-plot.png")  
    As for the piano roll you will need to create a screenshot with cmd/shift/4.
  19. Like
    JulioHerrlein got a reaction from loopyc in Pcs: how to retrieve inverted forms from this function ?   
    WOW !!! GREAT !
    Thanks !
    It was really a lot of work done !
    Lots of sets, but it's really useful, I think.
    Best !
    Julio
    This will be in the next release, I think. Looking Forward !
    added 2 minutes later If you like Set Theory and Guitar, you gonna like my book. Please, Check it out !
     
    https://www.melbay.com/Products/Default.aspx?bookid=30042BCDEB
     
    Best,
    Julio
  20. Like
    JulioHerrlein got a reaction from lviklund in Pcs: how to retrieve inverted forms from this function ?   
    WOW !!! GREAT !
    Thanks !
    It was really a lot of work done !
    Lots of sets, but it's really useful, I think.
    Best !
    Julio
    This will be in the next release, I think. Looking Forward !
    added 2 minutes later If you like Set Theory and Guitar, you gonna like my book. Please, Check it out !
     
    https://www.melbay.com/Products/Default.aspx?bookid=30042BCDEB
     
    Best,
    Julio
  21. Thanks
    JulioHerrlein got a reaction from opmo in Pcs: how to retrieve inverted forms from this function ?   
    WOW !!! GREAT !
    Thanks !
    It was really a lot of work done !
    Lots of sets, but it's really useful, I think.
    Best !
    Julio
    This will be in the next release, I think. Looking Forward !
    added 2 minutes later If you like Set Theory and Guitar, you gonna like my book. Please, Check it out !
     
    https://www.melbay.com/Products/Default.aspx?bookid=30042BCDEB
     
    Best,
    Julio
  22. Like
    JulioHerrlein reacted to opmo in Pcs: how to retrieve inverted forms from this function ?   
    Congratulation to your book, looks very good.
    JP
  23. Like
    JulioHerrlein got a reaction from Stephane Boussuge in Pcs: how to retrieve inverted forms from this function ?   
    WOW !!! GREAT !
    Thanks !
    It was really a lot of work done !
    Lots of sets, but it's really useful, I think.
    Best !
    Julio
    This will be in the next release, I think. Looking Forward !
    added 2 minutes later If you like Set Theory and Guitar, you gonna like my book. Please, Check it out !
     
    https://www.melbay.com/Products/Default.aspx?bookid=30042BCDEB
     
    Best,
    Julio
  24. Like
    JulioHerrlein reacted to opmo in Pcs: how to retrieve inverted forms from this function ?   
    of course:
     
    (pcs '3-11b) => (0 4 7)  
    INTERVAL-CLASS:
    (interval-class '(0 1 2 11 10 9 5 4 3 6 7 8)) => (1 1 3 1 1 4 1 1 3 1 1) (interval-class '(0 1 3 8 4 9 10 7 6 5 11 2)) => (1 2 5 4 5 1 3 1 1 6 3) (interval-class '(0 11 5 7 6 1 3 4 2 9 8 10)) => (1 6 2 1 5 2 1 2 5 1 2)  
  25. Like
    JulioHerrlein reacted to opmo in Pcs: how to retrieve inverted forms from this function ?   
    The PCS-ANALYSIS function returns two more results: inverted-form  and interval-class:
     
    (pcs-analysis '(4 1 8 10 3 7)) => Sequence: (4 1 8 10 3 7) Set: 6-z29 Prime Form: (0 2 3 6 7 9) Inverted Form: nil Pitch: (c4 d4 eb4 fs4 g4 a4) Normal Order: (1 3 4 7 8 10) Complement: (0 2 5 6 9 11) Inversion: (8 11 4 2 9 5) Vector: (2 2 4 2 3 2) Interval Class: (3 5 2 5 4) (pcs-analysis '(0 3 7)) => Sequence: (0 3 7) Set: 3-11 Prime Form: (0 3 7) Inverted Form: (0 4 7) Pitch: (c4 eb4 g4) Normal Order: (0 3 7) Complement: (1 2 4 5 6 8 9 10 11) Inversion: (0 9 5) Vector: (0 0 1 1 1 0) Interval Class: (3 4) (pcs-analysis '(0 4 7)) => Sequence: (0 4 7) Set: 3-11b Prime Form: (0 3 7) Inverted Form: (0 4 7) Pitch: (c4 e4 g4) Normal Order: (0 4 7) Complement: (1 2 3 5 6 8 9 10 11) Inversion: (0 8 5) Vector: (0 0 1 1 1 0) Interval Class: (4 3)  
    The new function PCS-FORMS takes care of both forms: prime-form and inverted-form.
    The inverted form set ends with letter b:
     
    (pcs-forms '((0 4 7) (0 3 7)) :type :set) => (3-11b 3-11)  
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy