Music 680, Fall 2005: Special Topics in Music Theory - Algorithmic Composition
Lecture 6: October 17, 2005 - canon I: Ligeti

Ligeti
	"Metamorphoses of Musical Form"
		understanding music history as a kind of organic process
			technical evolution spurred by demands placed upon composers by their materials
				specifically, the expansion of serialism from pitch, to all parameters, to form
				describing the evolution of serialism as a weakening of pitch ordering
					through superposition of series into bundles (as in Structures 1a)
					the use of series defined primarily by interval content rather than melodic structure
						(incl. chromatic scales and other "trivial" structures)
					subservience of series to higher-level controls (e.g. registral requirements in Gruppen)
				abandoning intervallic structuring for control of density, register, and "weave"
		the serial situation as a high degree of "permeability": layering and juxtaposition of textures
			possibility of multi-temporality (as in Zeitmasse)
			forms defined by layers and juxtaposition (esp. in tape music but also Gruppen etc.)
			and a parallel situation (even more extreme) in Cage's music
		all resulting in a "flattening" or "levelling-out" of form.... entropic/static in nature
		against which Ligeti prescribes serial organization of high-level form
			coupled with more specific types of local determinations
			"desired characters... worked out by postulating or avoiding certain specific constellations"
		note the footnoted critique of Boulez's "Alea" article
			"no genuine freedom of interpretation, simply a manifold ossia form...."

	micropolyphony as Ligeti's particular solution
		the serial thread or bundle reinvented as continuously mobile texture
			(contrast with Penderecki's static clusters and textural blocks)
		canon as a compositional device rather than a perceptible feature
			"collapsing register" section of Atmospheres (from four octaves to four semitones)
			canonic permeation in Lontano
			Melodien and after....

canon in Scheme
	 also relationships between voices/layers? (contrapuntal logic)

(define pitch-list (list 60 61 63 67 64 66 70 69 72))
(define rhythm-list (list 1.5 1.125 1.375 1.0 1.625 1.875 2.0))
(define dynamics-list (list 0.5 0.75 1.0 0.33 0.66))

(define (make-note start pitch length dynamic)
  (new midi 
    :time start
    :keynum pitch
    :duration length
    :amplitude dynamic))

(define (rotate-left input-list)
  (append (cdr input-list) 
          (list (car input-list))))


(define (make-isorhythm notes start pitches durations dynamics)
  (if (<= notes 0)
    nil
    (cons (make-note start (car pitches) (car durations) (car dynamics))
          (make-isorhythm (- notes 1) 
                          (+ start (car durations))
                          (rotate-left pitches) 
                          (rotate-left durations) 
                          (rotate-left dynamics)))))

; (events (make-isorhythm 16 0 pitch-list rhythm-list dynamics-list) "test.mid")

(define (transpose transposition pitch-list)
  (if (null? pitch-list)
    nil
    (cons (+ transposition (car pitch-list))
          (transpose transposition (cdr pitch-list)))))

(define (make-canon transpositions entrances notes start pitches durations dynamics)
  (if (or (null? transpositions) (null? entrances)) 
    nil
    (let ((current-pitches (transpose (car transpositions) pitches)))
      (append (make-isorhythm notes
                              (+ start (car entrances))
                              current-pitches
                              durations
                              dynamics)
              (make-canon (cdr transpositions) (cdr entrances)
                          notes start pitches durations dynamics)))))

#|
(events (make-canon (list 0 1 2 3 4 5) 
                    (list 0 0.25 0.75 1.5 2.5 3.75)
                    12 0 pitch-list rhythm-list dynamics-list)
        "test.mid")
|#

(define (stretch prolation rhythm-list)
  (if (null? rhythm-list)
    nil
    (cons (* prolation (car rhythm-list))
          (stretch prolation (cdr rhythm-list)))))

(define (make-prolation-canon transpositions prolations entrances notes start pitches durations dynamics)
  (if (or (null? transpositions) (null? prolations) (null? entrances)) 
    nil
    (let ((current-pitches (transpose (car transpositions) pitches))
          (current-rhythms (stretch (car prolations) durations)))
      (append (make-isorhythm notes
                              (+ start (car entrances))
                              current-pitches
                              current-rhythms
                              dynamics)
              (make-prolation-canon (cdr transpositions) (cdr prolations) (cdr entrances)
                                    notes start pitches durations dynamics)))))

#|
(events (make-prolation-canon (list 0 1 2 3 4 5)
                              (list 1 1.1 1.21 1.4641 2.14358881 4.594972986357)
                              (list 0 0.25 0.75 1.5 2.5 3.75)
                    12 0 pitch-list rhythm-list dynamics-list)
        "test.mid")
|#