Commit graph

97 commits

Author SHA1 Message Date
Michael Winter 8f332fac52 Add batch API endpoints for cents calculation, client fetches cents from server 2026-04-01 16:44:20 +02:00
Michael Winter c6bb3a12ce Move graph computation from server to client 2026-04-01 16:37:45 +02:00
Michael Winter 79e1259f5b Add filepath input for loading any JSON file via API 2026-04-01 16:33:13 +02:00
Michael Winter a93ade34b4 Simplify UI: remove file dropdown, auto-send fundamental on keypress 2026-04-01 13:18:09 +02:00
Michael Winter 94b34b4dc4 Add Shift+click for siren and k/K for kill
- Add /api/play-siren endpoint for Shift+click
- Add /api/kill-siren endpoint for k/K keys
- Add set_chords method to OSCSender for dynamic voice count
- Update soft kill to 20Hz in osc_sender.py
- Refactor CLI to use send_kill method
- Fix kill to send to all voices regardless of count
2026-04-01 13:01:50 +02:00
Michael Winter 6ab162003e Add OSC playback to path navigator webapp
- Add /api/set-fundamental and /api/play-freq endpoints to server.py
- Add send_single method to osc_sender.py for sending single frequencies
- Add fundamental frequency input and click handler to path_navigator.html
- Distinguish between click (play) and drag (move) on nodes
- Add osc_receiver.scd for SuperCollider to receive /freq messages
2026-04-01 11:23:24 +02:00
Michael Winter dff8a4e6c2 Add all-chords continuous canvas with xforce bounds and pan navigation 2026-04-01 09:59:30 +02:00
Michael Winter 2b7c882bc9 Fix column width in chord panel tables 2026-04-01 09:18:39 +02:00
Michael Winter e0bacce10a Apply sleek black theme and table format for chord panels 2026-03-31 19:17:37 +02:00
Michael Winter 00cfac2e5c Add Cytoscape.js with custom xforce layout for chord visualization 2026-03-31 18:44:47 +02:00
Michael Winter 88a9528e12 Add Flask server with Python backend for Path Navigator
- Server calculates graph edges and ratios using src/pitch.py
- Frontend fetches computed graph from API
- Supports loading different output files via dropdown
- All pitch calculations now in Python, JS only for rendering
2026-03-30 22:38:52 +02:00
Michael Winter 2a027ba552 Add prev/current/next graph panels to Path Navigator 2026-03-30 22:17:01 +02:00
Michael Winter 6924c85d19 Add vertical node positioning by frequency in Path Navigator 2026-03-30 22:09:07 +02:00
Michael Winter 27d34fdafc Add Path Navigator webapp for visualizing chord paths 2026-03-30 21:06:14 +02:00
Michael Winter 3e0f2bc906 Add target register oscillations, amplitude, and fix negative target_register 2026-03-30 20:47:20 +02:00
Michael Winter dfdc0497a0 Add independent voice control to OSC sender with improved display 2026-03-28 17:13:51 +01:00
Michael Winter 1dff1022ce Add custom dims support via --dims-custom and update JSON output format 2026-03-28 15:12:14 +01:00
Michael Winter bb7a9ccb21 Add DIMS_3 support and fix dim_diff for prime 11 2026-03-28 13:51:05 +01:00
Michael Winter 7dd7f23611 Fix uniform symdiff to fallback to other symdiff groups when no valid candidates 2026-03-27 10:14:33 +01:00
Michael Winter 863423ca7a Add uniform symdiff selection and store symdiff in graph edges
- Add symdiff to edge tuple in _find_valid_edges() and store in graph
- Add --uniform-symdiff CLI option to make symdiff selection uniform
- Implement uniform selection in pathfinder by grouping edges by symdiff
- With uniform: path uses symdiff 2 and 4 roughly equally
- Without uniform: path uses mostly symdiff 4 (most common)
2026-03-27 10:05:14 +01:00
Michael Winter 74aa937ec2 Add --target-register-power option to curve target register progression 2026-03-26 15:41:41 +01:00
Michael Winter 8ea5c4fe0c Use --fundamental for frequencies output as well as OSC 2026-03-25 10:28:04 +01:00
Michael Winter 44506eed14 Add source_node and destination_node to path_steps.json 2026-03-25 10:23:44 +01:00
Michael Winter c1ff66265d Fix max-path to represent total chord count instead of edge count 2026-03-24 11:57:04 +01:00
Michael Winter 6245ce5e27 Make JSON output more readable - each pitch on one line 2026-03-24 11:04:21 +01:00
Michael Winter 4804c0c244 Add LilyPond transcriber documentation to README 2026-03-23 20:09:03 +01:00
Michael Winter 0f419a15b5 Add dynamic date placeholder to score template 2026-03-23 20:01:51 +01:00
Michael Winter c0ffaac95f Use SemiStaffGroup in generated score 2026-03-23 20:00:21 +01:00
Michael Winter 4ffbcc79d2 Fix score block structure - wrap staves in StaffGroup 2026-03-23 19:55:48 +01:00
Michael Winter 6bf97e5abe Make LilyPond template dynamic - title and staves generated from parameters 2026-03-23 19:54:50 +01:00
Michael Winter 306de8b5c2 Add --transcribe option to CLI for generating LilyPond transcriptions 2026-03-23 19:46:00 +01:00
Michael Winter 9dbde6a63d Fix PDF output location and set default name 2026-03-23 19:23:53 +01:00
Michael Winter a0723e5ae3 Show dimension markup for first chord using refs within same chord
- Add _find_ref_in_same_chord() to find adjacent pitches within the same chord
- Update first chord handling to show refs to other pitches in chord
2026-03-23 19:15:49 +01:00
Michael Winter 658837b83e Fix transcriber to compute ref and dim_diff from chord data
- Add _is_adjacent() to check if pitches differ by ±1 in one dimension
- Add _compute_dim_diff() to compute prime * direction for dimension changes
- Add _find_ref_and_dim_diff() to find the ref voice and dim_diff for changed pitches
- Update output_chords_to_music_data() to compute ref and dim_diff by comparing consecutive chords
- Update format_dim_diff() to include dim_diff == 0 check and fix ref mapping for 4 voices
2026-03-23 19:12:22 +01:00
Michael Winter d0bd15574d Fix asymmetric connectivity in voice leading graph
- Compute both c1→c2 and c2→c1 edges independently using _find_valid_edges()
- Fix _is_directly_tunable to properly reorder c2_transposed using movement map
- Clean up unused valid_pairings code in _build_movement_maps
- Add edge_data field to PathStep for debugging
2026-03-23 18:46:14 +01:00
Michael Winter dd637e64e2 Add LilyPond transcriber module
- Convert chord data to LilyPond parts and PDF
- Generate part files for voices I, II, III
- Generate full score from template
- Call LilyPond to create PDF automatically
- CLI with --name, --fundamental, --template options
2026-03-23 10:00:44 +01:00
Michael Winter 326ae9da1b Add OSC Sender documentation to README 2026-03-20 06:58:00 +01:00
Michael Winter 8326fc1d11 Add interactive OSC sender with preview mode and chord navigation
- Add preview mode (p key) to toggle between send/preview behavior
- Arrow keys for navigation with optional send
- Enter sends current chord (only when not in preview mode)
- Jump to chord by number + Enter
- k/K keys for kill soft (15.0) and kill hard (0.0) commands
- Display prev/current/next chords with frequencies to 2 decimals
- Add OSC test receiver for debugging
- Use arrow key escape sequences for left/right navigation
2026-03-19 15:57:17 +01:00
Michael Winter 4a1e1f7ec2 Simplify quit: use Escape key instead of Ctrl+C
- Rollback to original tty-based input
- Add Escape key to quit
- Remove arrow key detection (use < > keys only)
- Simplify the play() method
2026-03-17 17:41:09 +01:00
Michael Winter d2c88ccc3f Use select with timeout for keyboard input
- Replaces tty-based input with select-based approach
- Adds signal handler for Ctrl+C
- Allows KeyboardInterrupt to propagate correctly
2026-03-17 17:26:23 +01:00
Michael Winter fd4b89670e Fix Ctrl+C handling in OSC playback 2026-03-17 17:19:52 +01:00
Michael Winter ea3acf9efe Replace --osc-enable with --osc-play
- Add --osc-play with optional file argument
- If no file provided, defaults to output/output_chords.json
- Fix python-osc API (addr -> address)
- Keep --fundamental, --osc-ip, --osc-port
2026-03-17 17:10:37 +01:00
Michael Winter 1ccab2088f Add OSC sender for real-time playback
- Create src/osc_sender.py with OSCSender class
- Add CLI args: --osc-enable, --osc-ip, --osc-port, --fundamental
- Load chords from output_chords.json
- Interactive keyboard control (< > keys)
- Display chord number, frequencies, HS arrays
- Support configurable fundamental frequency
2026-03-17 16:47:30 +01:00
Michael Winter e687087e76 Fix fraction representation in output
Fix to_fraction() in src/pitch.py to handle negative exponents
correctly without floating point precision loss.

