EDIT
Make little MIDI loops in the browser. This is part 2.
Part 1 (2015–2018) was a Python CLI that generated loopable MIDI files with the Molecular Music Box: place a note, jump forward by one of two intervals, and flip to the other interval every time you land on a beat you've already used — the rhythm falls out of the collisions instead of being typed in.
The old code is preserved, documented, and affectionately roasted — including a
--first_note flag that never once ran across all 30,420 files it generated,
and a function that reinvented [0]*n in six lines.