Tempo and Beat Tracking Meinard Mller International Audio - - PowerPoint PPT Presentation

tempo and beat tracking
SMART_READER_LITE
LIVE PREVIEW

Tempo and Beat Tracking Meinard Mller International Audio - - PowerPoint PPT Presentation

Lecture Music Processing Tempo and Beat Tracking Meinard Mller International Audio Laboratories Erlangen meinard.mueller@audiolabs-erlangen.de Book: Fundamentals of Music Processing Meinard Mller Fundamentals of Music Processing Audio,


slide-1
SLIDE 1

Music Processing Meinard Müller

Lecture

Tempo and Beat Tracking

International Audio Laboratories Erlangen meinard.mueller@audiolabs-erlangen.de

slide-2
SLIDE 2

Book: Fundamentals of Music Processing

Meinard Müller Fundamentals of Music Processing Audio, Analysis, Algorithms, Applications 483 p., 249 illus., hardcover ISBN: 978-3-319-21944-8 Springer, 2015 Accompanying website: www.music-processing.de

slide-3
SLIDE 3

Book: Fundamentals of Music Processing

Meinard Müller Fundamentals of Music Processing Audio, Analysis, Algorithms, Applications 483 p., 249 illus., hardcover ISBN: 978-3-319-21944-8 Springer, 2015 Accompanying website: www.music-processing.de

slide-4
SLIDE 4

Book: Fundamentals of Music Processing

Meinard Müller Fundamentals of Music Processing Audio, Analysis, Algorithms, Applications 483 p., 249 illus., hardcover ISBN: 978-3-319-21944-8 Springer, 2015 Accompanying website: www.music-processing.de

slide-5
SLIDE 5

Chapter 6: Tempo and Beat Tracking

Tempo and beat are further fundamental properties of music. In Chapter 6, we introduce the basic ideas on how to extract tempo-related information from audio recordings. In this scenario, a first challenge is to locate note onset information—a task that requires methods for detecting changes in energy and spectral content. To derive tempo and beat information, note onset candidates are then analyzed with regard to quasiperiodic patterns. This leads us to the study of general methods for local periodicity analysis of time series.

6.1 Onset Detection 6.2 Tempo Analysis 6.3 Beat and Pulse Tracking 6.4 Further Notes

slide-6
SLIDE 6

Introduction

Basic beat tracking task: Given an audio recording of a piece of music, determine the periodic sequence of beat positions. “Tapping the foot when listening to music’’

slide-7
SLIDE 7

Time (seconds)

Example: Queen – Another One Bites The Dust

Introduction

slide-8
SLIDE 8

Example: Queen – Another One Bites The Dust

Introduction

Time (seconds)

slide-9
SLIDE 9

Introduction

Example: Happy Birthday to you Pulse level: Measure

slide-10
SLIDE 10

Introduction

Example: Happy Birthday to you Pulse level: Tactus (beat)

slide-11
SLIDE 11

Introduction

Example: Happy Birthday to you Pulse level: Tatum (temporal atom)

slide-12
SLIDE 12

Example: Chopin – Mazurka Op. 68-3 Pulse level: Quarter note Tempo: ???

Introduction

slide-13
SLIDE 13

Example: Chopin – Mazurka Op. 68-3 Pulse level: Quarter note Tempo: 50-200 BPM

Time (beats) Tempo (BPM)

50 200

Tempo curve

Introduction

slide-14
SLIDE 14

Introduction

Example: Borodin – String Quartet No. 2 Pulse level: Quarter note Tempo: 120-140 BPM (roughly) Beat tracker without any prior knowledge Beat tracker with prior knowledge on rough tempo range

slide-15
SLIDE 15

Introduction

  • Pulse level often unclear
  • Local/sudden tempo changes (e.g. rubato)
  • Vague information

(e.g., soft onsets, extracted onsets corrupt)

  • Sparse information

(often only note onsets are used) Challenges in beat tracking

slide-16
SLIDE 16
  • Onset detection
  • Beat tracking
  • Tempo estimation

Tasks

Introduction

