Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf ·...

48
Mathematical Symmetry and Algorithms In Music Outreach to Students Interested in the Arts Lisa Lajeunesse Capilano University

Transcript of Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf ·...

Page 1: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Mathematical Symmetry and

Algorithms In Music

Outreach to Students

Interested in the Arts

Lisa Lajeunesse Capilano University

Page 2: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Liberal Studies Bachelor of Arts

(LSBA) at Capilano • Program is broad-based like a traditional Liberal

Arts degree

• Has an interdisciplinary component with semester “themes”

• Request for 3rd and 4th year courses in sciences that would be relevant and interesting to students with primarily a humanities/social sciences background

Page 3: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Math and the Creative Arts

Course

To explore interdisciplinary connections

between math and:

• Visual art

• Music

• Literature

• Theatre? Dance? Math puzzles?

Page 4: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Practical Constraints

• Want the course to be accessible, with

prereqs no higher than Grade 11 Math

• Course topics that relate to LSBA semester

theme of Creation have preference

• Assume students’ backgrounds differ in

math, music, visual art and literature

Page 5: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Overall Course Objectives

• Foster an appreciation for the role that math

can play in art

• Help students see mathematics as beautiful

• Spark interest in further math study

• Empower students to use math

Page 6: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Mathematical Objectives

• Exercise numeracy:

Work with ratios and proportion, modular

arithmetic, geometry, basic algebra, logic,

counting and enumeration, sequences and series

• Recognize and explain mathematical patterns

• Recognize and execute algorithms

Time permitting:

• Graph theory, encryption

• Mathematical proofs as works of art

Page 7: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Artistic Objectives

• Use math to solve artistic problems

• Use math to develop/enhance a technical

skill and provide technical mastery

• Use math to direct artistic form

• Generate discussion and debate on merits of

using mathematics in artistic creation

Page 8: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Music

• Long history of connection with math

• Musical problems have fuelled

mathematical research

• Math and/or physics found on many levels

• Broad appeal

Page 9: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Music and Math Connections

Properties of sound:

• Physics of waves etc.

Relationship between pitch and frequency; relationship

between loudness and intensity:

• Logarithms and Exponentials

Musical intervals, consonance/dissonance:

• Metric, arithmetic and geometric means, sequences

• Ratios and proportion

Page 10: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Symmetry in musical scales and chords:

• Divisibility of integers

Rhythms and recurring patterns:

• Least common multiple

Octave equivalence:

• Modular arithmetic, equivalence classes

Musical Timbre:

• Addition of functions, Fourier analysis

Sound envelope:

• Multiplication of functions

Page 11: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Change ringing and other examples:

• Permutations and Combinations

Composition with chance:

• Stochastic processes

eg. Minuet and Trio (1790) (unknown composer, perhaps

Haydn or Mozart)

use dice to choose amongst a variety of bars of music

http://Sunsite.univie.ac.at/Mozart/dice

Computer composition:

• Design and use of algorithms

Page 12: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

0 2 4 5

3 1

7 9 11 0

8 6 10

The Problem of Tuning

Page 13: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

“Distance” between pitches can

be measured For a sequence of pitches to sound evenly

spaced (perceived by ear as in arithmetic

sequence), the frequencies must be in a

geometric sequence. For 12 evenly spaced

pitches in one octave, the common ratio

must be:

12 2

fffff 2,2,,2,2, 1211

122

121

Page 14: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Tuning issues:

• Exponents, irrational numbers

Historically solutions have involved:

• Geometry, equations of lines, intersections

• Diophantine approximation

• Dominant eigenvalue and eigenvectors of a

12 by 12 matrix (18th c. Christoph Gottlieb

Schröter)

Page 16: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Melody as a Function

• There is an inherent “height” to the pitches that we

hear (determined by frequency).

• Higher frequencies are perceived as “higher”

pitches.

• Most people can identify the (relative) difference

in height between two pitches.

Page 17: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Melody as a Function

• Rhythm determines how pitch changes with

time.

• Melody is comprised primarily of pitch and

rhythm.

Page 18: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Graph of Pitch vs. Time

-4 4 8 12 16 20 24 28 32 36

-2

-1

1

2

3

4

5

6

7

8

9

10

11

12

13

t, time

pitch (distance in semitones relative to middle C)

Passage from The Art of the Fugue, by J.S. Bach

D#

F#

G

E

D

G#

A#

C#

A

C

F

B

Page 19: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Inversion of Melody

-4 4 8 12 16 20 24 28 32 36

-2

-1

1

2

3

4

5

6

7

8

9

10

11

12

13

t, time

pitch (distance in semitones relative to middle C)

Passage from The Art of the Fugue, by J.S. Bach

D#

F#

G

E

D

G#

A#

C#

A

C

F

B

Page 20: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Transformations in Music

• Beautiful music can be created by weaving

together multiple occurrences of a single

melodic function or “voice” with a variety

of transformations of itself

• This practice has been used in music from

13 century to present day

Page 21: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Function Transformations

Horizontal shifts: (time shift) Musical canon

• Row, row, row your boat

• Benjamin Britten, Ceremony of Carols, This Little

Babe (1942): http://www.youtube.com/watch?v=1wayMn7vUEM&feature=related

Horizontal Compressions/Expansions: Mensuration Canon

• Josquin Des Prez, Missa l’Homme Arme Agnus Dei (c.

1500) Super Tones Musicales 5. (up to 1:18): http://www.youtube.com/watch?v=kq2693QkTHU&feature=relmfu

Page 22: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

• Conlon Nancarrow, Study #30 & #36 for

player piano (1940)

Horizontal compressions of voices are in

ratios of 17:18:19:20;

Vertical Shifts: Shifting a sequence of pitches

up or down is called Transposition (often

tonal rather than strict)

Page 23: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Vertical Reflection: Musical term is Inversion

(strict or tonal).

Horizontal Reflection: Musical term is

Retrograde.

Page 24: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Horizontal and Vertical reflections combined:

Musical term is retrograde-inversion (RI)

• Paul Hindemith, Ludus Tonalis (1942)

5th movement = RI of 1st movement:

• 1st Movement: http://www.youtube.com/watch?v=cBm9TE2Lcyg

• 5th Movement: http://www.youtube.com/watch?v=rxoqD7_Znr0

(9:46)

When played in sequence gives odd symmetry

Page 25: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Even Symmetry:

When reflection about the middle of the melody

gives the same melody. Called palindrome:

• Franz Joseph Haydn, Piano Sonata #41 (1773)

• George Crumb, Por Que Naci Entre Espejos (1970)

Periodicity:

• 100 Bottles of Beer on the Wall

• Philip Glass (b.1937), Steve Reich (b.1936) and

minimalist music

Page 26: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

How to represent melody so we

can apply mathematical

transformations?

• Set up 1-1 correspondence between

numbers and pitches

• use octave equivalence

Page 27: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Octave Equivalence and

Equivalence Classes

• Pythagoras is thought to be the first to observe that

two frequencies in a low integer ratio are pleasing

(consonant) to the ear when sounded together.

• The most pleasing is the 2:1 ratio which produces

a distance or interval of one octave.

• Two pitches separated by some integer number of

octaves can be grouped into a single equivalence

class.

Page 28: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Modular Arithmetic

• A single octave is divided into 12 equally

spaced intervals giving 12 distinct

equivalence classes numbered 0 through 11

mod 12.

• 0 generally represents the (equivalence)

pitch class for C.

Page 29: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

0 2 4 5

3 1

7 9 11 0

8 6 10

Page 30: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Melody represented as a

Sequence of Pitch Classes

Row, row, row your boat: Row, row, row your boat

0 0 0 2 4

Gent-ly down the stream

4 2 4 5 7

Mer-ri-ly, mer-ri-ly, mer-ri-ly, mer-ri-ly

12 (0) 7 4 0

Life is but a dream

7 5 4 2 0

Page 31: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

20th Century 12-Tone Serialism

• Pioneered in the early 1900’s by Arnold

Schoenberg (1874 – 1951)

• Also by pupils Anton Webern (1883 –

1945), Alban Berg (1885 – 1935) etc.

• In vogue for 50+ years amongst composers

Page 32: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Original Rules of

12-Tone Serialism • Choose one of 12! permutations of the 12 pitch classes of

the chromatic scale to give the prime form of the tone row.

• Compose the musical piece using transpositions of the

prime, retrograde, inversion and retrograde inversion of the

prime (Note: This gives 48 different tone rows from which

to choose).

• Each row must be completely used before another one of

the 48 tone rows is employed in a given voice.

• Pitches may be repeated. Two or more consecutive pitches

in the row may be sounded simultaneously as a chord.

Page 33: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Examples: Anton Webern, Concerto, op. 24:

Prime Tone Row

-1 -2 2 | 3 7 6 | 8 4 5 | 0 1 -3

Prime | RI | R | I

http://www.youtube.com/watch?v=4OPfHfWBZLY

In film scores: The Prisoner (Alec Guiness)

The Curse of the Werewolf

Page 34: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Algorithm in Musical

Composition

Gareth Loy in Musimathics Vol. 1 on

composition and use of non-deterministic

methodologies:

The analysis of methodology can reveal the

aesthetic agenda of its (the music’s) creator

Page 35: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Aesthetic Objectives

Reflect musically the existential angst of

Viennese society in the early 20th century:

• Atonality: Move beyond a single tonal

center (likewise beyond polytonality)

• Chromatic saturation: democratic use of 12

tones equally

• Emancipation of dissonance: No need for

dissonances to resolve into consonance

Page 36: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Aesthetic Objectives

• Highly Organized: Compose structured

music in a way that maintains continuity

with earlier musical traditions

• Highlight Intervals: Make the interval

content of the tone row the unifying thread

of the music

Page 37: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Use of Latin Squares in

12-Tone Serialism

Definition: An n by n Latin Square is an

arrangement of n symbols into an n by n

array so that each symbol appears exactly

once in each column and each row.

Page 38: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Construct a Musical Latin Square

(called a Serial Matrix) 0 2 5 3 4 1

4

1

3

2

5

0 3 1 2 5

3 0 4 5 2

5 2 0 1 4

4 1 5 0 3

1 4 2 3 0

Page 39: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Latin Square for 12 Tone Row

I4 I7 I10 I6 I9 I8 I11 I2 I0 I1 I5 I3

P4 4 7 10 6 9 8 11 2 0 1 5 3 R4

P1 1 4 7 3 6 5 8 11 9 10 2 0 R1

P10 10 1 4 0 3 2 5 8 6 7 11 9 R10

P2 2 5 8 4 7 6 9 0 10 11 3 1 R2

P11 11 2 5 1 4 3 6 9 7 8 0 10 R11

P0 0 3 6 2 5 4 7 10 8 9 1 11 R0

P9 9 0 3 11 2 1 4 7 5 6 10 8 R9

P6 6 9 0 8 11 10 1 4 2 3 7 5 R6

P8 8 11 2 10 1 0 3 6 4 5 9 7 R8

P7 7 10 1 9 0 11 2 5 3 4 8 6 R7

P3 3 6 9 5 8 7 10 1 11 0 4 2 R3

P5 5 8 11 7 10 9 0 3 1 2 6 4 R5

RI4 RI7 RI10 RI6 RI9 RI8 RI11 RI2 RI0 RI1 RI5 RI3

Page 40: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Computer Generated Music:

Outline of Algorithm

• Select one of four different sets of pitch classes

• Randomly choose the prime tone row (permute the

pitch classes)

• Build the serial matrix and then play some number

of tone rows randomly selected

• Option: Include rhythmic structure or not

• Option: Select pitches from multiple octaves

Page 41: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

1 0 3 2 4

Pentatonic Scale

Page 42: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Pentatonic Scale Rhythm

• Randomly choose amongst 3 rhythmic

structures with accompanying stresses to

make music sound like it is in ¾ time

Page 43: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

4 3 5

Whole Tone Scale

1 0 2 0

Page 44: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Whole Tone Scale Rhythm

• Randomly choose amongst 4 rhythmic

structures with accompanying stresses to

make music sound like it is in 4/4 time

• One rhythmic structure includes a tie across

a bar line

Page 45: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Diatonic Scale

1 0 2 4 3 5 6 0

Page 46: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

Diatonic Scale Rhythm

• Randomly choose amongst 4 rhythmic

structures with accompanying stresses to

make music sound like it is in 4/4 time

Page 47: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

0 2 4 5

3 1

7 9 11 0

8 6 10

12 tone Chromatic Scale

Page 48: Mathematical Symmetry and Algorithms In Musicsharingmath.tru.ca/LL_Musimathics presentation.pdf · 2013. 1. 16. · • Compose the musical piece using transpositions of the prime,

12 tone Chromatic Scale

• Randomly choose note duration

• Randomly (and independently) choose

accompanying stress

• No sense of rhythmic pulse