Playing generated instruments in a trio

Now that we have MusicVAE generating a three-instrument sequence and GANSynth generating audio, let's make the two work together.

You can find this code in the chapter_08_example_04.html file in the source code of this chapter. There are more comments and content in the source code—you should go and check it out.

Since the code is similar to the last section, we won't be going through all the content, but we'll explain the major differences:

  1. First, let's define the page structure and script imports, like this:
<html lang="en"><body><div>  <button disabled id="button-sample-musicae-trio">    Sample MusicVAE trio  </button>  <button disabled id="button-sample-gansynth-note"> Sample GANSynth note for the lead ...

Get Hands-On Music Generation with Magenta now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.