1. Declare constraints
Same seed + same constraints always produce the same piece. Share links encode only the constraints and the seed.
2. The solved piece
Rendered live in your browser with Web Audio. WAV export renders the identical piece offline.
3. The proof
Every rule the solver enforced, with how many candidate answers were rejected along the way. Nothing here is a black box.
What this is (and is not)
Constraint programming is an established research technique for music composition (used in academic systems since the 1990s). ConstraintLab is a transparent browser implementation: the rules, the search, and the rejections are all visible on this page. It runs entirely on your device - no account, no server, no network calls.
Current limits, stated plainly: root-position triads only, four voices, one 16-bar AABA form with the A phrase repeated identically, harmonic minor or major keys. The leading-tone rule applies to the soprano, within each phrase and across the B-to-A seam; parallel fifths/octaves and the upper-voice leap limit are also enforced across the phrase seams. This is a composition toy with a proof, not a replacement for a composer.
Built with AI assistance (design and code), disclosed per hackathon rules.