Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

Evolving your own music for fun and no profit

Vik Paruchuri

DataQuest (www.dataquest.io)

vik.paruchuri@gmail.com

What's evolving music?

Why?

Listen in

Midi format

[midi.ProgramChangeEvent(tick=0, channel=0, data=[0]),
midi.NoteOffEvent(tick=20, channel=9, data=[42, 64]),
midi.NoteOnEvent(tick=28, channel=9, data=[38, 90]),
midi.NoteOnEvent(tick=0, channel=9, data=[42, 90]),
midi.NoteOffEvent(tick=20, channel=9, data=[38, 64]),
midi.NoteOffEvent(tick=0, channel=9, data=[42, 64]),
midi.NoteOnEvent(tick=28, channel=9, data=[42, 70]),
midi.NoteOffEvent(tick=20, channel=9, data=[35, 64]),
midi.NoteOffEvent(tick=0, channel=9, data=[42, 64]),
midi.NoteOnEvent(tick=28, channel=9, data=[42, 58]),
midi.EndOfTrackEvent(tick=0, data=[])]

MIDI stored as byte code

midi

Python-midi to the rescue!

Step 1: ACQUIRE MUSIC

Step 2: Render tracks

Step 45: Markov chain everything!

Markov chain

Construct chains

Note "phrases"

Making a track

Making a song

Evaluating song

Look at the audio

audio

Read audio in

$$\begin{bmatrix} 2.35185598e-05 & -1.04448336e-05\\ -3.46823663e-06 & -3.73403673e-05\\ -2.69492170e-06 & -1.44758296e-05\\ 9.47549870e-06 & 2.09419904e-05\\ -2.70856035e-05 & 3.44590421e-06\\ -3.01332675e-05 & 2.74870854e-05\\ -1.44664727e-06 & 7.49632018e-05\\ -3.80197125e-05 & 2.56412422e-05\\ -5.61815832e-05 & -1.29676855e-05\\ -4.73532873e-06 & 3.69851950e-05 \end{bmatrix}$$

Feature calculation

Scoring songs

Semi-genetic algorithm

Generations

Ways to make it better

Open source