Reader small image

You're reading from  Hands-On Music Generation with Magenta

Product typeBook
Published inJan 2020
Reading LevelExpert
Publisher
ISBN-139781838824419
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Alexandre DuBreuil
Alexandre DuBreuil
author image
Alexandre DuBreuil

Alexandre DuBreuil is a software engineer and generative music artist. Through collaborations with bands and artists, he has worked on many generative art projects, such as generative video systems for music bands in concerts that create visuals based on the underlying musical structure, a generative drawing software that creates new content based on a previous artist's work, and generative music exhibits in which the generation is based on real-time events and data. Machine learning has a central role in his music generation projects, and Alexandre has been using Magenta since its release for inspiration, music production, and as the cornerstone for making autonomous music generation systems that create endless soundscapes.
Read more about Alexandre DuBreuil

Right arrow

Chapter 8: Magenta in the Browser with Magenta.js

  1. We can train models using TensorFlow.js, but we cannot train models using Magenta.js. We need to train the models in Magenta using Python and import the resulting models in Magenta.js.
  2. The Web Audio API enables audio synthesis in the browser using audio nodes for generation, transformation, and routing. The easiest way to use it is to use an audio framework such as Tone.js.
  3. The method is randomSample and the argument is the pitch of the generated note. As an example, using 60 will result in a single note at MIDI pitch 60, or C4 in letter notation. This is also useful as a reference for pitching the note up or down using Tone.js.

  1. The method is sample and the number of instruments depends on the model that is being used. In our example, we've used the trio model, which generates three instruments. Using a melody model will...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Music Generation with Magenta
Published in: Jan 2020Publisher: ISBN-13: 9781838824419

Author (1)

author image
Alexandre DuBreuil

Alexandre DuBreuil is a software engineer and generative music artist. Through collaborations with bands and artists, he has worked on many generative art projects, such as generative video systems for music bands in concerts that create visuals based on the underlying musical structure, a generative drawing software that creates new content based on a previous artist's work, and generative music exhibits in which the generation is based on real-time events and data. Machine learning has a central role in his music generation projects, and Alexandre has been using Magenta since its release for inspiration, music production, and as the cornerstone for making autonomous music generation systems that create endless soundscapes.
Read more about Alexandre DuBreuil