Computational Creativity: Making Music with AI Technologies

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Co- location Mass Market Managed Hosting ISV Hosting.
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Multitenant Model Request/Response General Model.
Introduction to Big Data and Hadoop Name Title Microsoft Corporation.
Announcing Demo Announcing.
Session 1.
Windows Azure Web Sites Speaker Title Organization.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Windows Azure Connect Name Title Microsoft Corporation.
NEXT: Overview – Sharing skills & code.
A Windows Azure application runs multiple instances of each role A Windows Azure application behaves correctly when.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Operating System for the Cloud Runs applications in the cloud Provides Storage Application Management Windows Azure ideal for applications needing:
Feature: Suggested Item Enhancements – Sales Script and Additional Information © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows.
Building Social Games for Windows 8 with Windows Azure Name Title Microsoft Corporation.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
SQL Server SQL Azure Visual Studio“Quadrant” SQL Server Modeling Services Entity Framework ADO.NET“M”/EDM Data Services …
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Windows Azure SQL Data Sync Name Title Microsoft Corporation.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

Azure Machine Learning Deploying and Managing Models in production
AI development using Data Science Virtual Machines (DSVM) in Azure
S4 Solution Specialist Sales Summit
Возможности Excel 2010, о которых следует знать
Subtraction – Place Value and Negative Numbers
Title of Presentation 11/22/2018 3:34 PM
Title of Presentation 12/2/2018 3:48 PM
1/3/2019 1:21 PM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Using the Microsoft AI Platform for next generation applications
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
4/27/17, Bell #8 What amount of net pay has been earned this period?
SharePoint 2013 Authentication with Azure – Part 1
Windows 8 Security Internals
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
From Start to REST in 60 Minutes (DEV323)
WINDOWS AZURE A LAP AROUND PLATFORM THE Steve Marx
PENSACOLA ENERGY WORK PLAN OCTOBER 10, 2016
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
SharePoint 2013 Authentication with Azure – Part 2
Title of Presentation 5/24/2019 1:26 PM
5/24/2019 6:44 PM 1/8/18 Bell #10 In a world governed by the gods, is there any room for human will? Do human choices make a difference? EXPLAIN © 2007.
Using Smart Unit Tests to find bugs earlier in the development cycle
日本初公開!? Vista の新機能を実演 とっちゃん わんくま同盟 7/23/2019 9:09 AM
Title of Presentation 7/24/2019 8:53 PM
Build /27/2019 © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION.
WCL425 App Compat for Nerds Chris Jackson.
Presentation transcript:

Computational Creativity: Making Music with AI Technologies Erika Menezes, Serina Kaye Cloud AI, Microsoft

Machine Learning, Analytics, & Data Science Conference 11/9/2018 2:47 PM Session Objectives Computational creativity - Introduction Data science process Pre-processing  Model architecture Experimentation Setup Tools + Framework © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Computational Creativity Machine Learning, Analytics, & Data Science Conference Computational Creativity 11/9/2018 2:47 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Why ? $

History of Music Generation 1700s: Dice Musikalisches Würfelspiel (1757) 1900s: Markov chains Analogique (1958) Emmy (Experiments in Musical Intelligence) (1980) 2000s: RNNs Magenta (2016) Startups​ Uberchord, HumOn, Skoog (Music Education)​ Popgun, Amper, AIVA, Jukedeck: (Commercial AI Music)​ Source: https://medium.com/artists-and-machine-intelligence/neural-nets-for-generating-music-f46dffac21c0

Machine Learning, Analytics, & Data Science Conference What ? 11/9/2018 2:47 PM Melody – Single instrument (monophonic , polyphonic) Polyphony – Multiple instruments Accompaniment AI Duet Audio style transfer © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Important Factors Input Representation Model Architecture Dataset

System Overview MIDI Piano roll Seq2Seq

Music Formats Music Formats Source: http://qihqi.github.io/machine/learning/music-generation-using-rnn/

Music Theory 101 Beat: basic unit of time (a.k.a quarter note) Note: pitch or frequency of note played, e.g. :60 = C5 = 261.625 Hz Tempo: beats per minute (BPM) = quarter notes per minute (QPM) microseconds per quarter note (MPQN)

MIDI (Musical Instrument Digital Interface) midi.Pattern(format=0, resolution=480, tracks=\ [midi.Track(\  [midi.SetTempoEvent(tick=0, data=[7, 161, 32]),   midi.NoteOnEvent(tick=0, channel=0, data=[60, 127]),   midi.NoteOnEvent(tick=0, channel=0, data=[64, 127]),   midi.NoteOnEvent(tick=0, channel=0, data=[67, 127]),   midi.NoteOffEvent(tick=100, channel=0, data=[60, 90]),   midi.NoteOffEvent(tick=0, channel=0, data=[64, 90]),   midi.NoteOffEvent(tick=0, channel=0, data=[67, 90]),   midi.EndOfTrackEvent(tick=1, data=[])])])

Piano Roll

