Jump to content

opmo

Administrators
  • Posts

    2,894
  • Joined

  • Last visited

Everything posted by opmo

  1. My question is what will happen if there are few matches in a sequence and not only one.
  2. (setf seq '(e c4 -e -q q d4 -q s q d4 c4 e. q d4 h. q)) (setf insert '(3q c4 d4 e4 c4 d4 e4 c4 d4 -3q)) (setf insert-span (get-span insert)) (setf match '(q d4 ?)) Your code returns: (e c4 mf -e -q 3q c4 d4 e4 c4 d4 e4 c4 d4 -3q q d4 mf q c4 mf e. c4 mf q d4 mf h. d4 mf q d4 mf) ?
  3. What will happen if there are few matches: (q d4 ?) (setf seq '(e c4 -e -q q d4 -q s q d4 c4 e. q d4 h. q)) (setf insert '(3q c4 d4 e4 c4 d4 e4 c4 d4 -3q))
  4. How we come to the length: -3q in the last list. this (the rest of the original seq): -q s c4 -e. q needs to be replaced, how?
  5. This example (above) is simple insert. I like you to explain this: (e c4 -e -q) (3q c4 d4 e4 c4 d4 e4 c4 d4) (-3q q c4) from where is the last list coming from?
  6. You need to explain the process a bit better. Should the span after the process stay of the original sequence? Is the insert (which it is) should complete the span with there own loop etc... All this is simple to code if the process is known :-) added 7 minutes later Your example: ;; seq (e c4 -e -q q c4 -q s c4 -e. q) ;; insert (3q c4 d4 e4 c4 d4 e4 c4 d4) ;; pattern-match (q c4) result in block (e c4 -e -q) (3q c4 d4 e4 c4 d4 e4 c4 d4) (-3q q c4) from where is the last list coming from?
  7. (setf map '(((q d4 ?) (3q c4 d4 e4 c4 d4 e4 c4 d4 -3q)))) (pattern-map map '(e c4 -e -q q d4 -q s c4 -e. -h. q)) => (e c4 -e -q 3q c4 d4 e4 c4 d4 e4 c4 d4 -3q s c4 -e. -h. q)
  8. I would advise to search the library, you might find thinks you never thought of
  9. opmo

    microtonality

    The support of microtonality, midi input (keyboard), xml to omn etc... will be part of the version 2.0
  10. SAMPLING-LIST function is missing :-)
  11. Added new keyword :type to TONALITY-MAP and TONALITY-SERIES function with three options: prime-form, normal-order and row. Examples: (setf seq2 (rnd-row :type :pitch :seed 345)) => (c4 d4 g4 f4 cs4 b4 gs4 e4 fs4 a4 bb4 eb4) (tonality-map '((0 1 11 6 3 2 4 9) :map step :type normal-order) seq2) => (a4 c4 fs4 eb4 b4 cs5 a5 d4 e4 b5 c5 cs4) (tonality-map '((0 1 11 6 3 2 4 9) :map step :type prime-form) seq2) => (c4 eb4 a4 fs4 d4 e5 c5 f4 g4 d5 eb5 e4) (tonality-map '((0 1 11 6 3 2 4 9) :map step :type row) seq2) => (c4 d4 b4 fs4 cs4 eb5 c5 e4 a4 cs5 d5 eb4) (tonality-map '((0 1 11 6 3 2 4 9) :map step :type normal-order :rotate 1) seq2) => (b4 cs4 a5 e4 c4 d5 b5 eb4 fs4 c5 cs5 d4) (tonality-map '((0 1 11 6 3 2 4 9) :map step :type prime-form :rotate 1) seq2) => (d4 e4 c5 g4 eb4 f5 d5 fs4 a4 eb5 e5 f4) (tonality-map '((0 1 11 6 3 2 4 9) :map step :type row :rotate 1) seq2) => (cs4 eb4 c5 a4 d4 e5 cs5 fs4 b4 d5 eb5 e4) Best wishes, JP
  12. Function name change: RANDOMIZE-OCTAVES is now RND-OCTAVES Optimisation: TONALITY-MAP To change the function name in all of your scores you can use the 'Search Files...' tool.
  13. opmo

    Dim al niente

    For now only this is possible. '(q a4 0< b4 p>0 -q)
  14. ((eb4 num3 f4 num5 gb4 num8 a4 num9 c4 num0) (bb4 num11 c4 num0 eb4 num3 e4 num4 f4 num5)) List of all attributes you find in the '4th Element - Attributes' document. Of course you can create your own attributes (articulations) as well, with ADD-TEXT-ATTRIBUTES function.
  15. Score with ADD-TEXT-ATTRIBUTES and GEN-DYNAMIC-CONTROLLER. ;;;--------------------------------------------------------- ;;; Sechs Bagatellen fuer Streichquartett OP.9, I ;;;--------------------------------------------------------- (add-text-attributes '(daempfer "mit Dämpfer") '(steg "am Steg") '(d-saite "d-Saite") ) (setf violin1-I '((-q - cs5 pp< daempfer+ubow+tie) (e cs5 > - - bb5 p> leg e5 > leg f4) (q g4 pp> leg eb4 -) (-3q eb4ab4 <> harm - -q -) (-q -3q 3h f6 pp<> ubow) (-q e a6 f< ten fs6 < ten) (q g5 ff - -3q - b3 f marc) (e. c4 < leg s b3 -q -e f3ds4 p leg) (q a3gs4 < - -) (-e q g3fs4 ppp> ten -e fermata -q))) (setf violin2-I '((-h.) (e c4 pp< daempfer+leg gb4 < leg 3h ab4 -3q -q) (-h.) (q bb3 pp pizz+ten - gs3e4 pp<> ubow+arco) (-q d4 pp< ttrem+steg+leg fs4 steg) (-h) (-q -3q 3h gs5 ff d-saite+leg q f4 >) (-q -3q gs3 f> stacc+pizz a4 > stacc -q) (-3q 3h eb6 f> ten+arco+tie s eb6 - e gb4 p> leg+d-saite f5 leg s e5 -) (-h. fermata))) (setf viola-I '((-q -3q 3h eb4 pp<> ubow+harm+ten+steg+daempfer -q) (-q s a3 pp stacc+steg b3 stacc+steg a3 stacc+steg b3 stacc+steg a3 stacc+steg b3 stacc+steg a3 stacc+steg b3 stacc+steg) (-h.) (-e. s c4 p< arco+leg q. c5 leg e bb4 >) (-h) (-s e b5 sf leg s bb4 >p< tie e bb4 -) (-q e f5 fff ten+pizz eb5 ten -q) (-e q. cs5fs5 sfp harm+arco+trem -e b3fs4 p leg) (q c3cs4 < - -s e. bb5 p> marc+tie) (e. bb4 pp -s -3q c5 ppp> fermata+ten - -q))) (setf cello-I '((-q d4 pp< ten+harm+daempfer -) (-q - -3q 3h fs2 pp leg+tie) (q. fs2 < leg e e2 > e4 p leg d5 leg+tie) (e d5 < leg f5 > -q a2f3 pp<>) (-e q cs3fs3 p< ten+harm e g2 pp ten+tie) (3q g2 < 3h cs3fs3 f ten+harm -e c2b2 f stacc+pizz) (-s gs4 ff< leg+arco e e5 < leg+tie q e5 < -e db3c4 f stacc+pizz) (-q -e g3 sffp harm+arco+marc+leg q d4 > app+leg 3q g3 harm 3h g3 f> harm+marc+tie) (e g3 > harm g3 p harm+marc+tie 3q g3 > harm - - -q) (3q b2 pp pizz - cs2fs2 pp< harm+arco+tie e cs2fs2 > harm -e fermata -q))) (setf tempo-I '(("Mäßig" 60 :length 10/4) (:rit 60 40 1/64 2/4) (60 2/4) (:accel 60 96 1/64 2/4) ("heftig" 96 2/4) (:rit 96 60 1/64 1/4) ("wieder mäßig" 60 4/4) (:rit 60 44 1/64 2/4) (44 3/4))) (def-score Anton-Webern-OP-9-I ( :title "Sechs Bagatellen für Streichquartett OP.9, I" :composer "Anton Webern" :copyright "Copyright © 1924 Universal Edition" :key-signature 'chromatic :time-signature (get-time-signature violin1-I) :tempo tempo-I :octave-shift '(c2 c6) :merge-rests t :flexible-clef t :accidentals :cautionary :layout (string-quartet-layout 'vln1 'vln2 'vla 'vlc) ) (vln1 :omn violin1-I ;:port 0 :channel 1 :sound 'vsl-violin-solo :controllers (11 (gen-dynamic-controller violin1-I))) (vln2 :omn violin2-I :channel 2 :sound 'vsl-violin-solo :controllers (11 (gen-dynamic-controller violin2-I))) (vla :omn viola-I :channel 3 :sound 'vsl-viola-solo :controllers (11 (gen-dynamic-controller viola-I))) (vlc :omn cello-I :channel 4 :sound 'vsl-cello-solo :controllers (11 (gen-dynamic-controller cello-I))) )
  16. I would stick with ADD-TEXT-ATTRIBUTES and with unique names (hash table). Just add your specific list of the attributes at the beginning of each of your score (no need to add them to the Extensions folder). (add-text-attributes '(esp "espressivo") '(law "like a whisper") '(n3.14 "3.14") '(pc4 "C4") '(n3.14-pc4 "C4 3.14") '(delay100 "delay 100") '(s1 "-7 2 3.14 1000") '(rq "1/4") '(n1 "1")) Examples: (q c4 n3.14+delay100+s1) (q c4 n3.14+delay100) (q c4 n3.14+pc4) (q c4 n3.14-pc4) (q c4 law) (q c4 n1) (q c4 rq) (q c4 s1) The attribute must work with midi, musicxml and omn. This is why the solution '(name string) is the must reliable way to create/add new attributes to the system - less errors
  17. Changes to TONALITY-MAP function: The map shift name is changed to step. The sort by default is nil. The function TONALITY-MAP can be used to map tonalities on to a chromatic pitch series. There are two types of map: step and NIL. The step map use the sequence interval steps to map the tonalities on to the sequence. The map NIL use the sequence integers to map the tonalities to the closest integer on to the sequence. In the following example we use the closest type map: (tonality-map '((0 2 4 7 9 11)) '(c4 cs4 d4 cs4 eb4 f4 e4)) => (c4 d4 d4 c4 e4 f4 e4) Here we use the step map: (tonality-map '((0 2 4 7 9 11) :map step) '(c4 cs4 d4 cs4 eb4 f4 e4)) => (c4 d4 e4 d4 g4 b4 a4) New keywords :extend and :end added to the GEN-DYNAMIC and VELOCITY-TO-DYNAMIC function: GEN-DYNAMIC Example with optional :end velocity value: (gen-dynamic '(3 5 4 4 5) '(pp f ff mf f) :end 'p) => (pp< < < f< < < < < ff> > > > mf< < < < f> > > > p) (gen-dynamic '(3 5 4 4 5) '(pp f ff mf f) :end '>) => (pp< < < f< < < < < ff> > > > mf< < < < f> > > > >) (gen-dynamic '(3 5 4 4 5) '(pp f ff mf f) :end '<) => (pp< < < f< < < < < ff> > > > mf< < < < f< < < < <) (gen-dynamic '((3 5) (4 4) (5 3)) '((pp f) (p mf) (f p)) :end 'f) => ((pp< < < f> > > > >) (p< < < < mf< < < <) (f> > > > > p< < f)) Setting the :extend to t will removes intermediate textual dynamic indicators and replace them with extended hairpins: (gen-dynamic '(3 5 4 4 5) '(pp f ff mf f) :end 'p :extend t) => (pp< < < < < < < < ff> > > > mf< < < < f> > > > p) (gen-dynamic '(3 5 4 4 5) '(pp f ff mf f) :end '< :extend t) => (pp< < < < < < < < ff> > > > mf< < < < < < < < <) (gen-dynamic '((3 5) (4 4) (5 3)) '((pp f) (p mf) (f p)) :end 'f :extend t) => ((pp< < < f> > > > >) (p< < < < < < < <) (f> > > > > p< < f)) VELOCITY-TO-DYNAMIC (velocity-to-dynamic '(p p mp mp f ff mp mp p f)) => (p< < mp< < f< ff> mp> > p< f) (velocity-to-dynamic '(p p mp mp f ff mp mp p f) :extend t) => (p< < < < < ff> > > p< f) (velocity-to-dynamic '(p p mp mp f ff mp mp p f) :end 'pp) => (p< < mp< < f< ff> mp> > p> pp) (velocity-to-dynamic '((pppp ppp ppp pp ppp p p mp mf mf) (f ff mf mp p ppp pppp))) => ((pppp< ppp< < pp> ppp< p< < mp< mf< <) (f< ff> mf> mp> p> ppp> pppp)) Setting the :extend to t will removes intermediate textual dynamic indicators and replace them with extended hairpins: (velocity-to-dynamic '(p p mp mp f ff mp mp p f) :end 'pp :extend t) => (p< < < < < ff> > > > pp) (velocity-to-dynamic '((pppp ppp ppp pp ppp p p mp mf mf) (f ff mf mp p ppp pppp)) :extend t) => ((pppp< < < pp> ppp< < < < < <) (f< ff> > > > > pppp)) Please check the documentation for more details. If you used the TONALITY-MAP with :map shift then you need to change the name shift to step. To make the changes to all of your scores you can use the 'Search Files...' tool. Minor fixes and code optimisation. Best wishes, JP
  18. Here is the final function. The VELOCITY-INTERMEDIATE will be part (keyword :join t) of the VELOCITY-TO-DYNAMIC function. Source code: (defvar *cresc-dynamic-symbol* '(< cresc cresc-molto cresc-poco cresc-poco-poco ppppp< pppp< ppp< pp< p< mp< mf< f< ff< fff< ffff< fffff<)) (defvar *dim-dynamic-symbol* '(> dim dim-molto dim-poco dim-poco-poco fffff> ffff> fff> ff> f> mf> mp> p> pp> ppp> pppp> ppppp>)) (defun cresc-p (x) (memq x *cresc-dynamic-symbol*)) (defun dim-p (x) (memq x *dim-dynamic-symbol*)) (defun velocity-intermediate (velocity &key end (flatten t) section exclude) (do-verbose ("velocity-intermediate") (labels ((velocity-intermediate-l (velocity &key end (flatten t)) (let ((dyn (velocity-to-dynamic velocity :end end :flatten flatten))) (append (list (first dyn)) (loop for (v1 v2) on dyn when (and v1 v2) collect (cond ((and (cresc-p v1) (cresc-p v2)) '<) ((and (dim-p v1) (dim-p v2)) '>) (t v2)))))) (%velocity-intermediate (velocity &key end (flatten t)) (if (listsp velocity) (loop for v in velocity collect (velocity-intermediate-l v :end end :flatten flatten)) (velocity-intermediate-l velocity :end end :flatten flatten))) (velocity-intermediate* (velocity &key end (flatten t)) (if (and (listsp velocity) flatten) (gen-divide (get-count velocity) (%velocity-intermediate (flatten velocity) :end end :flatten flatten)) (%velocity-intermediate velocity :end end :flatten flatten)))) (disassembling-omn ((velocity plist) velocity :velocity) (let ((velocity (remove-nils velocity))) (maybe-section (lambda (x) (velocity-intermediate* x :end end :flatten flatten)) velocity section exclude)))))) #| (velocity-intermediate '(p pppp f p pp ppp mp ff)) => (p> pppp< f> > > ppp< < ff) (velocity-intermediate '((e c4 f cs5 f d4 f ds5 p f4 p fs5 p c5 p pp) (e cs4 p f d4 f eb5 p f4 p eb4 f d3 p ppppp))) => ((e c4 f> cs5 > d4 > ds5 > f4 > fs5 > c5 > pp<) (e cs4 < f> d4 > eb5 p< f4 < eb4 f> d3 > ppppp)) (velocity-intermediate '(p pp ppp pppp f ff fff p pp ppp f ff fff ffff f p pp ppp mp ff)) => (p> > > pppp< < < fff> > > ppp< < < < ffff> > > > ppp< < ff) (velocity-intermediate '((p pp ppp pppp f ff fff p pp ppp f ff) (fff ffff f p pp ppp mp ff))) => ((p> > > pppp< < < fff> > > > pppp< ff) (p> pppp< f> > > ppp< < ff)) (velocity-intermediate '(ppppp< pppp< ppp< < < < mf> > > p f< ff< fff< ffff< fffff)) => (ppppp< < < < < < mf> > > p< < < < < fffff) |#
  19. As we all like the idea of the intermediate velocities I therefore have written a function which will work with both, velocity and dynamic symbols. Example: (velocity-intermediate '(p pppp f p pp ppp mp ff)) => (p> pppp< f> > > ppp< < ff) (velocity-intermediate '((p pp ppp pppp f ff fff p pp ppp pppp ff) (p pppp f p pp ppp mp ff))) => ((p> > > pppp< < < fff> > > > pppp< ff) (p> pppp< f> > > ppp< < ff)) (velocity-intermediate '(ppppp< pppp< ppp< < < < mf> > > p f< ff< fff< ffff< fffff)) => (ppppp< < < < < < mf> > > p< < < < < fffff)
  20. Other thing you need to do is to fix the one-note dynamic symbols. Here the 0<mp>0 symbol is gone: (simplify-dynamics '(p< mp< < < f> p> > 0<mp>0 mf< f> >)) => (p< < < < > > > < < f> >) This will help: *one-note-dynamic-symbol* Example: (memq x *one-note-dynamic-symbol*)
  21. Small bug: (simplify-dynamics '(p< < < < f> p> pp> ppp> pppp)) => (p< < < < > > > > pppp) I think we should get here: (p< < < < f> > > > pppp)
  22. OK, I can make it work with nested list. Well done.
  23. Have a go, I don't think it would be to difficult - especially with the vector values - to create < only with ascending series.
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy