Building on the last chapter where we created drum sequences, we can now proceed to create the heart of music—its melody. In this chapter, you'll learn the importance of Long Short-Term Memory (LSTM) networks in generating longer sequences. We'll see how to use a monophonic Magenta model, the Melody RNN—an LSTM network with a loopback and attention configuration. You'll also learn to use two polyphonic models, the Polyphony RNN and Performance RNN, both LSTM networks using a specific encoding, with the latter having support for note velocity and expressive timing.
The following topics will be covered in this chapter:
- LSTM for long-term dependencies
- Generating melodies with the Melody RNN
- Generating polyphony with the Polyphony RNN and Performance RNN