4bbfdcceff
audio-surface.el / image-surface.el: own-core additive-synthesis WAV and
raster-PNG renderers (integer-only DSP, since EL has no floats), rendered
from learned engram signatures via a pluggable surface-profile
abstraction (surface-profile.el). audio-demo.el / image-demo.el are
drivers. NOTE: demo files hardcode absolute paths to this worktree's own
directory — will need a path fixup before landing.
elp/projector/ is a Python package the author's own README marks as
"STAGING/PROOF-OF-SHAPE — not the deliverable", superseded by the native
.el surface-profile work above; kept as a validated architecture proof.
Generated output (elp/faculty/{out,sig}, elp/projector/out,
__pycache__) intentionally excluded.
92 lines
4.3 KiB
Markdown
92 lines
4.3 KiB
Markdown
> **STATUS: STAGING / PROOF-OF-SHAPE — not the deliverable.** This Python package
|
||
> proved the architecture end-to-end against the proven realizer faculty (faithful
|
||
> md/docx/midi from real geometry: 0 ungrounded claims, SACRED polarity). Per Will's
|
||
> steer, the DELIVERABLE is NATIVE: the seam lives on the existing EL realizer as
|
||
> **surface-as-profile** — see `../src/surface-profile.el` and
|
||
> `../tests/examples/surface-profile-demo.el` (compiles + runs through elc → C →
|
||
> binary). The concepts below (one geometry-carrying frame; surface = a pluggable
|
||
> profile; plan/realize; deterministic-from-meaning) are exactly what the native
|
||
> module implements. Keep this package as the validated proof; build native.
|
||
|
||
# Efferent Multimodal Projector
|
||
|
||
**geometry → any surface, faithfully.** Neuron's own document-generation faculty:
|
||
the efferent twin of the ingest organ. Ingest is afferent (world → geometry);
|
||
this is efferent (geometry → an arbitrary-format document / any modality).
|
||
|
||
Built against the **proven** realizer faculty (neuron-talk sidecar `:8756`,
|
||
artifact `art-7affa557`). The live soul (`:8742` / `:7770`) is contacted **only**
|
||
through the read-only, GET-only `engram_client` — never mutated.
|
||
|
||
## The pipeline (surface-agnostic)
|
||
|
||
```
|
||
geometry region + surface/format spec
|
||
→ PLAN (manifold → document skeleton/DAG; the geometry IS the outline) plan.py
|
||
→ REALIZE (proven realizer, scaled sentence → passage, each section faithful) realize.py
|
||
→ COHERE (document-level flow / transitions, not stitched sentences) cohere.py
|
||
→ EMIT (pluggable SurfaceProjector → the target surface) projectors/
|
||
```
|
||
|
||
**The surface is a PARAMETER.** `pipeline.build_ir(...)` builds ONE
|
||
surface-neutral `DocumentIR` (`document_ir.py`); `pipeline.emit(doc, surface)`
|
||
projects it to whichever surface you name. Markdown, docx, and MIDI are the same
|
||
IR emitted three ways.
|
||
|
||
## The pivot: a geometry-carrying IR
|
||
|
||
`DocumentIR` is **not** a text tree. Every `Block` carries BOTH:
|
||
- `.sentences` — realized faithful text (what **text** projectors read),
|
||
- `.provenance` — the source geometry: `subj_id / relation / obj / polarity /
|
||
confidence / importance / salience / node_id` (what **music / image / video**
|
||
projectors read).
|
||
|
||
That single decision is what makes the projector multimodal: text renders the
|
||
words; music/image decode the geometry. A claim with no provenance cannot exist
|
||
in the IR — faithfulness is structural.
|
||
|
||
## The one shared seam
|
||
|
||
`projectors/base.py` — `SurfaceProjector.project(frame: DocumentIR) -> bytes`
|
||
(+ `surface / media_type / ext / modality / profile`). Register with
|
||
`register()`. Adding a surface changes nothing upstream.
|
||
|
||
`TwoStageProjector` blesses the peer plan/realize decomposition:
|
||
`spec = plan(frame)`, `bytes = realize(spec)`, `project = realize∘plan`; the
|
||
`profile` is the pluggable per-surface knob (text lang-profile, music
|
||
instr/mode-profile). `projectors/midi.py` is the reference two-stage impl.
|
||
|
||
## Surfaces
|
||
|
||
| surface | modality | status | emitter |
|
||
|---|---|---|---|
|
||
| `markdown` | text | landed | own (str) |
|
||
| `docx` | text | landed | own minimal OOXML (stdlib `zipfile`+XML, no lib) |
|
||
| `midi` | audio | landed (symbolic-music proof) | own minimal SMF (stdlib `struct`, no lib) |
|
||
| `audio` (WAV) | audio | peer agent (additive synth) | conforms to `TwoStageProjector` |
|
||
| `image` | image | documented seam | `projectors/seams.py` |
|
||
| `video` | video | documented seam (image×sound×time) | `projectors/seams.py` |
|
||
|
||
Music maps: relation → scale degree (same relation → same pitch), **polarity →
|
||
major/minor third (SACRED negation is audible)**, confidence → duration,
|
||
importance → velocity, section → register. Deterministic projection from meaning
|
||
— nothing invented.
|
||
|
||
## Faithfulness
|
||
|
||
`provenance.py` audits the IR: **zero** ungrounded claims, SACRED polarity
|
||
preserved (negations reported, never dropped), COHERE introduces no new geometry
|
||
(connectives are marked). `trace_table()` emits the geometry → section → claim
|
||
table.
|
||
|
||
## Run
|
||
|
||
```bash
|
||
PY=~/Desktop/lang-realizers/venv/bin/python
|
||
PYTHONPATH=~/Desktop/neuron-talk:~/Desktop/lang-realizers $PY generate.py
|
||
# writes ./out/{neuron-self,engram-temporal}.{md,docx,mid} + *.audit.json + *.provenance.md
|
||
```
|
||
|
||
Requires the proven realizer env (spaCy + the neuron-talk/lang-realizers engine)
|
||
and the read-only engram at `:8742`.
|