1

Automatic mixing

Dissonance suppression during harmonic mixing

 

A journey through the DJ world
by Stefan Hamburger
July 2017
Seminar Topics in Computer Music
Prof. Paolo Bientinesi, RWTH Aachen

2.1

What is automatic mixing?

 

Generating a continuous stream of music with smooth transitions

 

Track ATrack B

3.1

DJs in a club

3.2

History of DJing

 

Francis Grasso: beatmatching

 


Technics SL-1200 (1971)

3.3

History of DJing

 

1986: Harmonic Keys magazine (Stuart Soroka)

3.4

History of DJing

 

Camelot Sound (Mark Davis)


EasyMix wheel

3.5

History of DJing

  • 1999: first DJ software
  • 2006: harmonic mixing software


Mixxx software

10.1

What is harmony?

 

Universal to all humans,

but varies based on personal experience

10.2

Music theory

 

Consonant intervals:
octave, perfect fifth, major third
Dissonant intervals:
semitone, tritone

Circle of Fifths (Quintenzirkel)

10.5

Psychoacoustics

 


Roughness

10.4

Critical bandwidth

 

$$CBW(f) = 25 + 75 \cdot (1 + 1.4 \cdot (\frac{f}{1000})^2)^{0.69}$$

 

Zwicker (1961), Zwicker and Terhardt (1980)

10.6

Roughness

 

Given: $$f_1, f_2$$

$$\color{lime}{y} = \frac{\left|f_2 - f_1\right|}{CBW(\frac{f_1 + f_2}{2})}$$

$$Roughness(f_1, f_2) = max(\underbrace{(e^1 \cdot \frac{\color{lime}{y}}{0.25} \cdot e^{-\frac{\color{lime}{y}}{0.25}})^2}_{\color{gray}{= 16 y^2 \cdot e^{2-8y}}}, 0) \in [0, 1]$$

9.3

Harmonic series
(Naturtonreihe)

 

Fundamental frequency $$f$$

 

$$f, 2f, 3f, 4f, 5f, \ldots$$

9.2

Octave equivalence

 

$$\ldots \overset{\wedge}{=} A_4 \overset{\wedge}{=} A_5 \overset{\wedge}{=} A_6 \overset{\wedge}{=} \ldots$$

$$\ldots \overset{\wedge}{=} 440 Hz \overset{\wedge}{=} 880 Hz \overset{\wedge}{=} 1760 Hz \overset{\wedge}{=} \ldots$$

9.4

Tones and semitones

 

$$f + 2f + 3f + 4f + 5f + \ldots$$

 

$$f + \ldots + 1.25f + \ldots + 1.5f + \ldots + 1.75f + \ldots + 2f$$

 

12 semitones: A, A#, B, C, C#, D, D#, E, F, F#, G, G#

9.5

Tuning

 

Equal temperament (12-TET)
$$f_i = 440\ Hz \cdot 2^{\frac{i}{12}}, i \in \mathbb{Z}$$

 

Tone $$A_4$$$${A\sharp}_4$$$$B_4$$$$C_4$$$${C\sharp}_4$$ $$D_4$$$${D\sharp}_4$$$$E_4$$$$F_4$$$${F\sharp}_4$$ $$G_4$$$${G\sharp}_4$$$$A_5$$
Hertz 440
= 440
466.16493.88523.25 554.37
≈ 550
587.33622.25 659.26
≈ 660
698.46739.99783.99830.61 880
= 880
10.7

Roughness

 

Given two complex tones
$$\color{orange}{T_1 = \{(a_1, f_1), (a_2, f_2), (a_3, f_3), \dots \}},$$
$$\color{lime}{T_2 = \{(a_4, f_4), (a_5, f_5), (a_6, f_6), \dots \}}$$

 

$$Roughness(T_1, T_2) = \frac{\sum\limits_{\color{orange}{(a_i, f_i) \in T_1}} \sum\limits_{\color{lime}{(a_j, f_j) \in T_2}} \color{orange}{a_i} \cdot \color{lime}{a_j} \cdot Roughness(\color{orange}{f_i}, \color{lime}{f_j})}{\sum\limits_{\color{orange}{(a_i, f_i) \in T_1}} \sum\limits_{\color{lime}{(a_j, f_j) \in T_2}} \color{orange}{a_i} \cdot \color{lime}{a_j}} \color{gray}{\in [0, 1]}$$

11.1

Previous approaches

11.2

Key estimation

 

11.3

Chroma based

 

11.4

Roughness based

 

12.1

“Techniques for
automatic dissonance suppression
in harmonic mixing”

Master thesis by Vittorio Maffei (2014-2015)
12.2
12.3

Preprocessing

 

Tracks converted to mono, 44,100 Hz

Tempo changed to 120 bpm

8 second samples = 16 beats

12.4

Short time Fourier transform (STFT)

 

Blackman window

4096 window size, 256 hop size

4096 bins, 5000 Hz max frequency

→ 20 strongest partials extracted

12.5

Residual extraction

Split signal into sinusoids and residuals

12.6

Temporal averaging

Averaged to 16th notes

1379 windows → 64 windows

12.7

Optimal pitch-shift

12.8

Dissonance suppression

12.9

Partials suppression

13

Results

 

  • Improvements to disharmonic mixes
  • No changes to already harmonic mixes

 


14.1

Criticism

 

  • Only tested on 8 second fragments
  • Only tested by musically trained listeners
  • No audio samples provided
  • Used existing libraries, did not build a new tool
  • Many typos
14.2

Future work?

 

  • Machine learning
  • Volume/loudness adjustment
15

Obligatory Sources

16

Takeaways

 

  • Roughness measure
    (¼ of CBW = most dissonant)
  • Harmonic series
    ($f, 2f, 3f, \ldots$)

 

5 minutes of harmonic mixing (demo for Mixed in Key):