Do Androids Dream of Electronic Dance Music?

Do Androids Dream of Electronic Dance Music?

Slides for my RubyKaigi 2017 talk on machine learning + music, co-presented with the inimitable Julian Cheal!

Facce030b679bda34eb7c64885a741fc?s=128

Eric Weinstein

September 18, 2017
Tweet

Transcript

  1. Do Androids Dream of Electronic Dance Music? Julian Cheal and

    Eric Weinstein # Ruby Kaigi 2017 # Hiroshima, Japan # 18 September 2017
  2. Do Androids What now?

  3. Part 0: Hello! こんにちは!

  4. Who Are We?

  5. Julian Cheal Rubyist RedHat

  6. Bath

  7. None
  8. None
  9. About Eric eric_weinstein = { # エリック employer: 'Fox Networks

    Group', github: 'ericqweinstein', twitter: 'ericqweinstein', website: 'ericweinste.in' } 30% off with KAIGI30!
  10. Agenda • Introduction to machine learning • Neural networks, RNNs,

    and LSTM RNNs • Midi • Demo! Synths!? • Questions?
  11. Part 1: Machine Learning

  12. bit.ly/EricsMLTalk

  13. What Is It? • Machine learning is generalization • Supervised

    learning is generalizing from
 labeled data to unlabeled data
  14. Supervised Learning • Classification or regression • Learning patterns from

    labeled data, then generalizing to unlabeled data
  15. Part 2: Neural Networks

  16. • An artificial neural network is a machine learning model

    that mimics the structure and function of a biological brain • In our case, we’re interested in a particular kind of recurrent neural network:
 LSTM (long/short-term memory) network What Is It?
  17. Image credit: https://github.com/cdipaolo/goml/tree/master/perceptron

  18. Image credit: https://en.wikipedia.org/wiki/Artificial_neural_network

  19. Image credit: https://leonardoaraujosantos.gitbooks.io/artificial- inteligence/content/recurrent_neural_networks.html

  20. Part 3: Midi

  21. bit.ly/JuliansMusicTalk

  22. What is Midi? Dave Smith “Father of Midi” Midi invented

    in 1983
  23. Midi Note Data

  24. Midi Note Data

  25. Find some Data

  26. deadmau5 - Chimaera https://splice.com/sounds/ splice/deadmau5-chimaera

  27. Convert the Data Midi TFRecord

  28. Convert the Data

  29. Moar Data

  30. Bring your Own Data

  31. None
  32. Show me the Code

  33. Part 4: Dance Party

  34. Overview • The technology (Python, Ruby, Tensorflow, Magenta) • The

    architecture of our neural network • How did training go? • Demo time/dance party!
  35. We need More Ruby! • Python 93.4% • Ruby 4.8%

    • Shell 1.8% WTF! This is Ruby Kaigi
  36. None
  37. Summary • Machine learning is generalization • Neural networks are

    machine learning models based on biological brains • RNNs are a kind of NN with “loop”; feedback allows modeling for text prediction, music generation, and more • We can do this all with Ruby, we just need the library support!
  38. 3.times { puts 'ありがとう!' }

  39. Questions? @ericqweinstein @juliancheal