Jump to content

opmo

Administrators
  • Posts

    2,901
  • Joined

  • Last visited

Everything posted by opmo

  1. 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
  2. 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) |#
  3. 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)
  4. 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*)
  5. Small bug: (simplify-dynamics '(p< < < < f> p> pp> ppp> pppp)) => (p< < < < > > > > pppp) I think we should get here: (p< < < < f> > > > pppp)
  6. OK, I can make it work with nested list. Well done.
  7. Have a go, I don't think it would be to difficult - especially with the vector values - to create < only with ascending series.
  8. Just to let you know the TONALITY-MAP with :map 'shift is doing the same thing already (tonality-step '(c4 messiaen-mode6) '(1 1 -1 (2 2 -1) 5 3 (2 3 -2) -2 1 1)) => (c4 d4 e4 d4 f4gs4fs4 d5 fs5 bb5d6b5 gs5 bb5 b5) (tonality-map '(messiaen-mode6 :map shift) (interval-to-pitch '(1 1 -1 (2 2 -1) 5 3 (2 3 -2) -2 1 1))) => (c4 d4 e4 d4 f4gs4fs4 d5 fs5 bb5d6b5 gs5 bb5 b5)
  9. I will have a look. Note: Opusmodus and not Opus Modus
  10. Example with start: (tonality-step '(c4d4e4f4g4a4) '(1 1 -1 2 2 -1) :start -2) => (g3 a3 c4 a3 d4 f4 e4)
  11. The scale can be anything even omn bar: (tonality-step '(h fs5a5b3 e4b3) '(1 1 -1 2 2 -1)) => (b3 b3 e4 b3 fs5 b4 a5) (tonality-step '(h fs5a5b3 e4b3) '(1 1 -1 2 2 -1) :sort nil) => (fs5 a5 b3 a5 e4 fs6 b3)
  12. Will be part of the next update.
  13. The SLAP like TASTO, PONTE etc... is sticky attribute. To stop it, use ORD. ((e g4 mp slap) (-e) (s e5 p ord+stacc g5 stacc) (3h fs4 mp slap 3q slap))
  14. This is how the new function TONALITY-STEP will work: tonality-step (scale step &key start ambitus (sort t)) (tonality-step '(c4 d4 e4 g4 a4 f4) '(1 1 -1 2 2 -1)) => (c4 d4 e4 d4 f4 a4 g4) (tonality-step '(c4 d4 e4 g4 a4 f4) '(1 1 -1 2 2 -1 5 3 2 3 -2 -2 1 1)) => (c4 d4 e4 d4 f4 a4 g4 f5 c6 e6 a6 f6 d6 e6 f6) (tonality-step '(c4 chromatic) '(1 1 -1 2 2 -1)) => (c4 cs4 d4 cs4 eb4 f4 e4) (tonality-step '(c4 messiaen-mode6) '(1 1 -1 2 2 -1 5)) => (c4 d4 e4 d4 f4 gs4 fs4 d5) (tonality-step '(c4 messiaen-mode6) '(1 1 -1 2 2 -1 5 3 2 3 -2 -2 1 1)) => (c4 d4 e4 d4 f4 gs4 fs4 d5 fs5 bb5 d6 b5 gs5 bb5 b5) (tonality-step '(c4 messiaen-mode6) '(1 2 -1 2 2 -1 5 3 2 3 -2 -2 1 1) :ambitus 'scale) => (c4 d4 f4 e4 fs4 bb4 gs4 e4 gs4 b4 e4 c4 bb4 b4 c4) (tonality-step '(c4 messiaen-mode6) '(1 2 -1 2 2 -1 5 3 2 3 -2 -2 1 1) :ambitus '(c3 a4)) => (c4 d4 f4 e4 fs4 bb3 gs4 e4 gs4 b3 e4 c4 bb3 b3 c4) (tonality-step '((c4d4e4g4a4f4) (c3 messiaen-mode6) (c4d4e4g4a4f4)) '((1 1 -1 2 2 -1) (5 3 2 3 -2 -2 1 1) (2 -1 3 2 3 -2 -2 1 1))) => ((c4 d4 e4 d4 f4 a4 g4) (c3 gs3 c4 e4 gs4 f4 d4 e4 f4) (c4 e4 d4 g4 c5 f5 d5 a4 c5 d5))
  15. If you like to have any access to your source code I suggest you drop all your source files (folders) into the Navigator. This way you will be able to find any definition etc... this is how I work with OM source files.
  16. Now I see what you were after. Note: You can convert the intervals directly into the integers. The DO-VERBOSE will stop printing the whole process in the Listener. (defun interval-projection-on-pitchfield (&key pitchfield intervals (base 0)) (do-verbose ("interval-projection-on-pitchfield") (let* ((integers (interval-to-integer intervals)) (base-0-integers (loop for i in integers collect (+ (abs (find-min integers)) i))) (centering (if (evenp (find-max base-0-integers)) (/ (find-max base-0-integers) 2) (/ (1+ (find-max base-0-integers)) 2))) pos) (loop for i in base-0-integers do (setf pos (+ i (* -1 centering) base)) when (< pos 0) do (setf pos 0) when (> pos (1- (length pitchfield))) do (setf pos (1- (length pitchfield))) collect (nth pos pitchfield)))))
  17. Intervals (direction and size) are nor chromatic or bound to any tonality.
  18. INTERVAL-TO-PITCH I would explore all the interval functions.
  19. The return of each function below is from now on a list and not a vector. GEN-WHITE-NOISE GEN-BROWNIAN-MOTION GEN-GAUSSIAN-NOISE GEN-AR-TIME-SERIES GEN-MA-TIME-SERIES GEN-PINK-NOISE GEN-SAWTOOTH GEN-SINE GEN-SQUARE GEN-TRIANGLE The input to vector processing functions can be a list or a vector. Name change: GEN-VECTOR-SELECT is now VECTOR-TO-SECTION
  20. The new implementation of voices will allow to do that.
  21. Yes, with SINGLE-EVENTS we can work on every parameter.
  22. You can processes OMN lengths but it is not that easy. To do that you need to use DISSEMBLE-OMN and then MAKE-OMN. (apply 'make-omn (disassemble-omn '(q c4 e d4 acc e acc h f4 q g4))) One day I will make documentation how to do that. Here is a short example: (defun add-len (omn add) (let ((plist (disassemble-omn omn))) (setf (getf plist :length) (loop for i in (getf plist :length) collect (+ add i))) (apply 'make-omn plist))) (add-len '(q c4 e d4 f4 h g4) '1/8) => (q. c4 q d4 f4 he g4)
  23. You forgot to add the seed into the LENGTH-DIVIDE function. To stop the endless print in the Listener you could add DO-VERBOSE marco: (defun durational-accent (lengths &key seed (divide 2) (set nil) (ignore nil)) (do-verbose ("durational-accent") (rnd-seed seed) (assert (and (listp lengths) (every #'listp lengths)) (lengths) "Given `lengths' ~A is not a sequence of bars (a list of lists).~%" lengths) (append (map-neighbours #'(lambda (bar1 bar2) (if (length-notep (first bar2)) (append (butlast bar1) (length-divide (rnd-pick '(0 1) :seed (seed)) (if (listp divide) (rnd-pick divide :seed (seed)) divide) (last bar1) :set set :ignore ignore :seed (seed))) bar1)) lengths) (last lengths))))
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy