Mathematical Morphology and Musical...

25
Mathematical Morphology and Musical Representations Carlos Agon, Moreno Andreatta, Jamal Atif, Isabelle Bloch 2019 C. Agon, I. Bloch et al. MM - Music 2019 1 / 25

Transcript of Mathematical Morphology and Musical...

Page 1: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Mathematical Morphology and Musical Representations

Carlos Agon, Moreno Andreatta, Jamal Atif, Isabelle Bloch

2019

C. Agon, I. Bloch et al. MM - Music 2019 1 / 25

Page 2: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Spatial representations of music

C. Agon, I. Bloch et al. MM - Music 2019 2 / 25

Page 3: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

C. Agon, I. Bloch et al. MM - Music 2019 3 / 25

Page 4: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

C. Agon, I. Bloch et al. MM - Music 2019 4 / 25

Page 5: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Mathematical morphology in a nutshell

Dilation: operation in complete lattices that commutes with thesupremum.Erosion: operation in complete lattices that commutes with the infimum.

⇒ applications on sets, fuzzy sets, functions, logical formulas, graphs, etc.

Using a structuring element:

dilation as a degree of conjunction: δB(X ) = {x ∈ S | Bx ∩ X 6= ∅},erosion as a degree of implication: εB(X ) = {x ∈ S | Bx ⊆ X}.

A lot of other operations...

C. Agon, I. Bloch et al. MM - Music 2019 5 / 25

Page 6: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Demonstrations...

C. Agon, I. Bloch et al. MM - Music 2019 6 / 25

Page 7: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Formal framework: complete lattices

Lattice: (T ,≤) (≤ partial ordering) such that∀(x , y) ∈ T ,∃x ∨ y and ∃x ∧ y .

Complete lattice: every family of elements (finite or not) has asmallest upper bound and a largest lower bound.

Examples of complete lattices:

(P(E ),⊆): complete lattice, Boolean (complemented and distributive)(F(Rd),⊆)functions of Rn in R for the partial ordering ≤:f ≤ g ⇔ ∀x ∈ Rn, f (x) ≤ g(x)partitionslogics (propositional logics, modal logics...)fuzzy sets, bipolar fuzzy setsrough sets and fuzzy rough setsformal concepts...

C. Agon, I. Bloch et al. MM - Music 2019 7 / 25

Page 8: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

FCA (Ganter et al.)

G = set of objects.

M = set of attributes or properties.

I ⊆ G ×M.

(X ,Y ) (X ∈ P(G ),Y ∈ P(M)) = formal concept if (X ,Y ) ismaximal for X × Y ⊆ I .

Partial ordering: (X1,Y1) � (X2,Y2)⇔ X1 ⊆ X2(⇔ Y2 ⊆ Y1).

⇒ Lattice structure C and∧t∈T (Xt ,Yt) =

(⋂t∈T Xt , α(β(

⋃t∈T Yt))

),∨

t∈T (Xt ,Yt) =(β(α(

⋃t∈T Xt)),

⋂t∈T Yt

).

Derivation operators:α(X ) = {m ∈ M | ∀g ∈ X , (g ,m) ∈ I},β(Y ) = {g ∈ G | ∀m ∈ Y , (g ,m) ∈ I}.(X ,Y ) formal concept ⇔ α(X ) = Y and β(Y ) = X .

C. Agon, I. Bloch et al. MM - Music 2019 8 / 25

Page 9: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

K composite even odd prime square

1 × ×2 × ×3 × ×4 × × ×5 × ×6 × ×7 × ×8 × ×9 × × ×10 × ×

Objects: integers from 1 to 10.Attributes: composite (c), even (e), odd (o), prime (p) and square (s).

C. Agon, I. Bloch et al. MM - Music 2019 9 / 25

Page 10: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

C. Agon, I. Bloch et al. MM - Music 2019 10 / 25

Page 11: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

C. Agon, I. Bloch et al. MM - Music 2019 11 / 25

Page 12: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

C. Agon, I. Bloch et al. MM - Music 2019 12 / 25

Page 13: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

C. Agon, I. Bloch et al. MM - Music 2019 13 / 25

Page 14: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

A lattice structure on intervals

Core idea:

Harmonic forms = objects

Intervals = attributes

Harmonic system: T = (T ,∆, I), with T = set of tones, I = musicalintervals, and ∆ : T × T → I s.t.

∀(t1, t2, t3),∆(t1, t2) + ∆(t2, t3) = ∆(t1, t3) and ∆(t1, t2) = 0 iff t1 = t2

Here: Tn = (Zn,∆n,Zn), where n ∈ Z+ represents an octave, Zn = Z/nZ,and ∆n is the difference modulo n.Harmonic forms H(Tn): equivalence classes of Ψ:

∀H1 ⊆ Zn,∀H2 ⊆ Zn, H1ΨH2 iff ∃i s.t. H1 = H2 + i

where H + i = {t + i | t ∈ H} if t + i exists for all t ∈ H.

C. Agon, I. Bloch et al. MM - Music 2019 14 / 25

Page 15: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Musical context K = (H(Tn),Zn,R):

G = H(Tn) = objects = harmonic forms,

M = Zn = attributes = intervals,

R = occurrence of an interval in an harmonic form.

Example: 7-tet T7 (C, D, E, F, G, A, B)Intervals = unison (0), second (1), third (2), fourth (3).