MIDI (Musical Instrument Digital Interface) midi.Pattern(format=0, resolution=480, tracks=\ #Resolution = 480 TPB [midi.Track(\  [midi.SetTempoEvent(tick=0, data=[7, 161, 32]), #Tempo = 120 BPM = 2 BPS   midi.NoteOnEvent(tick=0, channel=0, data=[60, 127]),   midi.NoteOnEvent(tick=0, channel=0, data=[64, 127]),   midi.NoteOnEvent(tick=0, channel=0, data=[67, 127]),   midi.NoteOffEvent(tick=100, channel=0, data=[60, 90]),   midi.NoteOffEvent(tick=0, channel=0, data=[64, 90]),   midi.NoteOffEvent(tick=0, channel=0, data=[67, 90]),   midi.EndOfTrackEvent(tick=1, data=[])])]) Total ticks = 101 Time per time slice = 0.02s Ticks per second = Resolution * Tempo = 480 * 2 = 960 Ticks per time slice = 960 * 0.02 = 19.2 Piano roll width = ceil (Total ticks / Ticks per time slice) = 6

MIDI (Musical Instrument Digital Interface) midi.Pattern(format=0, resolution=480, tracks=\ [midi.Track(\  [midi.SetTempoEvent(tick=0, data=[7, 161, 32]),   midi.NoteOnEvent(tick=0, channel=0, data=[60, 127]), #Index = 0/19.2 => 0   midi.NoteOnEvent(tick=0, channel=0, data=[64, 127]), #Index = 0/19.2 => 0   midi.NoteOnEvent(tick=0, channel=0, data=[67, 127]), #Index = 0/19.2 => 0   midi.NoteOffEvent(tick=100, channel=0, data=[60, 90]), #Index = 100/19.2 => 5   midi.NoteOffEvent(tick=0, channel=0, data=[64, 90]), #Index = 100/19.2 => 5   midi.NoteOffEvent(tick=0, channel=0, data=[67, 90]), #Index = 100/19.2 => 5   midi.EndOfTrackEvent(tick=1, data=[])])]) Note 1 2 3 4 5 60 (C5) 62 (D5) 64 (E5) 65 (F5) 67 (G5)

Input Representation Source: http://yoavz.com/music_rnn/

Datasets Name #songs Format License Scale-chords 156 MIDI Scale Chords License Piano-midi.de (Classical) 124 cc-by-sa Germany License Nottingham (Folk) 1000 MIDI/ABC GNU GPL v3 Yamaha e-Piano 1400 Free MusicNet 330 WAV Creative Commons

System Overview System Overview MIDI Piano roll Seq2Seq

Model Architecture LSTM: Sequence to Sequence: Specialized RNN 1 … 1 … … 1 … … 1 LSTM: Specialized RNN Retains memory for longer sequences Sequence to Sequence: Encoder Decoder Different input and output lengths Encoder Decoder 1 … 1 … … 1 … 1 …

Machine Learning, Analytics, & Data Science Conference Experimental Setup 11/9/2018 2:47 PM Piano roll (156, note_len, T) MIDI (156) Input data (N, note_len, X_SEQ_LEN) Target data (N, note_len, Y_SEQ_LEN) © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Machine Learning, Analytics, & Data Science Conference Training 11/9/2018 2:47 PM Feed X_SEQ_LEN time steps of a piano roll Predict Y_SEQ_LEN time steps following the X_SEQ_LEN time steps of a piano roll Update the model weights using Adam optimizer Repeat the process by sliding the time window X_SEQ_LEN time steps The loss function (binary cross entropy) is defined as the negative log-likelihood of the model given the observed data. © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Machine Learning, Analytics, & Data Science Conference Generation 11/9/2018 2:47 PM Feed X_SEQ_LEN time steps of a piano roll Predict Y_SEQ_LEN time steps following the X_SEQ_LEN time steps of a piano roll Select the notes to be played using a threshold on output probabilities Repeat the process by sliding the time window X_SEQ_LEN time steps © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Machine Learning, Analytics, & Data Science Conference 11/9/2018 2:47 PM Demo Erika Menezes © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Azure Machine Learning Goals trends Solutions Accelerating adoption of AI by industry and developers Rise of hybrid training and scoring scenarios, especially those that push scoring/inference to the edge Deep commitment to open-source tools and frameworks Model management capabilities Docker-based portability Compute, framework and IDE agnosticism © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Experiment Everywhere 11/9/2018 2:47 PM Experiment Everywhere AZURE ML EXPERIMENTATION Local machine Command line tools IDEs Notebooks VS Code Tools for AI Scale up to DSVM Scale out with Spark on HDInsight Azure service Azure Batch AI Notebooks IDEs VS Code Tools for AI Azure Databricks © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Model Management & Deployment 11/9/2018 2:47 PM Model Management & Deployment Single node deployment (cloud/on-prem) Azure Container Instance Azure Machine Learning DOCKER Azure Managed Kubernetes Service Azure service Azure IoT Edge CLI VS Code Tools for AI Microsoft ML Server Spark clusters © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Machine Learning, Analytics, & Data Science Conference 11/9/2018 2:47 PM Music Generation on Azure Docker Hub my_remote_vm.compute Base Docker Image my_remote_vm.runconfig Azure ML Execution Service Remote VM Docker Image Definition Docker Engine Execute Script SSH Erika’s program Azure ML Run History Service train.py Runs Metrics Artifacts Status Run results and artifacts © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Machine Learning, Analytics, & Data Science Conference 11/9/2018 2:47 PM Challenges Generated music cannot infringe on copyrights Good music is subjective Hard to design a good loss function © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Next Steps Get a free Azure account: https://azure.microsoft.com/en-us/free Get Azure Machine Learning: https://portal.azure.com Code is available at: https://github.com/Azure/MachineLearning-MusicGeneration Blog: https://aka.ms/Xsr88w 

Machine Learning, Analytics, & Data Science Conference 11/9/2018 2:47 PM Questions? © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Machine Learning, Analytics, & Data Science Conference 11/9/2018 2:47 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.