Qui de sentement ne fait, Son dit et son chant contrefait. - Guillaume de Machaut
A form in music basically refers to the architecture of the piece. A musical form is often structured by sections. Sections are often repeated or reused in the piece.
There are many ways of representing forms in algorithmic composition. One way of doing this is simply by merging patterns together. For example:
(define clp-form '(0 0 1 2 3 4 1 2 3 4 1 2 5 6 7 8 9 10 10 10 10 11 12 13 6))
(define cll-form '(0 0 1 0 2 3 1 0 2 3 1 0 4 0 5 5 6 7 7 7 7 5 5 6 0))
(define mtp-form '(0 1 2 3 2 3 4 3 5 3 6 7 8 3 3 3 3 3 3 3 3 3))
(define mtl-form '(0 1 2 3 2 3 4 5 6 5 0 7 8 5 5 5 5 5 5 5 5 5))
(define ltp-form '(0 1 0 2 0 2 2 2 0 2 3 4 5 4 3 3 3 4 3 3 3 4))
(define ltl-form '(0 1 0 2 0 2 2 2 0 2 3 4 5 4 6 6 6 4 6 6 6 4))
(define hpp-form '(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 2))
(define hpl-form '(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 2))
(define (merge-patterns f p)
(if (null? f) '()
(append (cdr (list-ref p (car f))) (merge-patterns (cdr f) p))))
Another way of doing this is by manipulating sections and simply repeating and ordering as needed. For example:
(define (l-create-form f)
(append
(repeat (f l-silence) 8)
(f l-phrase1)
(f l-silence)
(f l-phrase1)
(f l-silence)
(f l-phrase2)
(repeat (f l-phrase3) 3)
(f l-phrase4)
(f l-phrase2)
(repeat (f l-phrase3) 3)
(repeat (f l-silence) 2)
(f l-phrase5)
(f l-phrase2)
(repeat (f l-phrase3) 3)
))
The way an artist chooses to structure their piece is subjective and it's just a matter of preference.
Guillaume de Machaut is known to use algorithmic thinking in his compositions. In his piece Ma fin est mon commencement, Machaut reuses musical phrases to construct sections and give a multi-palindromic form to his piece. The lyrics of his composition makes a self-reference to his composition by describing its form:
Sections | Lyrics | English |
---|---|---|
[A] | Ma fin est mon commencement | My end is my beginning |
[B] | Et mon commencement ma fin | And my beginning my end |
[a] | Est teneüre vraiement | And [this] truly holds |
[A] | Ma fin est mon commencement. | My end is my beginning |
[a] | Mes tiers chans trois fois seulements | My third voice just three times |
[b] | Se retrograde et einsi fin. | Reverses itself and thus ends. |
[A] | Ma fin est mon commencement | My end is my beginning |
[B] | Et mon commencement ma fin. | And my beginning my end. |
We can define the elemental musical phrases that make up the piece to later recombine them in palindromic structures.
; Ma fin est mon commencement - Guillaume de Machaut
(define seq1 '((C4 B3 A3 G3 A3 B3 C4 E4 D4 E4 F4 E4 D4 C4 E4 G4 F#4 E4 G4 F#4 G4 A4 F#4 G4 A4 G4 F#4 G4 E4 F#4 E4 D4 G4 F4 G4 E4 F4 E4 D4 C4 E4 D4 C4 B3 A3 G3 A3 B3 C4 D4 E4 D4 E4 C4 D4 C4 B3 C4 E4 G4 F4 E4 F4 D4 E4 C4 D4 A3 B3 C4 A3 B3 C4 B3 C4 E4 D4)(W E Q Q Q E E E E E E Q E Q H Q W E E E Q E E E E Q E Q H H Q W E E E Q E E E E Q Q E E E W E E E Q E E E H E Q E E Q E E E E E H H H H H H E E E Q Q E W)))
(define seq2 '((C4 D4 E4 D4 R C4 B3 A3 D4 C4 B3 R C4 B3 A3 G3 D4 E4 C4 B3 A3 G3 A3 B3 C#4 D4 B3 C#4 D4 G3 B3 D4 C4 B3 C4 G3 C4 D4 E4 D4 C4 B3 A3 G3 B3 C4 E4 G4 F4 E4 D4 C4 D4 A4 B4 C4 D4 C4 E4 D4 C4 D4)(W Q H Q E E E E E Q E E E E E H W Q H Q H H E E E Q Q E H E Q E H H Q Q E Q Q Q E H Q H Q E Q Q E E E H H W H H H H Q H Q W)))
(define seq3 '((C3 G3 C3 C3 C3 G3 C3 G3 A3 G3 C3 D3 C3 A3 G3 F#3 G3 C3 C3 C3 R D3 A3 D3 G3 C3 G3 F3 E3 D3 C3 E3 F3 G3 C3 E3 D3 C3 G3 C3 D3 E3 F3 G3 C3 G3 F3 D3 C3 D3 E3 G3 F3 E3 D3)(W E Q E Q Q H E Q E W W H Q Q H E Q E Q Q Q Q H H H H E Q E H W E Q E Q Q H H H E E E E W H H H H E Q E Q Q W)))
We can now define functions that will merge the musical phrases and make them palindromic:
(define (integrate-pitches sq1 sq2)
(pitches->numbers (append (car sq1) (retrograde (car sq2)))))
(define (integrate-lengths sq1 sq2)
(lengths->numbers (append (cadr sq1) (retrograde (cadr sq2)))))
Finally we just choose which musical sequences we want to recombine and make them palindromic. The cantus is made up from seq1 and seq2, the triplum of seq2 and seq1 and the tenor just of seq3. These palindromic structures are what make up the piece.
(define cantus-pitches (integrate-pitches seq1 seq2))
(define cantus-lengths (integrate-lengths seq1 seq2))
(define cantus-vels (create-constant-velocities cantus-pitches 96))
(define cantus (create-events 0 cantus-pitches cantus-lengths cantus-vels 1))
(define triplum-pitches (transpose (integrate-pitches seq2 seq1) 12))
(define triplum-lengths (integrate-lengths seq2 seq1))
(define triplum-vels (create-constant-velocities triplum-pitches 96))
(define triplum (create-events 0 triplum-pitches triplum-lengths triplum-vels 2))
(define tenor-pitches (integrate-pitches seq3 seq3))
(define tenor-lengths (integrate-lengths seq3 seq3))
(define tenor-vels (create-constant-velocities tenor-pitches 96))
(define tenor (create-events 0 tenor-pitches tenor-lengths tenor-vels 3))
(define evs (append cantus triplum tenor))
(save-midi evs)
The complete code:
; Ma fin est mon commencement - Guillaume de Machaut
(define seq1 '((C4 B3 A3 G3 A3 B3 C4 E4 D4 E4 F4 E4 D4 C4 E4 G4 F#4 E4 G4 F#4 G4 A4 F#4 G4 A4 G4 F#4 G4 E4 F#4 E4 D4 G4 F4 G4 E4 F4 E4 D4 C4 E4 D4 C4 B3 A3 G3 A3 B3 C4 D4 E4 D4 E4 C4 D4 C4 B3 C4 E4 G4 F4 E4 F4 D4 E4 C4 D4 A3 B3 C4 A3 B3 C4 B3 C4 E4 D4)(W E Q Q Q E E E E E E Q E Q H Q W E E E Q E E E E Q E Q H H Q W E E E Q E E E E Q Q E E E W E E E Q E E E H E Q E E Q E E E E E H H H H H H E E E Q Q E W)))
(define seq2 '((C4 D4 E4 D4 R C4 B3 A3 D4 C4 B3 R C4 B3 A3 G3 D4 E4 C4 B3 A3 G3 A3 B3 C#4 D4 B3 C#4 D4 G3 B3 D4 C4 B3 C4 G3 C4 D4 E4 D4 C4 B3 A3 G3 B3 C4 E4 G4 F4 E4 D4 C4 D4 A4 B4 C4 D4 C4 E4 D4 C4 D4)(W Q H Q E E E E E Q E E E E E H W Q H Q H H E E E Q Q E H E Q E H H Q Q E Q Q Q E H Q H Q E Q Q E E E H H W H H H H Q H Q W)))
(define seq3 '((C3 G3 C3 C3 C3 G3 C3 G3 A3 G3 C3 D3 C3 A3 G3 F#3 G3 C3 C3 C3 R D3 A3 D3 G3 C3 G3 F3 E3 D3 C3 E3 F3 G3 C3 E3 D3 C3 G3 C3 D3 E3 F3 G3 C3 G3 F3 D3 C3 D3 E3 G3 F3 E3 D3)(W E Q E Q Q H E Q E W W H Q Q H E Q E Q Q Q Q H H H H E Q E H W E Q E Q Q H H H E E E E W H H H H E Q E Q Q W)))
(define (integrate-pitches sq1 sq2)
(pitches->numbers (append (car sq1) (retrograde (car sq2)))))
(define (integrate-lengths sq1 sq2)
(lengths->numbers (append (cadr sq1) (retrograde (cadr sq2)))))
(define cantus-pitches (integrate-pitches seq1 seq2))
(define cantus-lengths (integrate-lengths seq1 seq2))
(define cantus-vels (create-constant-velocities cantus-pitches 96))
(define cantus (create-events 0 cantus-pitches cantus-lengths cantus-vels 1))
(define triplum-pitches (transpose (integrate-pitches seq2 seq1) 12))
(define triplum-lengths (integrate-lengths seq2 seq1))
(define triplum-vels (create-constant-velocities triplum-pitches 96))
(define triplum (create-events 0 triplum-pitches triplum-lengths triplum-vels 2))
(define tenor-pitches (integrate-pitches seq3 seq3))
(define tenor-lengths (integrate-lengths seq3 seq3))
(define tenor-vels (create-constant-velocities tenor-pitches 96))
(define tenor (create-events 0 tenor-pitches tenor-lengths tenor-vels 3))
(define evs (append cantus triplum tenor))
(save-midi evs)