Music Generation Using Machine Learning Seminar Computer Music SS - - PowerPoint PPT Presentation

music generation using machine learning
SMART_READER_LITE
LIVE PREVIEW

Music Generation Using Machine Learning Seminar Computer Music SS - - PowerPoint PPT Presentation

Music Generation Using Machine Learning Seminar Computer Music SS 2017 Michael Krause RWTH Aachen June 27, 2017 The problem Can a computer create new music? Applications: assisted composition, video games, music analysis Two broad


slide-1
SLIDE 1

Music Generation Using Machine Learning

Seminar Computer Music SS 2017 Michael Krause

RWTH Aachen

June 27, 2017

slide-2
SLIDE 2

The problem

Can a computer create new music?

◮ Applications: assisted composition, video games, music analysis ◮ Two broad steps: Composing and creating audio signal ◮ Composing: melody, rhythm, structure, instrumentation...

2 / 25

slide-3
SLIDE 3

Outline of the talk

History Current approaches Unit selection using deep learning Evolutionary multi-objective optimization Conclusion

3 / 25

slide-4
SLIDE 4

History

4 / 25

slide-5
SLIDE 5

History: AI research and music generation

◮ General trend in AI: move from symbolic methods (GOFAI) to

machine learning / data-based approaches

◮ Formal grammar approach

◮ Create structure through (stochastic) rewriting rules ◮ Hand-made or learned from data ◮ Terminal symbols can be notes/chords/measures...

◮ Markov Chains

◮ States: notes or measures ◮ Transitions: probabilities learned from examples or hand-made ◮ No higher level structure

◮ More recently: Machine Learning (e.g. neural networks)

5 / 25

slide-6
SLIDE 6

Current approaches

6 / 25

slide-7
SLIDE 7

Now: Two approaches for melody generation

◮ Melody: essential for most music ◮ Competing approaches:

◮ Bretan et al. (2016): uses deep learning ◮ de Le´

  • n et al. (2016): evolutionary algorithm with

machine learning based fitness functions

7 / 25

slide-8
SLIDE 8

Current approaches: Unit selection using deep learning

8 / 25

slide-9
SLIDE 9

Setup

◮ Given: > 4000 melodies (in particular Jazz) ◮ Divide into units (1, 2 or 4 measures of melody) ◮ Create new melodies by concatenating units ◮ Connected units should

◮ share semantic similarity ◮ have pleasant transitions

→ Train two neural nets to encode these properties

9 / 25

slide-10
SLIDE 10

Neural nets: Basic example

Output Input Hidden layer

10 / 25

slide-11
SLIDE 11

Neural net for semantic similarity

Input unit (high dim) Representation (lower dim) Hidden layer Hidden layer Semantic vector

Idea: train semantic vectors for consecutive units to be similar

11 / 25

slide-12
SLIDE 12

Neural net for note transitions

Note Next Note Layers Cell state

12 / 25

slide-13
SLIDE 13

Melody generation: Ranking and concatenation

◮ Start with some measures of music given ◮ Rank all units given the previous measures

◮ Firstly: according to similarity ◮ Secondly: according to note transitions

◮ Concatenate measures with highest ranked unit and repeat

(listen to audio example) 13 / 25

slide-14
SLIDE 14

Current approaches: Evolutionary multi-objective optimization

14 / 25

slide-15
SLIDE 15

Evolutionary optimization overview

◮ Optimization problem in general: candidate solutions and

  • bjective function

◮ Here: candidates set is “population”, objective is high “fitness” ◮ The phenotype (appearance) of a candidate may be different

from its genotype (encoding/representation)

◮ Initial candidates are repeatedly evolved through

◮ Variation: modify candidates through crossover and mutation ◮ Selection: retain only candidates with good objective value 15 / 25

slide-16
SLIDE 16

Evolutionary multi-objective optimization

◮ Challenges for evolutionary approach to music

◮ How to encode genotype? ◮ How to generate candidates? ◮ How to evaluate fitness? User interaction?

◮ In the present paper

◮ Melodies are trees ◮ Initial melodies are generated randomly ◮ Fitness consists of multiple measures, partly learned from

existing melodies of a given style

16 / 25

slide-17
SLIDE 17

Melodies as trees

(Figure 1 from the paper) 17 / 25

slide-18
SLIDE 18

Crossover and mutation

◮ “Fittest” candidates are admitted to crossover and mutation ◮ Mutation: With small probability a node is randomly replaced ◮ Crossover: Nodes swapped between pairs of candidates (figure)

(Figure 2 from the paper) 18 / 25

slide-19
SLIDE 19

Fitness functions

◮ 12 separate ones used ◮ Function parameters based on body of melodies in a style ◮ Examples:

◮ Global descriptors (number of notes, most repeated interval,

average pitch and deviation etc.)

◮ Language model (probability of note after previous 4 notes) ◮ Music analysis (e.g. number of segments in melody)

◮ Candidate A pareto-optimal: for all candidates B with higher

fitness than A in some function, B must have lower fitness than A in another function

19 / 25

slide-20
SLIDE 20

Results (fitness trained for different styles)

(listen to audio example) 20 / 25

slide-21
SLIDE 21

Results (fitness trained for different styles)

(listen to audio example) 21 / 25

slide-22
SLIDE 22

Conclusion

22 / 25

slide-23
SLIDE 23

Conclusion

Take-home concepts:

◮ Move from symbolic to machine learning methods ◮ Unit selection using neural networks ◮ Melody tree as result of evolutionary optimization

Possible further work:

◮ Variety vs. higher level structure ◮ Extend approaches to generate harmonization ◮ Quality measures?

23 / 25

slide-24
SLIDE 24

Papers

Mason Bretan, Gil Weinberg, and Larry Heck. A Unit Selection Methodology for Music Generation Using Deep Neural Networks. arXiv:1612.03789 [cs.SD], 2016. Pedro J. Ponce de Le´

  • n, Jos´

e M. I˜ nesta, Jorge Calvo-Zaragoza, and David Rizo. Data-based melody generation through multi-objective evolutionary computation. Journal of Mathematics and Music, 10(2):173–192, 2016. Jose David Fern´ andez and Francisco Vico. AI Methods in Algorithmic Composition: A Comprehensive Survey. Journal Of Artificial Intelligence Research, 48:513–582, 2013.

24 / 25

slide-25
SLIDE 25

More sources

◮ Example music composed using the DNN approach ◮ Example music composed using the evolutionary approach

I have arranged some of these in MuseScore here, so they can be heard

25 / 25