Before: 2573485501354569/2251799813685248
After:  8/7
2026-03-17 15:30:05 +01:00
Michael Winter e4b6d2cfdc Rename 'target range' to 'target register' throughout
- CLI: --target-range -> --target-register
- CLI: --weight-target-range -> --weight-target-register
- Config keys: target_range -> target_register
- Update README, tests, and all internal references
2026-03-17 14:11:21 +01:00
Michael Winter 24709c3eda Update README with complete CLI docs and rename args
- Rename --voice-crossing to --allow-voice-crossing
- Change --direct-tuning to --disable-direct-tuning (defaults to require)
- Add explicit documentation for every CLI parameter
- Add detailed explanations for each factor
- Add more examples
2026-03-17 09:11:25 +01:00
Michael Winter 146918c596 final weight is now product of factors raised to an exponent rather than sum 2026-03-17 08:41:18 +01:00
Michael Winter 7809fa5a76 Refactor: Move factor methods to Path class, add normalized_scores
- Move all _factor_* methods from pathfinder.py to path.py
- Add get_candidates() and compute_weights() to Path class
- Simplify step() to just commit chosen candidate
- Add normalized_scores field for consistent influence calculation
- Remove duplicate transposition/voice_map logic between get_candidates and step
- dca_voice_movement and target_range now use destination_chord directly
2026-03-16 18:59:13 +01:00
Michael Winter 482f2b0df5 Refactor: Rename sustain/last_visited fields for consistency 2026-03-16 17:35:07 +01:00
Michael Winter 861d012a95 Refactor: Unify Candidate and PathStep, fix DCA Hamiltonian
- Remove Candidate class, use PathStep for both hypothetical and actual steps
- Simplify Path.step() to accept a PathStep
- Fix DCA Hamiltonian to return visit_count directly instead of normalized score
- Tests pass and DCA properly discriminates
2026-03-16 16:53:22 +01:00