Music Analysis

21
Music Analysis Josiah Boning TJHSST Senior Research Project Computer Systems Lab, 2007-2008

description

Josiah Boning TJHSST Senior Research Project Computer Systems Lab, 2007-2008. Music Analysis. Purpose. Apply machine learning algorithms to audio data Neural Networks Autonomously identify what is music. Background. Bigarelle and Iost (1999) ‏ - PowerPoint PPT Presentation

Transcript of Music Analysis

Page 1: Music Analysis

Music Analysis

Josiah Boning

TJHSST Senior Research ProjectComputer Systems Lab, 2007-2008

Page 2: Music Analysis

Purpose

Apply machine learning algorithms to audio data Neural Networks

Autonomously identify what is music

Page 3: Music Analysis

Background

Bigarelle and Iost (1999) Music genre can be identified by fractal dimension

Basilie et al. (2004) Music genre can be identified by machine learning

algorithms Used discrete MIDI data

Page 4: Music Analysis

Methods

Data Processing Spectral Analysis: Fourier Transform Fractal Dimension: Variation and ANAM Methods

Machine Learning Feed-Forward Neural Network

Page 5: Music Analysis

Fourier Transform

Page 6: Music Analysis

Fourier Transform

Page 7: Music Analysis

Fractal Dimension

“a statistical quantity that gives an indication of how completely a fractal appears to fill space” -- Wikipedia

Audio data is set of discrete sample points, not a function

Therefore, fractal dimension can only be estimated

Page 8: Music Analysis

Fractal Dimension

lim0

2−

log 1b−a∫a

b

∣max f t ∣ x−t∣

−min f t ∣ x−t∣ ∣dx

log

lim0

2−

log 1b−a ∫

x=a

x=b

[ 1

2 ∫t1=0

∫t2=0

∣ f xt1 − f x−t 2 ∣dt1 dt2 ]

1/

dx log

Variation Method:

ANAM Method:

Page 9: Music Analysis

Fractal Dimension

Variation and ANAM methods are two methods of calculating/estimating the same value

Should yield similar results They don't...

Page 10: Music Analysis

Integration Error

Euler’s Method -- Rectangles

Page 11: Music Analysis

Fractal Dimension

Discrete data – limited by sampling frequency

Page 12: Music Analysis

Integration Error

Solution: Interpolation

Page 13: Music Analysis

Interpolation Methods

Polynomial Interpolation – Single formula used to meet all data points Lagrange Interpolation Newton’s Divided Differences Interpolation Chebyshev Interpolation

Splines – several formulas in segments Linear Spline – data points connected by lines Cubic Spline – data points connected by cubic

polylnomials

Page 14: Music Analysis

Cubic Splines

Page 15: Music Analysis

Cubic Splines

A cubic spline S(x) through the data points (x1, y1),...,(xn, yn) is a set of cubic polynomials

S1(x) = y1 + b1(x – x1) + c1(x – x1)2 + d1(x-x1)3 on [x1,x2]S2(x) = y2 + b2(x – x2) + c2(x – x2)2 + d2(x-x2)3 on [x2,x3]

.

.

.Sn-1(x) = yn-1 + bn-1(x – xn-1) + cn-1(x – xn-1)2 + dn-1(x-xn-1)3 on [xn-1,xn]

with the following properties:

Property 1: Si(xi) = yi and Si(xi+1) = y

i+1 for i = 1, ..., n – 1

Property 2: Si-1’(xi) = Si’(xi) for i = 2, ..., n – 1

Property 3: Si-1’’(xi) = Si’’(xi) for i = 2, ..., n – 1

Page 16: Music Analysis

Cubic Splines

Page 17: Music Analysis

Machine Learning

Neural networks Feed-Forward

Page 18: Music Analysis

Neural Network Data Structures

typedef struct _neuron { double value; struct _edge* weights; double num_weights;} neuron;

typedef struct _edge { struct _neuron* source; double weight;} edge;

// sizeof(neuron) == 20// sizeof(edge) == 16

Page 19: Music Analysis

Neural Network Pseudo-Code

For each layer:

For each node:

value = 0

For each node in the previous layer:

value += weight * value of other nodevalue = sigmoid(value)

Page 20: Music Analysis

Neural Network Challenges: Memory

Audio data: 44100 samples/sec Processing 1 second of data 44100 input, 44100 hidden nodes, 1 output

node Memory: (44100 * 2 + 1) * 20 bytes = 1.7 MB

44100 ^ 2 + 44100 edges Memory: (44100 ^ 2 + 44100) * 16 bytes = 31 GB

Solution(?): Alternative input (fractal dimension, Fourier transform data) rather than audio data

Page 21: Music Analysis

Neural Network Challenges: Training

Training Algorithms Training Data Backwards Propagation