css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv
CodePen probably won't work great in this browser. We generally only support the major desktop browsers like Chrome, Firefox, Safari, and Edge. Use this one at your own risk! If you're looking to test things, try looking at Pens/Projects in Debug View.
user profile image

Play and hold a melody or a chord and let a deep neural network complete it for you.

Powered by the Improv RNN model by Google Magenta. https://github.com/tensorflow/magenta/tree/master/magenta/models/improv_rnn

This is an experiment exploring musical human-AI interaction, implemented with Magenta.js, TensorFlow.js, and Tone.js.

See also: Neural Arpeggiator https://codepen.io/teropa/full/ddqEwj/

Comments

  1. Is this actually working? I can play melodies (which is very nicely done), but they don't result in any feedback from the neural network.

  2. Hi Tim, it should be working - it should continually be generating a melodic line for as long as you hold the keys down.

  3. It is nice, I did get one melody around one key pressed and held down, I then stopped pressing the key, but your script then locked up my browser (back button had no effect) and continued to emit one long tone - same note! I had to mute the sound, my browser told me a script was slowing it down, and gave me the option to stop it, and I selected stop it - my browser was free again. You should have some predetermined fade-out of the tone, or length that any tone plays, so that your tone playing stops long before my browser "slow down" message appears.

  4. Thank you sir! It works fine with a single key but doesn't seem to "remember" the melody I'm playing to "compose" upon it. Tempo needs to be below 30 though. I forked it to add your MIDI output (from arpeggiator) to play it on my MIDI instrument ... and record the notes as MIDI.

  5. @teropa this is great, I've enjoyed playing with this pen and ended up making a YouTube video here: https://www.youtube.com/watch?v=Y4yj1mLiIiI

    I tried to give you credit in the video and description so it's clear this is your work.

Leave a Comment Markdown supported. Click @usernames to add to comment.

You must be logged in to comment.
Loading...
Loading...