Classification of Dance Music by Periodicity Patternsc.chuan/cis4930/Aspillaga-w8.pdf ·...
Transcript of Classification of Dance Music by Periodicity Patternsc.chuan/cis4930/Aspillaga-w8.pdf ·...
Classification of Dance Music by Periodicity Patterns- Simon Dixon, Elias Pampalk, and Gerhard Widnmer
Felipe X. AspillagaCIS 5930 - Spring 2011
Music Informatics and ComputingDr. Ching-Hua Chuan
1
Monday, February 28, 2011
Outline
Problem Overview
Inter-Onset Interval Clustering
Periodicity Detection with Autocorrelation
Determining Tempo, Meter and Style
Tests, Comparisons and Results
Conclusion
2
Monday, February 28, 2011
Distinguish and determine subtleties of similar genres
Classification of widely differing genre classification relatively simple
Use a focused set of latin and ballroom dance genres
E.g. Tango, Foxtrot, Samba, Cha Cha, Rumba, etc
Use only temporal features (Related to time)
Other features such as instrumentation and articulation not used
Problem Overview
3
Monday, February 28, 2011
Compare two methods of determining periodicities
Onset Detection (Dixon et. al.)
Detect note onsets in audio signal
Calculate time intervals between onset pairs
Find significant periodicities using clustering
Similarity of rhythmic patterns (Paulus & Klapuri)
Split audio into frequency bands
Produce set of amplitude envelopes
Use autocorrelation to find periodicities in each band
Problem Overview
4
Monday, February 28, 2011
“Post periodicities”
Assign each periodicity to a note value
Find best matching metrical hierarchy
Tempo and meter
Determine style/genre
Problem Overview
5
Monday, February 28, 2011
Inter-Onset Interval Clustering
Step 1: Audio Processing
Read audio file (Linear PCM)
Converted to single channel
Process in 40ms blocks
Calculates RMS amplitude
Find local peaks slopes using time-domain method(Figure 1)
Eliminate insignificant peaks by setting thresholds for amplitude and slope
6
Monday, February 28, 2011
Inter-Onset Interval Clustering
Step 2: Clustering
Calculate IOI pairs < 5 secs apart
Weight based on onset amplitude
Sum equally spaced pairs
Create weighted IOI histogram (Fig. 3)
Best-first cluster has largest average amplitude
Next-best clusters determined from “left-over” IOI’s
Cluster width adjusted by IOI duration
Associate related clusters (1/2, 1/4)
Adjust weight based on related clusters
7
1 4 8
Audio: http://en.wikipedia.org/wiki/Samba
Monday, February 28, 2011
8
Inter-Onset Interval Clustering
Onset times <= 5 secs //Group equal onsets //
Determine each onset weight //Look for un-clustered IOI’s //
Onset times <= 5 secs //Allow time variation in interval //
Changes per ‘while’ iteration //Find max of unmarked clusters //
Create current max cluster //Ignore this set in future ‘while’s //
All clusters now ordered //Double / half tempos //
Weight based on relatives //
Clustering Algorithm
Monday, February 28, 2011
Periodicity Detection with Autocorrelation
Step 1: Audio Processing
Read audio file (Linear PCM)
Converted to single channel
Pass through 8 filter bands
One for each octave
Reduce sampling rate: 980 Hz
9
Monday, February 28, 2011
Periodicity Detection with Autocorrelation
Step 2: Periodicity Calculation
Find periodicities for each band
Top 3 Peaks found in autocorrelation with lags <= 5 sec.
Discard the lag 0 value
Match peaks across bands
Weights determined by sum of mean autocorrelation value and number of matched periodicities in the set
Ranking helps to choose tempo, meter and style
10
Monday, February 28, 2011
Time for a breather!Style is everything
Jim Carey’s Cha - Cha
http://www.youtube.com/
Choose your own adventure
Carlos Gardel - ‘Por Una Cabeza’
Al Pacino and Gabrielle Anwar's Tango
Tina and Felipe’s Tango
11
Monday, February 28, 2011
Determining Tempo, Meter and Style
Both approaches discover peaks that correlate to beat and measure well
Difficulty lies with discerning peaks occurring at various metrical levels (Doubling / Halves / etc)
Step 1: Find the Measure level
Compare each periodicity against all others, with integer simplification to solve for Error Weight
Step 2: Calculate the weighted sums of the periodicity weights
Separate odd and even meters to account in variance in distribution (3/4 vs. 4/4 time)
W-sums (even || odd) = Sum of periods(W-meter * W-periodicity * W-tempo * W-error)
Step 3: Choose the style
Use a rule-based approach
Filter by Tempo an Meter definitions
Then use periodicity distribution to distinguish by style
12
Monday, February 28, 2011
Determining Tempo, Meter and Style
Example: Cha Cha vs. Tango vs. Slow Fox
Tempos for each lie below the 35 mpm range
Meter for each is 4
Lastly, look at weighted periodicities
Max weight = 1/2 note: Slow Fox
Sum the weight of the 1/8 notes
High Value = Cha Cha
Low Value = Tango
13
Monday, February 28, 2011
Tests, Comparisons and Results
161 test tracks come from CD audio with MPM and Style provided
‘Pseudo’-ground truth
Periodicity position of Measure and Beat in ranking lists
IOI finds more significant periodicities
Correlation holds higher ranking of significant periodicities found
14
Monday, February 28, 2011
Tests, Comparisons and Results
Autocorrelation seem to produce more accurate end results for determining Tempo, Meter and Style.
Although Tempo results were decent, Identification of meter and Style had a good success rate, especially with Correlation
Tempo errors in both favor halving/doubling
Correlation had very few outside these bounds
Confusion matrix shows tendency to mix up similar genres
E.g. Cha Cha - Tango - Slow Fox
15
Monday, February 28, 2011
ConclusionsSuccesses
Tempo determination for Correlation whiffed only 5 times
Meter results in both very strong
Classification works well with correlation when correct measure level is chosen
Difficulties
No ground truth available
Categories subjective / cross-over
Small test set
Tightly coupled definitions
Prone to half/doubling errors
Future Improvements
Learning machine automates genre pattern definitions
Approach may generalize towards a wider variety of music
Random Thoughts
Tempo results given a 3 MPM grace window...seems generous
Can this be applied in real-time and/or without the need to decode compressed audio?
More refinement need regarding halving / doubling
16
Monday, February 28, 2011
17
Monday, February 28, 2011
Time for a breather!
18
Monday, February 28, 2011