Now that we've talked in depth about melodies, their representation, encoding, and configuration, we can talk about polyphony. We'll use two models, the Polyphony RNN and Performance RNN, to generate polyphonic music. We'll also look into the encoding of such a musical structure since it is different than monophonic encoding.
Let's start by reminding ourselves that we've used a primer from Beethoven's Fur Elise composition in the last example. We'll now use the polyphonic version of it, which looks like this:
You can see that indeed the primer is polyphonic since multiple notes are being played at the same time. You should know that using a polyphonic primer in a monophonic model will result in an error. You can verify that by calling our generate method from the previous section...