Week 9: Machine Generated Music

Nov 12, 2018

For the machine generated music assignment, I decided to use LSTM, introduced in class, to train on KPOP boyband songs. For this assigment, I wanted to focus on learning and practicing the flow of creating machine generated music.

When I initially started collecting data for this assignment, I realized that there are not a lot of "clean" midi notations of KPOP music, and the ones that were available for me to download / use on the MuseScore website were heavily based on popularity of certain bands. This is why I decided to use Piano Scribe to generate the midi notes. I ran 100 piano covers of the popular KPOP boyband songs through Piano Scribe. Then, I processed the midi notes in Python using the mido library. The notation that I settled on for each note was in form of

    n90v62t2500
        

where the number after n is the midi note, the number after v is the velocity and the number after t is the start time of the note.

I ran the training model with the following parameters:

    --rnn_size 256 --num_layers 2 --seq_length 64 --batch_size 32 --num_epochs 50
        

Using the trained model, I generated music using different parameters of: length of generation, randomness of seed, total length of generated tokens. After a number of attempts, I realized the model was not "accurate enough" and needed some constraints. I threw away tokens that didn't have all three parameters of midi note, velocity and start time. I also played around with setting constraints for the range of the start time. At first, I tried simple constraint of putting a maximum number for the start time value, then I created an array that would keep track of how many tokens were created for ranges of start times, and limited the maximum number of tokens that could be generated for each time range.

I also then played around with the tempo and the time division when creating the generated tokens back into midi notation.

Below are some of the generations using different parameters:

I then "stylized" the generations by dividing the generations into different C octaves in different channels and playing around with the bar duration fo each of the C-octave channels.

Below track is an experiment I did using different synthesizers.

The conclusion of the experiment of using LSTM model to train on KPOP songs is that 1) KPOP songs are not as "generated" or "automated" as I thought they were OR 2) it is harder than I thought to do an eloquent and accurate ML generation of music.

Complete list of songs used:

  1. R & V - 4 o’clock
  2. BTS - I Need U
  3. Exo - Tempo
  4. BTOB - Friend
  5. iKon - Goodbye Road
  6. BTS - Butterfly
  7. Seventeen - Mansae
  8. Got7 - Lullaby
  9. BTS - Seesaw
  10. BTS - Ephiphany
  11. BTS - Love Myself
  12. BTS - I’m Fine
  13. BTS - Idol
  14. Seventeen - A-teen
  15. Stray kids - My pace
  16. iKon - Killing me
  17. Zico - Soulmate
  18. Seventeen - Our dawn is hotter than day
  19. Seventeen - Oh my!
  20. Nuest - Dejavue
  21. BTOB - Only one for me
  22. Wanna One - Sandglass
  23. Wanna One - Light
  24. BTS - Airplane pt. 2
  25. BTS - Anpanman
  26. BTS - Magic Shop
  27. BTS - Love Maze
  28. BTS - The Truth Untold
  29. BTS - Fake Love
  30. Crush - Bittersweet
  31. Seventeen - Campfire
  32. BTS - Singularity
  33. Pentagon - Shine
  34. JBJ - Call your name
  35. BTS - Don’t leave me
  36. Winner - Everyday
  37. Wanna One - I’ll remember
  38. Wanna One - Boomerang
  39. Big Bang - Flower road
  40. Wanna One - I Promise U
  41. BTS - Save Me
  42. Wanna One - Nothing without you
  43. Seventeen - Run to you
  44. Seventeen - Thanks
  45. iKon - Love Scenario
  46. JBJ - My Flower
  47. Infinite - Tell me
  48. Dean - Instagram
  49. Exo - Universe
  50. BTS - Crystal snow
  51. Pentagon - Like This
  52. Wanna One - Wanna
  53. Wanna One - Beautiful
  54. Seventeen - Without you
  55. Seventeen - Clap
  56. JBJ - Fantasy
  57. Seventeen - Pinwheel
  58. BTOB - Missing you
  59. Nuest - Where you at
  60. Seventeen - Change up
  61. BTS - Best of Me
  62. BTS - DNA
  63. Seventeen - Pretty U
  64. BTS - Serendipity
  65. EXO - Power
  66. EXO - The Eve
  67. BTS - Love Yourself
  68. Big Bang - Last dance
  69. Taeyang - Darling
  70. Wanna One - Burn it up
  71. Wanna One - Wanna be
  72. Wanna One - Energetic
  73. Winner - Love me love me
  74. Nuest - Daybreak
  75. Nuest - If you
  76. Nuest - Hello
  77. Nuest - Love paint
  78. Exo - Ko ko bop
  79. Exo - Monster
  80. G-Dragon - Untitled
  81. Seventeen - Don’t wanna cry
  82. BTS - Young forever
  83. Winner - Fool
  84. Zico - She’s a baby
  85. Winner - Really really
  86. BTS - Awake
  87. BTS - Lost
  88. Highlight - Plz don’t be sad
  89. Henry - Girlfriend
  90. Got7 - Never ever
  91. BTS - Run
  92. BTOB - Someday
  93. BTS - Stigma
  94. BTS - Wings
  95. BTS - First Love
  96. BTS - Lie
  97. BTS - Spring day
  98. Block B - Yesterday
  99. BTS - Butterfly
  100. BTS - Blood, Sweat, Tears
BACK TO MAIN