slide-17
SLIDE 17
  • Onset detection
  • Beat tracking
  • Tempo estimation

Tasks

Introduction

slide-18
SLIDE 18

period phase

  • Onset detection
  • Beat tracking
  • Tempo estimation

Tasks

Introduction

slide-19
SLIDE 19

Tempo := 60 / period Beats per minute (BPM)

  • Onset detection
  • Beat tracking
  • Tempo estimation

Tasks

period

Introduction

slide-20
SLIDE 20

Onset Detection

  • Finding start times of

perceptually relevant acoustic events in music signal

  • Onset is the time position

where a note is played

  • Onset typically goes along

with a change of the signal’s properties:

– energy or loudness – pitch or harmony – timbre

slide-21
SLIDE 21

Onset Detection

  • Finding start times of

perceptually relevant acoustic events in music signal

  • Onset is the time position

where a note is played

  • Onset typically goes along

with a change of the signal’s properties:

– energy or loudness – pitch or harmony – timbre

Transient Onset Attack Decay

slide-22
SLIDE 22

Steps

Time (seconds)

Onset Detection (Energy-Based)

Waveform

slide-23
SLIDE 23

Onset Detection (Energy-Based)

Time (seconds)

Squared waveform Steps 1. Amplitude squaring

slide-24
SLIDE 24

Onset Detection (Energy-Based)

Time (seconds)

Energy envelope Steps 1. Amplitude squaring 2. Windowing

slide-25
SLIDE 25

Onset Detection (Energy-Based)

Capturing energy changes

Time (seconds)

Differentiated energy envelope Steps 1. Amplitude squaring 2. Windowing 3. Differentiation

slide-26
SLIDE 26

Onset Detection (Energy-Based)

Time (seconds)

Novelty curve Steps 1. Amplitude squaring 2. Windowing 3. Differentiation 4. Half wave rectification Only energy increases are relevant for note onsets

slide-27
SLIDE 27

Onset Detection (Energy-Based)

Time (seconds)

Steps 1. Amplitude squaring 2. Windowing 3. Differentiation 4. Half wave rectification 5. Peak picking Peak positions indicate note onset candidates

slide-28
SLIDE 28

Onset Detection (Energy-Based)

Example: C4 played by piano

Time (seconds)

slide-29
SLIDE 29

Onset Detection (Energy-Based)

Example: C4 played by violin

Time (seconds)

slide-30
SLIDE 30

Onset Detection (Energy-Based)

Example: C4 played by flute

Time (seconds)

slide-31
SLIDE 31

Onset Detection

  • Energy curves often only work for percussive music
  • Many instruments such as strings have weak note onsets
  • No energy increase may be observable in complex sound

mixtures

  • More refined methods needed that capture

– changes of spectral content – changes of pitch – changes of harmony

slide-32
SLIDE 32

Onset Detection (Spectral-Based)

Time (seconds)

Audio recording

slide-33
SLIDE 33
  • 1. Spectrogram

Magnitude spectrogram | | X

Steps:

Onset Detection (Spectral-Based)

Frequency (Hz) Time (seconds)

slide-34
SLIDE 34

Compressed spectrogram Y

