Presentation is loading. Please wait.

Presentation is loading. Please wait.

HarmLang A language for probabilistic computation over harmonies

Similar presentations


Presentation on theme: "HarmLang A language for probabilistic computation over harmonies"— Presentation transcript:

1 HarmLang A language for probabilistic computation over harmonies
Caleb Malchik and Cyrus Cousins

2 Mathematical Model of a Musical System
Embedded in Haskell PitchClass 12 cyclic pitches = ℤ12 Interval Represents the difference between 2 pitch classes. Chord composed of a PitchClass (the root) and a set of Intervals in relation to the root

3 Mathematical Model of a Musical System (cont.)
C Major chord, traditional notation: HarmLang notations: [hl| 'CM' |] [hl| 'C[4 7]' |] Harmony (PitchClass 4) [(Interval 4), (Interval 7)]

4 Mathematical Model of a Musical System (cont.)
Is this model faithful to real music? Can represent any chord. Limited to 12 tone music. Timing information is not used.

5 First Order Markov Models
A first order Markov Chain of a 12 bar blues progression. (Each arrow is associated with a transition probability) F Major C Major G7 G Major

6 Higher Order Markov Functions
A first order Markov chain has no memory. Suppose we observe A → B and B → C, but not A → B → C. Can’t represent this with a first order Markov model. We need memory, store it in the nodes!

7 A B D D C A B C B C Q B

8 Markov Models and Conditional Probability
A node can be used as evidence to produce a probability distribution. P(transition to a| at state b) First Order Markov chains over nodes of type N have evidence of type N. P(a|b) for a,b ∈ N Higher order Markov chains have evidence of type List N.

9 Conditional Models in HarmLang
A conditional distribution model has type Evidence → Distribution. In HarmLang this is [Chord] → Dist Chord. Chord changes are thought of as both conditional distributions and Markov transitions. The Markov model (or collection of conditional distributions) for a body of work is represented as a HarmonyDistributionModel Implemented as Map [Chord] (Dist Chord) where every chord list has a fixed length k, corresponding to the order of the Markov model

10 Conditional Priors used in HarmLang
Many applications are sensitive to 0 probabilities. Laplacian prior was intractable. We used smaller conditional priors to augment limited data. Conditional priors have the same type as conditional distributions, [Chord] → Dist Chord

11 Conditional Priors used in HarmLang
2 Tiered Prior. A Markov Model conditional distribution was created from a corpus of ~400 Jazz songs. This model was given a uniform prior over transitions from any chord seen in the corpus to any other. This model was used as a prior to more specific models.

12 The Stylistic Inference Problem
The Problem: Given labeled chord progressions by various artists, determine the authorship of additional instances (chord progressions).

13 The Stylistic Inference Problem (cont.)
Build a HarmonyDistributionModel for each composer. Calculate the probability that the model generated each test instance. Classify the instance to match the model that was most likely to generate that progression.

14 The Stylistic Inference Problem (cont.)
4 Class classification problem Jerome Kern:13 Duke Ellington:13 In cross validation, 26/48 instances correctly classified. Kern and Gershwin frequently confused. Jobim and Ellington usually identified correctly. Small sample size! Antonio-Carlos Jobim:10 George Gershwin:16

15 The Key Agnosticism Property
How much does key matter? Assumptions: Relative pitch matters a great deal. Absolute pitch does not. Key agnosticism: -- a :: ConditionalDistribution -- b :: Interval, c :: [Chord] -- If a has the key agnosticism property, then: a (transpose b c) == transpose b (a c)

16 Please enjoy the demo

17 Future Work Probabilistic Music Generation Larger datasets
Sampling Larger datasets Better accuracy of inference? Able to distinguish similar composers? Improved inference code Make larger models tractable More inference problems Chord prediction

18


Download ppt "HarmLang A language for probabilistic computation over harmonies"

Similar presentations


Ads by Google