compact_sets/README.md
Michael Winter 61149597c9 Add target range weight for rising register
- Add --target-range CLI option (in octaves)
- Implement target_range weight in PathFinder
- Add test for target range weight
- Add --max-path to README
2026-03-13 22:04:48 +01:00

1.4 KiB

Compact Sets

A rational theory of harmony based on Michael Winter's theory of conjunct connected sets in harmonic space, combining ideas from Tom Johnson, James Tenney, and Larry Polansky.

Installation

# Activate virtual environment
source venv/bin/activate

# Run
python compact_sets.py --dims 4 --chord-size 3

CLI Options

  • --dims 4|5|7|8 - Number of prime dimensions (default: 7)
  • --chord-size 3|4 - Size of chords (default: 3)
  • --max-path - Maximum path length (default: 50)
  • --symdiff-min, --symdiff-max - Symmetric difference range (default: 2-2)
  • --melodic-min, --melodic-max - Voice movement thresholds in cents
  • --dca - DCA multiplier (default: 2.0)
  • --target-range - Target range in octaves for rising register (default: disabled)
  • --seed - Random seed (default: random)
  • --cache-dir - Graph cache directory (default: ./cache)
  • --output-dir - Output directory (default: output)
  • --rebuild-cache - Force rebuild graph
  • --no-cache - Disable caching

Legacy

The legacy/ folder contains earlier versions of this code, used to create the musical works published at unboundedpress.org/works/compact_sets_1_3.

Output

Generated files go to output/:

  • output_chords.json - Chord data
  • output_chords.txt - Human-readable chords
  • output_frequencies.txt - Frequencies in Hz