Now that we can send generated MIDI to a DAW, let's have a look at how to loop the generated MIDI. This opens up many different use cases, such as building a system that generates music continuously. We'll first have a look at how to loop NoteSequence. We'll also cover how to synchronize Magenta with a DAW using a MIDI clock, which is important in long-running live music systems.
Looping the generated MIDI
Using the MIDI player to loop a sequence
In this example, we'll be using the player instance from Magenta to loop a generated NoteSequence, by copying the sequence and playing it at a later time, before the player ends its playback.
You can follow this example in the chapter_09_example_03.py file in the...