|) | 1 log( X C Y   

Onset Detection (Spectral-Based)

  • 1. Spectrogram
  • 2. Logarithmic compression

Steps:

Frequency (Hz) Time (seconds)

slide-35
SLIDE 35

Spectral difference

Onset Detection (Spectral-Based)

  • 1. Spectrogram
  • 2. Logarithmic compression
  • 3. Differentiation &

half wave rectification Steps:

Frequency (Hz) Time (seconds)

slide-36
SLIDE 36

Spectral difference

Novelty curve

Onset Detection (Spectral-Based)

  • 1. Spectrogram
  • 2. Logarithmic compression
  • 3. Differentiation &

half wave rectification

  • 4. Accumulation

Steps:

Time (seconds) Frequency (Hz) Time (seconds) 1 2 3 4 5 6 20 40 60

slide-37
SLIDE 37

Onset Detection (Spectral-Based)

  • 1. Spectrogram
  • 2. Logarithmic compression
  • 3. Differentiation &

half wave rectification

  • 4. Accumulation

Steps: Novelty curve

slide-38
SLIDE 38

Substraction of local average

Onset Detection (Spectral-Based)

  • 1. Spectrogram
  • 2. Logarithmic compression
  • 3. Differentiation &

half wave rectification

  • 4. Accumulation
  • 5. Normalization

Steps: Novelty curve

slide-39
SLIDE 39

Onset Detection (Spectral-Based)

  • 1. Spectrogram
  • 2. Logarithmic compression
  • 3. Differentiation &

half wave rectification

  • 4. Accumulation
  • 5. Normalization

Steps: Normalized novelty curve

slide-40
SLIDE 40

Onset Detection (Spectral-Based)

  • Spectrogram
  • Compressed Spectrogram
  • Novelty curve
slide-41
SLIDE 41

Logarithmic Compression

Time (seconds) Time (seconds) Time (seconds) Frequency (Hz)

|) | 1 log( X C Y   

No compression C = 1 C = 100

slide-42
SLIDE 42

Onset Detection

Time (seconds)

Energy-based novelty curve Spectral-based novelty curve Manuel onset annotations

slide-43
SLIDE 43

Onset Detection

Shostakovich – 2nd Waltz

Time (seconds)

Borodin – String Quartet No. 2 Beethoven – Fifth Symphony

slide-44
SLIDE 44

Onset Detection

Drumbeat Going Home Lyphard melodie Por una cabeza Donau

slide-45
SLIDE 45

Beat and Tempo

  • Steady pulse that drives music

forward and provides the temporal framework of a piece

  • f music
  • Sequence of perceived pulses

that are equally spaced in time

  • The pulse a human taps along

when listening to the music

[Parncutt 1994] [Sethares 2007] [Large/Palmer 2002] [Lerdahl/ Jackendoff 1983] [Fitch/ Rosenfeld 2007]

What is a beat? The term tempo then refers to the speed of the pulse.

slide-46
SLIDE 46

Beat and Tempo

  • Analyze the novelty curve with

respect to reoccurring or quasi- periodic patterns

  • Avoid the explicit determination
  • f note onsets (no peak picking)

Strategy

slide-47
SLIDE 47

Beat and Tempo

[Scheirer, JASA 1998] [Ellis, JNMR 2007] [Davies/Plumbley, IEEE-TASLP 2007] [Peeters, JASP 2007]

Strategy

  • Comb-filter methods
  • Autocorrelation
  • Fourier transfrom

Methods

[Grosche/Müller, ISMIR 2009]

  • Analyze the novelty curve with

respect to reoccurring or quasi- periodic patterns

  • Avoid the explicit determination
  • f note onsets (no peak picking)

[Grosche/Müller, IEEE-TASLP 2011]

slide-48
SLIDE 48

Definition: A tempogram is a time-tempo representation that encodes the local tempo of a music signal

  • ver time.

Tempo (BPM) Time (seconds) Intensity

Tempogram

slide-49
SLIDE 49

Definition: A tempogram is a time-tempo represenation that encodes the local tempo of a music signal

  • ver time.
  • Compute a spectrogram (STFT) of the novelty curve
  • Convert frequency axis (given in Hertz) into

tempo axis (given in BPM)

  • Magnitude spectrogram indicates local tempo

Fourier-based method

Tempogram (Fourier)

slide-50
SLIDE 50

Tempo (BPM) Time (seconds)

Tempogram (Fourier)

Novelty curve

slide-51
SLIDE 51

Tempo (BPM)

Tempogram (Fourier)

Novelty curve (local section)

Time (seconds)

slide-52
SLIDE 52

Tempo (BPM)

Windowed sinusoidal

Tempogram (Fourier)

Time (seconds)

slide-53
SLIDE 53

Tempo (BPM)

Windowed sinusoidal

Tempogram (Fourier)

Time (seconds)

slide-54
SLIDE 54

Tempo (BPM)

Tempogram (Fourier)

Windowed sinusoidal

Time (seconds)

slide-55
SLIDE 55

Definition: A tempogram is a time-tempo represenation that encodes the local tempo of a music signal

  • ver time.
  • Compare novelty curve with time-lagged

local sections of itself

  • Convert lag-axis (given in seconds) into

tempo axis (given in BPM)

  • Autocorrelogram indicates local tempo

Autocorrelation-based method

Tempogram (Autocorrelation)

slide-56
SLIDE 56

Tempogram (Autocorrelation)

Novelty curve (local section)

Lag (seconds) Time (seconds)

slide-57
SLIDE 57

Tempogram (Autocorrelation)

Windowed autocorrelation

Lag (seconds)

slide-58
SLIDE 58

Tempogram (Autocorrelation)

Lag = 0 (seconds)

Lag (seconds)

slide-59
SLIDE 59

Tempogram (Autocorrelation)

Lag = 0.26 (seconds)

Lag (seconds)

slide-60
SLIDE 60

Tempogram (Autocorrelation)

Lag = 0.52 (seconds)

Lag (seconds)

slide-61
SLIDE 61

Tempogram (Autocorrelation)

Lag = 0.78 (seconds)

Lag (seconds)

slide-62
SLIDE 62

Tempogram (Autocorrelation)

Lag = 1.56 (seconds)

Lag (seconds)

slide-63
SLIDE 63

Tempogram (Autocorrelation)

Time (seconds) Time (seconds) Lag (seconds)

slide-64
SLIDE 64

300 60 80 40 30 120

Tempogram (Autocorrelation)

Tempo (BPM) Time (seconds) Time (seconds)

slide-65
SLIDE 65

600 500 400 300 200 100

Tempogram (Autocorrelation)

Tempo (BPM) Time (seconds) Time (seconds)

slide-66
SLIDE 66

Time (seconds)

Tempogram

Fourier Autocorrelation

Time (seconds) Tempo (BPM)

slide-67
SLIDE 67

Tempogram

Fourier Autocorrelation

210 70

Tempo (BPM)

Tempo@Tatum = 210 BPM Tempo@Measure = 70 BPM

Time (seconds) Time (seconds)

slide-68
SLIDE 68

Tempogram

Fourier Autocorrelation

Time (seconds) Time (seconds) Tempo (BPM) Time (seconds)

Emphasis of tempo harmonics (integer multiples) Emphasis of tempo subharmonics (integer fractions)

slide-69
SLIDE 69

Tempogram (Summary)

Fourier Autocorrelation

Novelty curve is compared with sinusoidal kernels each representing a specific tempo Novelty curve is compared with time-lagged local (windowed) sections of itself Convert frequency (Hertz) into tempo (BPM) Convert time-lag (seconds) into tempo (BPM) Reveals novelty periodicities Reveals novelty self-similarities Emphasizes harmonics Emphasizes subharmonics Suitable to analyze tempo on tatum and tactus level Suitable to analyze tempo on tactus and measure level

slide-70
SLIDE 70

Beat Tracking

  • Given the tempo, find the best sequence of beats
  • Complex Fourier tempogram contains magnitude

and phase information

  • The magnitude encodes how well the novelty curve

resonates with a sinusoidal kernel of a specific tempo

  • The phase optimally aligns the sinusoidal kernel with

the peaks of the novelty curve

slide-71
SLIDE 71

Local Pulse Tracking

Tempo (BPM) Time (seconds)

slide-72
SLIDE 72

Local Pulse Tracking

Tempo (BPM) Time (seconds)

Optimizing local periodicity kernel

slide-73
SLIDE 73

Local Pulse Tracking

Tempo (BPM) Time (seconds)

Optimizing local periodicity kernel

slide-74
SLIDE 74

Local Pulse Tracking

Tempo (BPM) Time (seconds)

Optimizing local periodicity kernel

slide-75
SLIDE 75

Local Pulse Tracking

Tempo (BPM) Time (seconds)

Optimizing local periodicity kernel Halfwave rectification Accumulation of kernels

Time (seconds)

slide-76
SLIDE 76

Local Pulse Tracking

Tempo (BPM) Time (seconds)

Optimizing local periodicity kernel Halfwave rectification

slide-77
SLIDE 77

Local Pulse Tracking

Novelty Curve Predominant Local Pulse (PLP)

Time (seconds) Time (seconds)

slide-78
SLIDE 78
  • Periodicity enhancement of novelty curve
  • Accumulation introduces error robustness
  • Locality of kernels handles tempo variations
  • Indicates note onset candidates
  • Extraction errors in particular for soft onsets
  • Simple peak-picking problematic

Local Pulse Tracking

Predominant Local Pulse (PLP) Novelty Curve

slide-79
SLIDE 79

Local Pulse Tracking

  • Local tempo at time : [60:240] BPM
  • Phase
  • Sinusoidal kernel
  • Periodicity curve
slide-80
SLIDE 80

Local Pulse Tracking

Novelty Curve Predominant Local Pulse (PLP)

Time (seconds)

slide-81
SLIDE 81

Local Pulse Tracking

Tempo (BPM) Time (seconds)

Borodin – String Quartet No. 2

slide-82
SLIDE 82

Local Pulse Tracking

Tempo (BPM)

Borodin – String Quartet No. 2 Strategy: Exploit additional knowledge (e.g. rough tempo range)

Time (seconds)

slide-83
SLIDE 83

Pulse Levels

What is the pulse level: Measure – Tactus – Tatum?

1/8 1/4 1/16

Piano Etude Op. 100 No. 2 by Burgmüller

  • • • •
  • ••••••• •••••••• •••••••• ••••••••
  • • • • • • • • • • • • • • • •
slide-84
SLIDE 84

Pulse Levels

Tempo (BPM)

slide-85
SLIDE 85

Pulse Levels

Time (seconds)

Switching of predominant pulse level

Tempo (BPM)

slide-86
SLIDE 86

Pulse Levels

1/4 note pulse level

Time (seconds) Tempo (BPM)

slide-87
SLIDE 87

Pulse Levels

1/8 note pulse level

Time (seconds) Tempo (BPM)

slide-88
SLIDE 88

Pulse Levels

1/16 note pulse level

Time (seconds) Tempo (BPM)

slide-89
SLIDE 89

Local Pulse Tracking

Brahms Hungarian Dance No. 5

Tempo (BPM) Time (seconds)

slide-90
SLIDE 90

Local Pulse Tracking

Brahms Hungarian Dance No. 5

Time (seconds) Tempo (BPM)

slide-91
SLIDE 91

Applications

  • Feature design

(beat-synchronous features, adaptive windowing)

  • Digital DJ / audio editing

(mixing and blending of audio material)

  • Music classification
  • Music recommendation
  • Performance analysis

(extraction of tempo curves)

slide-92
SLIDE 92

Application: Feature Design

Time (seconds)

Fixed window size

slide-93
SLIDE 93

Application: Feature Design

Time (seconds)

Adaptive window size

slide-94
SLIDE 94

Application: Feature Design

Frequency (pitch)

Fixed window size

Time (seconds)

slide-95
SLIDE 95

Application: Feature Design

Frequency (pitch) Time (seconds)

Adaptive window size

slide-96
SLIDE 96

Application: Feature Design

Denoising by excluding boundary neighborhoods

Time (seconds) Frequency (pitch)

Adaptive window size

slide-97
SLIDE 97

Application: Audio Editing (Digital DJ)

http://www.mixxx.org/

slide-98
SLIDE 98

Application: Beat-Synchronous Light Effects

slide-99
SLIDE 99

Summary

  • 1. Onset Detection
  • Novelty curve (something is changing)
  • Indicates note onset candidates
  • Hard task for non-percussive instruments (strings)
  • 2. Tempo Estimation
  • Fourier tempogram
  • Autocorrelation tempogram
  • Musical knowledge (tempo range, continuity)
  • 3. Beat tracking
  • Find most likely beat positions
  • Exploiting phase information from Fourier tempogram