69 lines
4.8 KiB
Markdown
69 lines
4.8 KiB
Markdown
# MAP — ModuLisp repo inventory
|
|
|
|
```
|
|
modulisp/
|
|
├── meson.build # project root: useq_utils → useq_devtools → useq_signal_engine static libs
|
|
├── library.properties # Arduino library manifest (ModuLisp 0.1.0, includes=src/signal_engine/signal_engine.h)
|
|
├── src/
|
|
│ ├── pch.h # precompiled header (std includes)
|
|
│ ├── modulisp/
|
|
│ │ └── lisp/symbol_intern.h # header-only symbol interning table
|
|
│ ├── signal_engine/ # 12 .cpp + 13 .h + symbols.def
|
|
│ │ ├── token.{h,cpp} # tokenizer
|
|
│ │ ├── cell_store.{h,cpp} # S-expression cell arena
|
|
│ │ ├── node_pool.{h,cpp} # fixed-pool DAG node storage + traversal
|
|
│ │ ├── graph_builder.{h,cpp} # cell graph → node DAG compiler
|
|
│ │ │ # (resolve_hardware_input consults ext_registry first)
|
|
│ │ ├── compiler_pipeline.{h,cpp} # source → tokens → cells → DAG orchestration
|
|
│ │ ├── cold_eval.{h,cpp} + eval_ops.h # constant folding / cold evaluation
|
|
│ │ │ # (top-level sink forms + cold commands dispatch here;
|
|
│ │ │ # vector-packed sink sugar — [base…] :offset [mod…]
|
|
│ │ │ # and [[base mod] …] pairs — expands in do_sink_assign)
|
|
│ │ ├── executor.{h,cpp} # tick-time DAG executor
|
|
│ │ │ # (+ publish_sink_values post-tick publication)
|
|
│ │ ├── ext_registry.{h,cpp} # generic named external-input/sink/command registries
|
|
│ │ │ # (firmware profile seam; no nn/* or midi/* builtins;
|
|
│ │ │ # ExternalSinkDesc.vec_base_ch/vec_mod_ch opt a sink
|
|
│ │ │ # into the §4.3/§4.4 vector sugar)
|
|
│ │ ├── state_registry.{h,cpp} # defstate slots, live-edit slots
|
|
│ │ ├── synth_registry.{h,cpp} # synth graph snapshot registry
|
|
│ │ ├── synth_graph.{h,cpp} # serialisable synth artefact graph
|
|
│ │ ├── diagnostics.{h,cpp} # health/persistent-output diagnostics
|
|
│ │ ├── signal_engine.h # umbrella header
|
|
│ │ ├── types.h, build_profile.h # shared types, build tuning knobs
|
|
│ │ └── symbols.def # builtin symbol catalogue (X-macro list)
|
|
│ ├── utils/ # string.{h,cpp}, common.{h,cpp}, itoa.{h,cpp}, log.{h,cpp},
|
|
│ │ # json_builder.h, json_cursor.h, dtostrf.h, serial_message.h,
|
|
│ │ # time.h, compiler_config.h
|
|
│ ├── devtools/ # devtools.{h,cpp} — USEQ_DEVTOOLS-gated telemetry
|
|
│ └── ports/ # IStorage.h, II2CTransport.h, mocks/{MockStorage.h,MockI2CBus.h}
|
|
└── test/
|
|
├── meson.build # 19 Catch2 executables, fresh file
|
|
├── catch.hpp # vendored Catch2 v2 (from src-useq/test/catch.hpp)
|
|
└── signal_engine/ # 19 test .cpp (host-only subset; exclusions in README.md)
|
|
```
|
|
|
|
External-register seam (NISPS-USEQ spec §3, generic mechanism only):
|
|
`ext_registry.{h,cpp}` holds firmware-profile registrations for named
|
|
external inputs, external sinks, and cold commands. `graph_builder` resolves
|
|
registered input names before the builtin board inputs; `cold_eval` binds
|
|
registered sinks with ordinary top-level assignment (channels publish as pool
|
|
output slots ≥ SINK_SLOT_BASE, so per-sink LKG rides the existing
|
|
GraphMutationTransaction machinery) and dispatches registered commands to the
|
|
installed handler after the submission's earlier forms compiled.
|
|
`executor::publish_sink_values` writes `SignalEngine::sink_values` /
|
|
`sink_dirty` per tick for the firmware to poll.
|
|
|
|
Sink vector-packing sugar (spec §4.3/§4.4, generic mechanism): a descriptor
|
|
with `vec_base_ch`/`vec_mod_ch` set (both > 0, summing to `arity`) lets the
|
|
same sink form be written `[b…]` optionally followed by
|
|
`:offset [m…]`, or as `vec_base_ch` entries that are scalars (modulation 0,
|
|
compiled as a const-0 node) or `[base modulation]` pairs. `:offset` and pair
|
|
entries are mutually exclusive (§4.5); wrong counts, unknown keywords, and
|
|
non-vector `:offset` values are compile errors inside the per-sink
|
|
transaction, so a bad form keeps the sink's previous binding (LKG). The
|
|
three forms bind identical channel graphs — expansion happens in
|
|
`cold_eval::do_sink_assign` before per-channel compilation; plain sinks
|
|
(both fields zero) parse flat expressions only, byte-identical to before.
|
|
|
|
Build artifacts: `build/` (meson/ninja). 3 libs + 19 test executables.
|