Add OSC Sender documentation to README

This commit is contained in:
Michael Winter 2026-03-20 06:58:00 +01:00
parent 8326fc1d11
commit 326ae9da1b

View file

@ -128,3 +128,51 @@ Generated files go to `output/`:
- `output_chords.txt` - Human-readable chords
- `output_frequencies.txt` - Frequencies in Hz
- `graph_path.json` - Hashes of graph nodes visited (for DCA Hamiltonian analysis)
## OSC Sender
The OSC sender allows real-time playback of generated chords via OSC messages.
### Usage
```bash
# Direct usage
python src/osc_sender.py
# Via compact_sets.py (playback only)
python compact_sets.py --osc-play
# Generate and then playback
python compact_sets.py --osc-play --osc-ip 192.168.4.200 --osc-port 54001
```
### Options
--osc-play FILE Enable OSC playback (default: output/output_chords.json)
--osc-ip IP Destination IP address (default: 192.168.4.200)
--osc-port PORT Destination port (default: 54001)
--fundamental FREQ Fundamental frequency in Hz (default: 100 Hz)
### Interactive Controls
| Key | Action |
|-----|--------|
| `←` / `→` | Navigate backward/forward |
| `p` | Toggle preview mode |
| `Enter` | Send current chord (when not in preview mode) |
| `[n]` + `Enter` | Jump to chord n |
| `k` | Kill soft (15.0 Hz to all voices) |
| `K` | Kill hard (0.0 Hz to all voices) |
| `Escape` | Quit |
### Preview Mode
Preview mode ([PREVIEW]) disables sending; toggle with `p` to enable ([SEND]).
### OSC Protocol
Messages sent to `/freq` with: voice number (int), frequency (float).
### Test Receiver
For debugging, run `python src/test_receiver.py` in a separate terminal.