Balanced Gray code Iterator; custom solver that finds optimally balanced Gray orders of mixed radix permutations
The BalaGray crawler generates balanced Gray orderings of the 65 prime-form interval sets. The orderings also optimize maximum span length. The author uses these orderings as chord progressions for atonal music. On a Dell P15 laptop, the crawler takes around fifteen minutes to create all the orderings. Each interval set is written to its own text file. When all interval sets have been processed, the program collects the most optimal orderings and saves them in three formats: HTML, CSV, and PLM. The latter format is for the author's Polymeter MIDI Sequencer, which is freely available.
The source code is standard C++ and should compile cleanly in any modern environment.
This software is connected to a research paper. If you use BalaGray in your research, please cite:
Korda, C. (2025). Granular 12-Tone Harmony via Mixed-Radix Balanced Gray Codes:
Interval Set Partitions and the BalaGray Solver.