# presets module ## Owned files - FactoryPresets.h - FactoryPresets.cpp ## Rules - Build presets as sparse maps; unset parameters keep their APVTS defaults. - Use `ids::` for every parameter ID, never raw strings. - Use named helpers (coarse, unison, slope, fx, lfoShape, mod) to build normalized values. - Return the preset list as `const std::vector&` from a static local. - Reference `ModConnection` and macro assignment structs instead of ad hoc tuples. ## IF-THEN - IF a preset omits a parameter THEN leave it at its default; do not write an explicit zero. - IF a preset sets a physical value THEN encode it through the same `maps::` helpers the DSP uses. ## Examples ```cpp // BAD: raw string ID and an opaque normalized number pr.params = { { "oscAUnison", 0.4f } }; ``` ```cpp // GOOD: ids:: and a named helper pr.params = { p (ids::oscAUnison, unison (7)) }; ``` This file overrides /AGENT.md where they conflict.