Metadata-Version: 2.4
Name: slackwater-perception
Version: 0.1.0
Summary: Perceive the world as multi-track MIDI. Audio, text, game state — encoded as pitch, tempo, velocity, timbre, inflection, silence, gesture, intention, and attention.
Author-email: Casey DiGennaro <casey@superinstance.com>
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: mido>=1.3.0
Requires-Dist: numpy>=1.24.0
Provides-Extra: audio
Requires-Dist: librosa>=0.10.0; extra == "audio"
Requires-Dist: soundfile>=0.12.0; extra == "audio"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"

# Slackwater Perception

*Perceive the world as multi-track MIDI. A vocalist's look triggers the band. A gesture trades fours. Everything is a flow of inputs and outputs with cascading resonations.*

A Python package that encodes any experience — a podcast, a YouTube video, a game session, a conversation — as multi-track MIDI. Pitch, tempo, velocity, timbre, inflection, silence, gesture, intention, and attention each get their own track. The result is not a recording. It's a **score**.

## What it does

- **MultiTrackEncoder**: separates any input (audio, video, text, game state) into MIDI tracks
- **PitchTracker**: fundamental frequency + harmonics over time
- **TempoDetector**: BPM + micro-timing (swing, push/drag) from any audio
- **VelocityMapper**: intensity/weight mapping (whisper → pianissimo, shout → fortissimo)
- **TimbreColorizer**: spectral color analysis → MIDI timbre events
- **InflectionTracker**: rising/falling/flat pitch movement → melodic direction
- **SilenceDetector**: rests between phrases (the pause before "I love you")
- **IntentionPropagator**: predicts what's about to happen from pre-event cues
- **AttentionTracker**: where focus is directed, moment by moment

## The Band Analogy (which is not an analogy)

A vocalist gives a look to the band. The intention propagates before the note arrives. The drummer opens the hi-hat. The bassist moves to the bridge. The dancer feels something coming. The climax arrives. Every track peaks. The system records this as a convergence event.

This is what this package encodes. Not the notes — the **moment** the notes happened in.

## Related

- [Slackwater Tempo](https://github.com/SuperInstance/slackwater-tempo) — the shared tempo map
- [FLUX Tensor-MIDI](https://github.com/SuperInstance/flux-tensor-midi) — the 4D tensor representation
