A music generator called beats.bitwrap.io uses Petri nets, a mathematical model of circles and arrows, to create full tracks with drums, bass, and melodies based on music theory and random numbers. The system is flexible and efficient, allowing for polyrhythms, melodies, and control nets to create complex songs with a single primitive carrying concurrency, state, and scheduling.