Jump to content

opmo

Administrators
  • Posts

    2,894
  • Joined

  • Last visited

Everything posted by opmo

  1. At the moment this is not possible. We will add this with next upgrade.
  2. Opusmodus 1.1.1.8740 New macro IF* added to Opusmodus system. The IF* (public domain) macro used in Allegro: if* Arguments: (test-form {then then-form+ | thenret} {elseif else-test-form {then else-then-form+ | thenret}}* [else else-form+]) This form consists of a series of clauses introduced by the symbols then, elseif, else, and thenret. First the predicate test-form is evaluated. If it is true, the then-forms are evaluated, and the value of the last such form is returned. If test-form evaluates to nil, any remaining clauses are processed. If no clauses remain, if* returns nil. When a thenret clause is encountered no further evaluation takes place, and the value of the most recently evaluated test-form is returned. When an elseif clause is encountered, the predicate else-test-form is evaluated. If it is true, the else-then-forms are evaluated, and the value of the last such form is returned; otherwise any remaining clauses are processed. If no clauses remain, if* returns nil. And lastly, when an else clause is encountered, the else-forms are evaluated, and the value of the last such form is returned. Examples ;; The basic format of a IF* expression is: ;; ;; (if* [test] then [do this 1] [do this 2] else [do other 1] [do other 2]) ;; ;; When [test] is true, the forms after the THEN are evaluated and the ;; result of the last returned; if [test] if false, the forms after the ;; ELSE are evaluated and the result of the last is returned. ;; So: (if* (> 3 2) then "three is bigger" 3 else "three is smaller" 2) => 3 ;; Your do not need an ELSE form: (if* (> 3 2) then "three is bigger" 3) => 3 (if* (> 2 3) then "two is bigger" 2) => nil ;; You can have multiple fors after THEN or ELSE: (defun foo (x) (if* x then (setq y 2) (print x) else (setq y -2) "no")) (foo 2) => 2 (foo "hello") => "hello" "hello" (foo nil) => "no" ;; There are two more special symbols: THENRET and ELSEIF. ;; THENRET says when the test is true just return the value of the test ;; form just evaluated: (if* (+ 4 5) thenret) => 9 ;; ELSEIF introduces a new test, so you can have compound tests: (setq score 77) (if* (< score 60) then "F" elseif (< score 70) then "D" elseif (< score 80) then "C" elseif (< score 90) then "B" else "A") => "C" (setq score 55) (if* (< score 60) then "F" elseif (< score 70) then "D" elseif (< score 80) then "C" elseif (< score 90) then "B" else "A") => "F" (setq score 92) (if* (< score 60) then "F" elseif (< score 70) then "D" elseif (< score 80) then "C" elseif (< score 90) then "B" else "A") => "A"
  3. New: gen-binary-series size number level &key rotate [Function] Arguments and Values: size an integer (list length). number an integer (decimal binary number). level an integer (the unit count). rotate an integer (1 forwards and -1 backwards). The default is 0. variant 'p (prime), 'r (retrograde), 'i (inversion) 'ri (retrograde inversion) and '? (at random). seed an integer or NIL. The default is NIL. Description: This function returns a binary list series of a given size. A random :seed may be given with variant arguments. This is a good function to use to create an instant beat/space rhythm as found in much traditional / world music. binary 1 = (1) with level 2 = (0 1) with internal retrograde = (1 0) (gen-binary-series 24 1 2) => (1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) binary 2 = (1 0) with level 5 = (0 0 0 1 0) with internal retrograde = (0 1 0 0 0) (gen-binary-series 24 2 5) => (0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0) Examples: (gen-binary-series 24 1 '(3 2 4)) => ((1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0) (1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) (1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0)) (gen-binary-series 24 '(1 3 4) '(3 5 4) :rotate -2) => ((0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0) (0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 1 1) (1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0)) (gen-binary-series '(8 12 16) '(1 3 4) '(3 5 4) :rotate '(1 -1 0)) => ((0 1 0 0 1 0 0 1) (1 0 0 0 1 1 0 0 0 1 1 1) (0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0)) Example with variant option: (gen-binary-series '(8 12 16) '(1 3 4) '(3 5 4) :rotate '(1 -1 0) :variant '? :seed 786) => ((0 1 0 0 1 0 0 1) (1 0 0 0 1 1 0 0 0 1 1 1) (1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1)) (gen-binary-series '(8 12 16) '(1 3 4) '(3 5 4) :rotate '(1 -1 0) :variant '(? r ri) :seed 786) => ((0 1 0 0 1 0 0 1) (1 1 1 0 0 0 1 1 0 0 0 1) (1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1)) (setf bin (gen-binary-series '(8 8 8 8 8 8 8 8) '(1 2 3) '(3 3 4) :variant '? :seed 62)) => ((1 0 0 1 0 0 1 0) (1 0 0 1 0 0 1 0) (0 0 1 1 0 0 1 1) (0 1 0 0 1 0 0 1) (0 1 0 0 1 0 0 1) (1 1 0 0 1 1 0 0) (0 1 1 0 1 1 0 1) (0 1 1 0 1 1 0 1)) Mapping the bin variable to lengths with BINARY-MAP function: (binary-map bin 's :omn t) => ((s - - = - - = -) (s - - = - - = -) (-s - = = - - = =) (-s = - - = - - =) (-s = - - = - - =) (s = - - = = - -) (-s = = - = = - =) (-s = = - = = - =)) ------------------------------------------------------------- And fix to GEN-REPEAT-SEQ (gen-repeat-seq 12 1 3 '(c4 cs4 d4 ds4)) => (c4 c4 c4 cs4 cs4 cs4 d4 d4 ds4 ds4 ds4 c4)
  4. Done. The final function: ;; ------------------------------------------------------------------------- ;; gen-binary-series ;; ------------------------------------------------------------------------- (defun gen-binary-series (size number level &key rotate variant seed) (do-verbose ("gen-binary-series") (rnd-seed seed) (flet ((binary-series (size number level &key rotate) (let* ((binary (reverse (binary-level number level))) (out (gen-trim* size binary))) (if rotate (gen-rotate rotate out) out)))) (let* ((size (list! size)) (number (list! number)) (level (list! level)) (len (find-max (mapcar 'length (list size number level)))) (series (mapcar #'(lambda (a b c d) (binary-series a b c :rotate d)) (gen-trim* len size) (gen-trim* len number) (gen-trim* len level) (gen-trim* len (list! rotate)))) (out (if (and (listsp series) (< 1 (length series))) series (car series)))) (if variant (binary-variant out variant :seed (seed)) out))))) (gen-binary-series 24 1 2) => (1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) (gen-binary-series 24 1 '(3 2 4)) => ((1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0) (1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) (1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0)) (gen-binary-series 24 '(1 3 4) '(3 5 4) :rotate -2) => ((0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0) (0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 1 1) (1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0)) (gen-binary-series '(8 12 16) '(1 3 4) '(3 5 4) :rotate '(1 -1 0)) => ((0 1 0 0 1 0 0 1) (1 0 0 0 1 1 0 0 0 1 1 1) (0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0)) (gen-binary-series '(8 12 16) '(1 3 4) '(3 5 4) :rotate '(1 -1 0) :variant '? :seed 786) => ((0 1 0 0 1 0 0 1) (1 0 0 0 1 1 0 0 0 1 1 1) (1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1)) (gen-binary-series '(8 12 16) '(1 3 4) '(3 5 4) :rotate '(1 -1 0) :variant '(? r ri) :seed 786) => ((0 1 0 0 1 0 0 1) (1 1 1 0 0 0 1 1 0 0 0 1) (1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1)) Added variant as well.
  5. I agree Rangarajan, the BINARY-SERIES it is something else but is inspired from your solution.
  6. Sorry Julio but I don't understand what you are looking for. Could you show we the output you are looking for.
  7. Good result indeed (score). I like your coding stile and your knowledge of lisp. The only problem here is that we can end with NIL. I don't have the book therefore I can comment on possible solution to avoid the NIL result. In theory - I think - we could make something like: (defun binary-series (size number &key rotate) (let* ((binary (decimal-to-binary number)) (out (gen-repeat size binary))) (if rotate (gen-rotate rotate out) out))) (binary-series 22 4) => (1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0) Other possibility (flexibility): (defun binary-series (size number level &key rotate) (let* ((binary (reverse (binary-level number level))) (out (gen-repeat size binary))) (if rotate (gen-rotate rotate out) out))) (binary-series 8 1 2) => (1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0) (binary-series 8 1 3) => (1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0) (binary-series 8 1 4) => (1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0) (binary-series 8 3 4) => (1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0) (binary-series 8 3 6) => (1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0) I will add the BINARY-SERIES function to our system with few more options. Thank you Rangarajan for the inspiration.
  8. Indeed, this is a document error. Thank you for the report. Version 1.1.18705 fixed the docs.
  9. (defun gen-length-div (length values &key omn) (prog (elem out) (setf length (omn-encode length)) loop (cond ((null values) (return (maybe-omn-decode omn (nreverse out))))) (setf elem (gen-repeat (car values) (/ length (car values)))) (setf out (cons elem out)) (setf values (cdr values)) (go loop))) (gen-length-div 'w '(1 2 4 8 16) :omn t) => ((w) (h =) (q = = =) (e = = = = = = =) (s = = = = = = = = = = = = = = =)) (gen-length-div 'w '(2 3 4 5 8) :omn t) => ((h =) (3w = =) (q = = =) (5w = = = =) (e = = = = = = =)) Other possibility: (ql '(1 w 2 h 4 q 8 e 16 s)) => (w h = q = = = e = = = = = = = s = = = = = = = = = = = = = = =)
  10. Please check the documentation. (gen-length ds-i2 8) => (1/2 1/4 1/4 1/2 1/4 1/8 1/8 1/4 1/4 1/8 1/8 1/4 1/2 1/4 1/4 1/2) or (gen-length ds-i2 '(8 8 8 8)) => ((1/2 1/4 1/4 1/2) (1/4 1/8 1/8 1/4) (1/4 1/8 1/8 1/4) (1/2 1/4 1/4 1/2))
  11. All this you do in the tempo section (DEF-SCORE). ;; Tempo (setf tempo-events '(("Sehr mäßig" e. 40 16) (:rit 40 26 1/64 2) (40 1) (:rit 40 26 1/64 3) (40 1) (:rit 40 26 1/64 1) (40 1) (:rit 40 26 1/64 1) (40 1) (:rit 40 26 1/64 1) (40 1) (:rit 40 26 1/64 1) (40 1) (:rit 40 26 1/64 1) (40 1) (:rit 40 26 1/64 1) (40 5) (:rit 40 24 1/64 5) (40 11) (:rit 40 26 1/64 2) (40 3) (:rit 40 26 1/64 2) (40 1) (:rit 40 20 1/64 3))) Doing this directly with length values we would get values which are not possible to notate. Maybe the GEN-ACCUMULATE function can do what you are looking for: (gen-accumulate '(1/32) :count 12) => (1/32 1/16 3/32 1/8 5/32 3/16 7/32 1/4 9/32 5/16 11/32 3/8)
  12. New: rnd-12tone-form n row &key type seed [Function] Arguments and Values: n an integer (number of forms). row a 12-tone row. type :integer or :pitch. The default is :integer. seed NIL or an integer. The default is NIL. Description: This function returns N lists of 12-tone forms selected at random. (rnd-12tone-form 2 '(0 4 9 10 5 3 8 7 1 2 11 6) :seed 56) => ((6 1 10 11 5 4 9 7 2 3 8 0) (8 3 0 1 7 6 11 9 4 5 10 2)) (rnd-12tone-form 2 '(0 4 9 10 5 3 8 7 1 2 11 6) :type :pitch :seed 56) => ((fs4 cs4 bb4 b4 f4 e4 a4 g4 d4 eb4 gs4 c4) (gs4 eb4 c4 cs4 g4 fs4 b4 a4 e4 f4 bb4 d4)) Example: ;;;--------------------------------------------------------- ;;; SCORE EXAMPLE ;;;--------------------------------------------------------- (progn (setf forms (rnd-12tone-form 24 (rnd-row :transpose 6))) (setf pitch (integer-to-pitch forms)) (setf mat (gen-chord2 200 (rnd-sample 12 '(1 2)) (flatten pitch))) (setf vel (substitute-map '(ppp ppp pp pp p p f f ff ff fff fff) '(0 1 2 3 4 5 6 7 8 9 10 11) forms)) (setf fib (rnd-sample 16 (fibonacci 10 18))) (setf l1 (binary-rhythm '(16 20 32) fib '(1/16 1/20 1/32) :type (rnd-sample 12 '(1 2)) :rotate (rnd-sample 12 '(0 1 -1 2 -2)))) (setf l2 (binary-rhythm '(28 16 12) fib '(1/28 1/16 1/12) :type (rnd-sample 12 '(1 2 3)) :rotate (rnd-sample 12 '(0 1 -1 2 -2)))) (setf cd-p (distribute-seq mat l1 l2)) (setf cd-v (distribute-seq vel l1 l2)) (setf p1 (randomize-octaves 'piano (1~ cd-p))) (setf p2 (randomize-octaves 'piano (2~ cd-p))) (setf v1 (1~ cd-v)) (setf v2 (2~ cd-v)) (setf in1 (make-omn :length l1 :pitch p1 :velocity v1)) (setf in2 (make-omn :length l2 :pitch p2 :velocity v2)) (setf tempo (gen-tempo '(32 88 72 56 96) '(1) l1 :beat 1/1)) (def-score form-dist (:title "Form Distribution" :copyright "(c) 2016 Opusmodus" :composer "OPMO" :key-signature 'chromatic :time-signature '(8 8) :tempo tempo :layout (grand-layout '(in1 in2))) (in1 :omn in1 :channel 1 :sound 'gm :program 0) (in2 :omn in2 :channel 2 :sound 'gm :program 0) ) ) --------------------------------------------------------- get—12tone-form row form &key type [Function] Arguments and Values: row a 12-tone row. form a form or list of forms. type :integer or :pitch. The default is :integer. Description: The function GET-12TONE-FORM returns 12-tone row of a given form. Forms: Prime: P 0-11 Inversion: I 0-11 Retrograde: R 0-11 Retrograde Inversion: RI 0-11 (get-12tone-form '(0 4 9 10 5 3 8 7 1 2 11 6) 'r7) => (1 6 9 8 2 3 10 0 5 4 11 7) (get-12tone-form '(0 4 9 10 5 3 8 7 1 2 11 6) 'r7 :type :pitch) => (cs4 fs4 a4 gs4 d4 eb4 bb4 c4 f4 e4 b4 g4) Example: (get-12tone-form '(0 4 9 10 5 3 8 7 1 2 11 6) '(r5 p4 ri3)) => ((11 4 7 6 0 1 8 10 3 2 9 5) (4 8 1 2 9 7 0 11 5 6 3 10) (9 4 1 2 8 7 0 10 5 6 11 3)) (get-12tone-form (rnd-row) '(p0 r9 i3 ri5)) => ((0 9 5 4 2 3 7 10 11 6 1 8) (5 10 3 8 7 4 0 11 1 2 6 9) (3 6 10 11 1 0 8 5 4 9 2 7) (9 4 11 6 7 10 2 3 1 0 8 5)) --------------------------------------------------------- Renamed functions: CONSECUTIVE-DISTRIBUTE -> DISTRIBUTE-SEQ CONSECUTIVE-COLLECT -> COLLECT-SEQ And minor bug fixes. JP
  13. Another great orchestral template example in action, very inspiring :-)
  14. GET-TIME-SIGNATURE bug fix.
  15. The bug will be fixed soon. As for the MERGE-VOICES function I would use it with simple lengths and with 2 voices max.
  16. 12TONE-ANALYSIS bug fix. The help command shortcut is changed to ctrl-tab now.
  17. Function name changes: find-12tone-form -> 12tone-analysis 12tone-analysis -> 12tone-forms Extended analysis results in 12TONE-ANALYSIS: (12tone-analysis '(0 4 5 2 3 7 1 9 8 11 10 6) '((0 4 5) (2 3 7) (1 9 8) (11 10 6))) => Original Prime Order: (0 4 5 2 3 7 1 9 8 11 10 6) Pitch Row: (c4 e4 f4 d4 eb4 g4 cs4 a4 gs4 b4 bb4 fs4) Set: ((0 4 5) (2 3 7) (1 9 8) (11 10 6)) Pitch Set: ((c4 e4 f4) (d4 eb4 g4) (cs4 a4 gs4) (b4 bb4 fs4)) PCS: (3-4 3-4 3-4 3-4) Form: (P0 ((0 4 5) (2 3 7) (1 9 8) (11 10 6))) (R6 ((0 4 5) (2 3 7) (1 9 8) (11 10 6))) (RI1 ((7 3 2) (5 4 0) (6 10 11) (8 9 1))) (I7 ((7 3 2) (5 4 0) (6 10 11) (8 9 1))) (RI7 ((1 9 8) (11 10 6) (0 4 5) (2 3 7))) (I1 ((1 9 8) (11 10 6) (0 4 5) (2 3 7))) (P6 ((6 10 11) (8 9 1) (7 3 2) (5 4 0))) (R0 ((6 10 11) (8 9 1) (7 3 2) (5 4 0)))
  18. The default velocity is mf. But it should show if mf is explicitly written. This is a bug. Thank you for the note.
  19. Additional keyword :interval added to find-ambitus function. (setf omn-seq '((s cs5 p g6 mp mf -) (s cs5 f e g3 ff s p) (s cs5 mp g6 mf f -) (-s cs5 ff e g3 p) (s g3 mp - e cs5 mf) (s g6 f ff e cs5 p) (s g3 mp mf e cs5 f) (s g6 ff p cs5 mp g3 mf) (e g3 f s cs5 ff g6 p) (e g6 mp -s cs5 mf) (e g3 f -s g3 ff) (s cs5 p e g6 mp s mf))) (find-ambitus omn-seq) => (-5 31) (find-ambitus omn-seq :type :pitch) => (g3 g6) With keyword :interval T the function will return the global interval value: (find-ambitus omn-seq :interval t) => 36
  20. This is how nested tuplets will look like: (5q = 5q3 = = = 5q =)
  21. All will depend on how far musicxml can support this.
  22. There is a bug in the tuplets display. This will be solved when we allow (fix) the irrational lengths and bars display and play. Could you send me a Sibelius score of the example to see what you are looking for.
  23. New functions: find-ambitus sequence &key type series section [Function] Arguments and Values: sequence omn-form list or list of pitches. type :integer or :pitch. The default is :integer. series NIL or T. The default is NIL. section an integer or list of integers. Selected list or lists to process. Description: The function FIND-AMBITUS returns the ambitus (low high) values of the entire or specified section of the sequence. (setf omn-seq '((s cs5 p g6 mp mf -) (s cs5 f e g3 ff s p) (s cs5 mp g6 mf f -) (-s cs5 ff e g3 p) (s g3 mp - e cs5 mf) (s g6 f ff e cs5 p) (s g3 mp mf e cs5 f) (s g6 ff p cs5 mp g3 mf) (e g3 f s cs5 ff g6 p) (e g6 mp -s cs5 mf) (e g3 f -s g3 ff) (s cs5 p e g6 mp s mf))) (find-ambitus omn-seq) => (-5 31) (find-ambitus omn-seq :type :pitch) => (g3 g6) Example: Variationen Fuer Klavier Op.27, I (setf sequence '((-s) (e f4e5 pp -s db5) (-s) (-s eb4 pp c4d5 -) (-s) (-s c4d5 pp eb4 -) (-s) (e db5 pp -s f4e5) (-s) (s gb4f5 p a5 -) (s d4ab4db5 p bb4 -) (-s a5 p gb4f5) (-s) (s b5 f gb4g5 -) (s a3bb4 f ab4 -) (s c4d5 f> eb4 -) (s db5 f> f4e5 -) (-s) (s gb4f5 p a5 d4ab4db5 bb4 -) (-s) (-s a5 pp gb4f5) (-s) (-t b2 f e3 bb3 - d5 c4eb4) (-s) (s db3 f - s. g5 -t) (s gb4f5 p) (-t a3 mp ab3 mf -s. t db5f5 f c4 -) (s e3e4 p) (-t s. d2 f -s ab5 mf) (-s) (t gb4a4 p g3 mp - b2 f e3 bb3 e3 a3 eb4 - g5 mf f4ab4 mp) (-s) (s f2 f - s. c6 -t) (s b2bb3 p) (-s t db5 mp -s. t gb5bb5 f4 f -) (t a3 f ab2 - ab2 a3) (-t f4 f gb5bb5 mf) (-t a3 mp d4ab4 c4 p bb5db6 mf) (-t b2 f3 b2 -) (t bb5db6 c5 f d4ab4 a3 p) (-s) (t b4eb5 p bb3 -) (t d4 p db3 - db3 d4) (-t bb3 p b4eb5) (-s) (-s eb5 p bb3b4 -) (-s) (e d4db5 p -s c5) (-s) (e c5 p -s d4db5) (-s) (-s bb3b4 p eb5 -) (-s) (-s ab3g4 p e4 mf) (-s c4gb4b4 f5) (-s db5 mp bb3a4) (-s) (-s eb4d5 p gb4) (-s e4 p f3g4) (-s b3 p a2bb3) (-s c5db6 pp ab5) (-s) (-s e5eb6 p g5 c4f4b4 p> gb4) (-s) (-e) (e d5ab5db6 pp))) (find-ambitus sequence) => (-22 27) With keyword :type :pitch the function will return the ambitus list in pitch values. (find-ambitus sequence :type :pitch) => (d2 eb6) With keyword :series T the function will return a list of ambitus values for every sublist (bar) of the sequence: (find-ambitus sequence :series t) => (nil (5 16) nil (0 14) nil (0 14) nil (5 16) nil (6 21) (2 13) (6 21) nil (6 23) (-3 10) (0 14) (5 16) nil (2 21) nil (6 21) nil (-13 14) nil (-11 19) (6 17) (-4 17) (-8 4) (-22 20) nil (-13 19) nil (-19 24) (-13 -2) (5 22) (-16 -3) (5 22) (-3 25) (-13 -7) (-3 25) nil (-2 15) (-11 2) (-2 15) nil (-2 15) nil (2 13) nil (2 13) nil (-2 15) nil (-4 7) (0 17) (-2 13) nil (3 14) (-7 7) (-15 -1) (12 25) nil (0 27) nil nil (14 25)) The NIL means no pitch values are found in the sublist. Here we get the ambitus from the section (bar) 30: (find-ambitus sequence :section 30) => (-13 19) ------------------------------------------------------------------ 12tone-analysis row set &key order note [Function] Arguments and Values: row a list of integers or pitches (must be a 12-tone row). set a list of integers or pitches. order NIL or T. The default is NIL. note a string. Annotation. Description: The function 12TONE-ANALYSIS analyses all 48 forms of a row matrix to find the given pitch-class set. When found, it will return all the Forms that contain the pitch-class set in any order. The initial row is known as THE ORIGINAL PRIME ORDER. There are four basic forms to a row: P - Prime: Left to Right I - Inversion: Top to Bottom R - Retrograde: Right to Left RI - Retrograde-Inversion: Bottom to Top (12tone-analysis '(3 11 10 2 1 0 6 4 7 5 9 8) '(2 1 5 3 6 4)) => Original Prime Order: (3 11 10 2 1 0 6 4 7 5 9 8) Pitch Row: (eb4 b4 bb4 d4 cs4 c4 fs4 e4 g4 f4 a4 gs4) Set: (2 1 5 3 6 4) Pitch Set: (d4 cs4 f4 eb4 fs4 e4) Complement: (0 7 8 9 10 11) Pitch Complement: (c4 g4 gs4 a4 bb4 b4) PCS: (6-1 6-1) Form: (P3 ((6 2 1 5 4 3) (9 7 10 8 0 11))) (RI4 ((2 1 5 3 6 4) (10 9 8 0 11 7))) (I10 ((1 5 6 2 3 4) (10 0 9 11 7 8))) (R9 ((5 6 2 4 1 3) (9 10 11 7 8 0))) (P9 ((0 8 7 11 10 9) (3 1 4 2 6 5))) (RI10 ((8 7 11 9 0 10) (4 3 2 6 5 1))) (I4 ((7 11 0 8 9 10) (4 6 3 5 1 2))) (R3 ((11 0 8 10 7 9) (3 4 5 1 2 6))) With the keyword order T the result of the search will return Form in the given pitch-class set order. (12tone-analysis '(3 11 10 2 1 0 6 4 7 5 9 8) '(2 1 5 3 6 4) :order t) => Original Prime Order: (3 11 10 2 1 0 6 4 7 5 9 8) Pitch Row: (eb4 b4 bb4 d4 cs4 c4 fs4 e4 g4 f4 a4 gs4) Set: (2 1 5 3 6 4) Pitch Set: (d4 cs4 f4 eb4 fs4 e4) Complement: (0 7 8 9 10 11) Pitch Complement: (c4 g4 gs4 a4 bb4 b4) PCS: (6-1 6-1) Form: (RI4 ((2 1 5 3 6 4) (10 9 8 0 11 7))) Example: Schoenberg 'Opus 37' 12-tone row taken from the Opusmodus library: (setf opus-37 (library 'vienna 'schoenberg 'r24)) => (d4 cs4 a4 bb4 f4 eb4 e4 c4 gs4 g4 fs4 b4) (12tone-analysis opus-37 '((2 1 9 10 5 3) (7 8 0 11 4 6)) :note "Schoenberg Opus 37, Fourth String Quartet") => Schoenberg Opus 37, Fourth String Quartet Original Prime Order: (2 1 9 10 5 3 4 0 8 7 6 11) Pitch Row: (d4 cs4 a4 bb4 f4 eb4 e4 c4 gs4 g4 fs4 b4) Set: ((2 1 9 10 5 3) (7 8 0 11 4 6)) Pitch Set: ((d4 cs4 a4 bb4 f4 eb4) (g4 gs4 c4 b4 e4 fs4)) PCS: (6-16 6-16) Form: (P0 ((2 1 9 10 5 3) (4 0 8 7 6 11))) (RI5 ((10 3 2 1 9 5) (6 4 11 0 8 7))) (I5 ((7 8 0 11 4 6) (5 9 1 2 3 10))) (R0 ((11 6 7 8 0 4) (3 5 10 9 1 2))) Let us test the result of the above: (12tone-forms opus-37 :note "Schoenberg Opus 37, Fourth String Quartet") => Schoenberg Opus 37, Fourth String Quartet Original Prime Order: (2 1 9 10 5 3 4 0 8 7 6 11) Pitch: (d4 cs4 a4 bb4 f4 eb4 e4 c4 gs4 g4 fs4 b4) I 0 11 7 8 3 1 2 10 6 5 4 9 0 2 1 9 10 5 3 4 0 8 7 6 11 1 3 2 10 11 6 4 5 1 9 8 7 0 5 7 6 2 3 10 8 9 5 1 0 11 4 4 6 5 1 2 9 7 8 4 0 11 10 3 9 11 10 6 7 2 0 1 9 5 4 3 8 P 11 1 0 8 9 4 2 3 11 7 6 5 10 R 10 0 11 7 8 3 1 2 10 6 5 4 9 2 4 3 11 0 7 5 6 2 10 9 8 1 6 8 7 3 4 11 9 10 6 2 1 0 5 7 9 8 4 5 0 10 11 7 3 2 1 6 8 10 9 5 6 1 11 0 8 4 3 2 7 3 5 4 0 1 8 6 7 3 11 10 9 2 RI The hexachordally combinatorial pairs: (12tone-analysis '(0 8 7 11 10 9 3 1 4 2 6 5) '(5 1 0 4 3 2)) => Original Prime Order: (0 8 7 11 10 9 3 1 4 2 6 5) Pitch Row: (c4 gs4 g4 b4 bb4 a4 eb4 cs4 e4 d4 fs4 f4) Set: (5 1 0 4 3 2) Pitch Set: (f4 cs4 c4 e4 eb4 d4) Complement: (6 7 8 9 10 11) Pitch Complement: (fs4 g4 gs4 a4 bb4 b4) PCS: (6-1 6-1) Form: (P5 ((5 1 0 4 3 2) (8 6 9 7 11 10))) (RI6 ((1 0 4 2 5 3) (9 8 7 11 10 6))) (I0 ((0 4 5 1 2 3) (9 11 8 10 6 7))) (R11 ((4 5 1 3 0 2) (8 9 10 6 7 11))) (P11 ((11 7 6 10 9 8) (2 0 3 1 5 4))) (RI0 ((7 6 10 8 11 9) (3 2 1 5 4 0))) (I6 ((6 10 11 7 8 9) (3 5 2 4 0 1))) (R5 ((10 11 7 9 6 8) (2 3 4 0 1 5))) The trichordal combinatoriality: (12tone-analysis '(0 4 5 2 3 7 1 9 8 11 10 6) '((0 4 5) (2 3 7) (1 9 8) (11 10 6))) => Original Prime Order: (0 4 5 2 3 7 1 9 8 11 10 6) Pitch Row: (c4 e4 f4 d4 eb4 g4 cs4 a4 gs4 b4 bb4 fs4) Set: ((0 4 5) (2 3 7) (1 9 8) (11 10 6)) Pitch Set: ((c4 e4 f4) (d4 eb4 g4) (cs4 a4 gs4) (b4 bb4 fs4)) PCS: (3-4 3-4 3-4 3-4) Form: (P0 ((0 4 5) (2 3 7) (1 9 8) (11 10 6))) (R6 ((0 4 5) (2 3 7) (1 9 8) (11 10 6))) (RI1 ((7 3 2) (5 4 0) (6 10 11) (8 9 1))) (I7 ((7 3 2) (5 4 0) (6 10 11) (8 9 1))) (RI7 ((1 9 8) (11 10 6) (0 4 5) (2 3 7))) (I1 ((1 9 8) (11 10 6) (0 4 5) (2 3 7))) (P6 ((6 10 11) (8 9 1) (7 3 2) (5 4 0))) (R0 ((6 10 11) (8 9 1) (7 3 2) (5 4 0))) More examples: (12tone-analysis '(0 4 5 2 3 7 1 9 8 11 10 6) '((0 4 5) (2 3 7))) => Original Prime Order: (0 4 5 2 3 7 1 9 8 11 10 6) Pitch Row: (c4 e4 f4 d4 eb4 g4 cs4 a4 gs4 b4 bb4 fs4) Set: ((0 4 5) (2 3 7)) Pitch Set: ((c4 e4 f4) (d4 eb4 g4)) Complement: (1 6 8 9 10 11) Pitch Complement: (cs4 fs4 gs4 a4 bb4 b4) PCS: (3-4 3-4 6-8) Form: (P0 ((0 4 5) (2 3 7) (1 9 8 11 10 6))) (R6 ((0 4 5 2 3 7) (1 9 8) (11 10 6))) (RI1 ((7 3 2 5 4 0) (6 10 11) (8 9 1))) (I7 ((7 3 2) (5 4 0) (6 10 11 8 9 1))) (P6 ((6 10 11) (8 9 1) (7 3 2 5 4 0))) (RI7 ((1 9 8 11 10 6) (0 4 5) (2 3 7))) (I1 ((1 9 8) (11 10 6) (0 4 5 2 3 7))) (R0 ((6 10 11 8 9 1) (7 3 2) (5 4 0))) Example with smaller segments: (12tone-analysis '(0 6 1 5 2 4 3 7 11 8 10 9) '((0 6) (1 5) (2 4) (3) (7 11) (8 10) (9))) => Original Prime Order: (0 6 1 5 2 4 3 7 11 8 10 9) Pitch Row: (c4 fs4 cs4 f4 d4 e4 eb4 g4 b4 gs4 bb4 a4) Set: ((0 6) (1 5) (2 4) (3) (7 11) (8 10) (9)) Pitch Set: ((c4 fs4) (cs4 f4) (d4 e4) (eb4) (g4 b4) (gs4 bb4) (a4)) PCS: (2-6 2-4 2-2 singleton 2-4 2-2 singleton) Form: (P0 ((0 6) (1 5) (2 4) (3) (7 11) (8 10) (9))) (P6 ((6 0) (7 11) (8 10) (9) (1 5) (2 4) (3))) (I0 ((0 6) (11 7) (10 8) (9) (5 1) (4 2) (3))) (I6 ((6 0) (5 1) (4 2) (3) (11 7) (10 8) (9))) (P3 ((3 9) (4 8) (5 7) (6) (10 2) (11 1) (0))) (RI0 ((3) (2 4) (1 5) (9) (8 10) (7 11) (6 0))) (I3 ((3 9) (2 10) (1 11) (0) (8 4) (7 5) (6))) (R6 ((3) (4 2) (5 1) (9) (10 8) (11 7) (0 6))) (P9 ((9 3) (10 2) (11 1) (0) (4 8) (5 7) (6))) (RI6 ((9) (8 10) (7 11) (3) (2 4) (1 5) (0 6))) (I9 ((9 3) (8 4) (7 5) (6) (2 10) (1 11) (0))) (R0 ((9) (10 8) (11 7) (3) (4 2) (5 1) (6 0))) ------------------------------------------------------------------ 12tone-forms row &key type note [Function] Arguments and Values: row a list of integers or pitches (must be a 12-tone row). type :integer or :pitch. The default is :integer. note a string. Annotation. Description: The function 12TONE-FORMS displays all 48 forms of the row at a glance and is an invaluable tool when composing or analysing twelve-tone music. The initial row is known as THE ORIGINAL PRIME ORDER. There are four basic forms to a row: P - Prime: Left to Right I - Inversion: Top to Bottom R - Retrograde: Right to Left RI - Retrograde-Inversion: Bottom to Top (12tone-forms '(3 11 10 2 1 0 6 4 7 5 9 8)) => Original Prime Order: (3 11 10 2 1 0 6 4 7 5 9 8) Pitch: (eb4 b4 bb4 d4 cs4 c4 fs4 e4 g4 f4 a4 gs4) I 0 8 7 11 10 9 3 1 4 2 6 5 0 3 11 10 2 1 0 6 4 7 5 9 8 4 7 3 2 6 5 4 10 8 11 9 1 0 5 8 4 3 7 6 5 11 9 0 10 2 1 1 4 0 11 3 2 1 7 5 8 6 10 9 2 5 1 0 4 3 2 8 6 9 7 11 10 P 3 6 2 1 5 4 3 9 7 10 8 0 11 R 9 0 8 7 11 10 9 3 1 4 2 6 5 11 2 10 9 1 0 11 5 3 6 4 8 7 8 11 7 6 10 9 8 2 0 3 1 5 4 10 1 9 8 0 11 10 4 2 5 3 7 6 6 9 5 4 8 7 6 0 10 1 11 3 2 7 10 6 5 9 8 7 1 11 2 0 4 3 RI Matrix in pitch: (12tone-forms '(3 11 10 2 1 0 6 4 7 5 9 8) :type :pitch) => Original Prime Order: (3 11 10 2 1 0 6 4 7 5 9 8) Pitch: (eb4 b4 bb4 d4 cs4 c4 fs4 e4 g4 f4 a4 gs4) I 0 8 7 11 10 9 3 1 4 2 6 5 0 eb4 b4 bb4 d4 cs4 c4 fs4 e4 g4 f4 a4 gs4 4 g4 eb4 d4 fs4 f4 e4 bb4 gs4 b4 a4 cs4 c4 5 gs4 e4 eb4 g4 fs4 f4 b4 a4 c4 bb4 d4 cs4 1 e4 c4 b4 eb4 d4 cs4 g4 f4 gs4 fs4 bb4 a4 2 f4 cs4 c4 e4 eb4 d4 gs4 fs4 a4 g4 b4 bb4 P 3 fs4 d4 cs4 f4 e4 eb4 a4 g4 bb4 gs4 c4 b4 R 9 c4 gs4 g4 b4 bb4 a4 eb4 cs4 e4 d4 fs4 f4 11 d4 bb4 a4 cs4 c4 b4 f4 eb4 fs4 e4 gs4 g4 8 b4 g4 fs4 bb4 a4 gs4 d4 c4 eb4 cs4 f4 e4 10 cs4 a4 gs4 c4 b4 bb4 e4 d4 f4 eb4 g4 fs4 6 a4 f4 e4 gs4 g4 fs4 c4 bb4 cs4 b4 eb4 d4 7 bb4 fs4 f4 a4 gs4 g4 cs4 b4 d4 c4 e4 eb4 RI Example: Schoenberg 'Opus 23' 12-tone row taken from the Opusmodus library: (setf opus-23 (library 'vienna 'schoenberg 'r01)) => (cs4 a4 b4 g4 gs4 fs4 as4 d4 e4 ds4 c4 f4) Example with annotation: (12tone-forms opus-23 :note "Schoenberg Opus 23") => Schoenberg Opus 23 Original Prime Order: (1 9 11 7 8 6 10 2 4 3 0 5) Pitch: (cs4 a4 b4 g4 gs4 fs4 bb4 d4 e4 eb4 c4 f4) I 0 8 10 6 7 5 9 1 3 2 11 4 0 1 9 11 7 8 6 10 2 4 3 0 5 4 5 1 3 11 0 10 2 6 8 7 4 9 2 3 11 1 9 10 8 0 4 6 5 2 7 6 7 3 5 1 2 0 4 8 10 9 6 11 5 6 2 4 0 1 11 3 7 9 8 5 10 P 7 8 4 6 2 3 1 5 9 11 10 7 0 R 3 4 0 2 10 11 9 1 5 7 6 3 8 11 0 8 10 6 7 5 9 1 3 2 11 4 9 10 6 8 4 5 3 7 11 1 0 9 2 10 11 7 9 5 6 4 8 0 2 1 10 3 1 2 10 0 8 9 7 11 3 5 4 1 6 8 9 5 7 3 4 2 6 10 0 11 8 1 RI
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy