Source Code | Tickets | Trello | Twitter | Patreon | © Michael DeHaan, 2020

Event Loop

The Event Loop

So now you have a song? Time to hit play. As you would in a Python program, anyway!


It's so easy. Just name the scene you want to start from.

If you want the program to start back over from the very first scene when done, you can do that:

api.player.loop('scene_1', infinite=True)
Finally, if you do NOT want the program to exit on Ctrl+C, you need to do the following.

api.player.loop('scene_1', abort=False)
The system will automatically silence any playing notes when you hit Ctrl+C, regardless of the setting.


If embedding Warp in another sequencer UI or hardware project, you will want some way to know what Warp is doing. You can do this by implementing callbacks. These are shown in this API example.
  If you do not override the callbacks, you'll get some generally helpful print statements, but Warp will otherwise not be telling your program anything.

Next Up 

That's the key stuff. You can write songs now.

If you skipped See Transforms you should go back and read that section, as transforms can be used to build powerful MIDI effects and arpeggiators. Also read about Evaluators and Data Pools to learn some of the remaining power tricks.