C. Agon, I. Bloch et al. MM - Music 2019 15 / 25

Page 16: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Adjunction and Galois connection

Equivalent concepts by reversing the order on one space.

δ : A→ B, ε : B → A α : B → A, β : A→ Bδ(a) ≤B b ⇔ a ≤A ε(b) a ≤A α(b)⇔ b ≤B β(a)

(⇔ β(a) ≤′B b with ≤′

B≡≥B)increasing operators decreasing operatorsεδε = ε, δεδ = δ αβα = α, βαβ = β

εδ = closing, δε = opening αβ and βα = closingsInv(εδ) = ε(B), Inv(δε) = δ(A) Inv(αβ) = α(B), Inv(βα) = β(A)

ε(B) = Moore family α(B) and β(A) = Moore familiesδ(A) = dual Moore family

δ = dilation: δ(∨Aai ) = ∨B(δ(ai )) α(∨Bbi ) = ∧Aα(bi )ε = erosion: ε(∧Bbi ) = ∧A(ε(bi )) β(∨Aai ) = ∧Bβ(ai ) (anti-dilation)

C. Agon, I. Bloch et al. MM - Music 2019 16 / 25

Page 17: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Dilation and erosion in a concept lattice

From join and meet irreducible elements (and for any element bydisjunction/conjunction of irreducible elements).

From valuations and derived distances (and structuring element =ball of the chosen distance).

(Atif et al. ICFCA 2013, LFA 2015, IJUFKS 2016, Agon et al., ICCS 2018)

C. Agon, I. Bloch et al. MM - Music 2019 17 / 25

Page 18: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Reducing a concept lattice using congruences

Congruence: equivalence relation θ on a lattice L, compatible with joinand meet, i.e. (θ(a, b) and θ(c , d))⇒ (θ(a∨ c, b∨ d) and θ(a∧ c, b∧ d)),for all a, b, c, d ∈ L.Quotient lattice: L/θExample: congruence grouping the most common harmonic forms in asame equivalence class.Harmonico-morphological descriptors:

Musical piece M, harmonic system TM, concept lattice C(M)

HMC : formal concepts corresponding to the harmonic forms in M

θ grouping all formal concepts in HMC into one same class;

θδ grouping all formal concepts in δ(HMC ) into one same class;

θε grouping all formal concepts in ε(HMC ) into one same class.

Proposed harmonic descriptors: quotient lattices C(M)/θ, C(M)/θδ,and C(M)/θε.

C. Agon, I. Bloch et al. MM - Music 2019 18 / 25

Page 19: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Example: Ligeti’s String Quartet No. 2 (M2 Pierre Mascarade)

Formal concepts associated with the harmonic forms found in HM: HMC (red), dilation

δ(HMC ) (green), and erosion ε(HM

C ) (yellow).

C. Agon, I. Bloch et al. MM - Music 2019 19 / 25

Page 20: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Congruence relations θ, θδ, and θε on C(M) (7-tet) generated by: HMC , δ(HM

C ), and

ε(HMC ).

C. Agon, I. Bloch et al. MM - Music 2019 20 / 25

Page 21: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Quotient lattices: C(M)/θ, C(M)/θδ, and C(M)/θε.

Interpretation:

Dilations and erosions of the set of formal concepts provide upper andlower bounds of the description.

Congruences provide a structural summary of the harmonic forms.

Proposed descriptors = good representative of M, since they preservethe intervallic structures and provide compact summaries, whichwould allow for comparison between musical pieces.

C. Agon, I. Bloch et al. MM - Music 2019 21 / 25

Page 22: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

C. Agon, I. Bloch et al. MM - Music 2019 22 / 25

Page 23: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Mathematical morphology on various spatialrepresentations

Rythms:

Object = rhythmStructuring element = rhythmDilation via time translationConcatenation

Melodies

Piano roll

Perspective: Tonnetz, ...

C. Agon, I. Bloch et al. MM - Music 2019 23 / 25

Page 24: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Examples on piano roll representations (M2 PaulLascabettes)

Pyramid Song (Radiohead) Opening

Play Play

Structuring element (fifth):C. Agon, I. Bloch et al. MM - Music 2019 24 / 25

Page 25: Mathematical Morphology and Musical Representationsrepmus.ircam.fr/_media/moreno/smir/morpho_math_irma.pdf · 2019. 6. 26. · Pyramid Song (Radiohead) Opening Play Play Structuring

Hey Jude (Beatles) Opening

C C C C C C C C C C C

F F F F F F F F F

G G G G G G G G

A# A# A#

C C C C C C C C C C C C C

EF F F F F F F F F F

A#

C C C C C C C C C C C C C C C C C C C C C C C C C

D D D D D D D D D

E E E E E E E EF F F F F F F F F F F F F F F F F F F F F F F F

G G G G G G G G

A A A A A A A A A A A A A A AA# A# A# A# A# A# A# A#

EF F F

G G G

A A A A A AA# A# A#

C C C C C C C C

D D D D D D D

E EF F F F

G

C C C C C C C C C C C C C C C C C C C C C C C

D D D D D D D D

E E E E E E E EF F F F F F F F F F F F F F F F F F F F F F F

G G G G G G G G

A A A A A A A A A A A A A A AA# A# A# A# A# A# A# A#

Play Play

Structuring elements (triad):

C. Agon, I. Bloch et al. MM - Music 2019 25 / 25