chore: land janitor round 1 and graft integration
Round 1 findings and fixes, all previously uncommitted: - FXProcessor per-slot DSP history repair (HEAD does not compile without it) - SynthVoice::getModulationValue, editor control-lock guard - ExactCompare.h naming the deliberate exact float comparisons - KnobLookAndFeel replacing the never-installed SerumLookAndFeel - 55 first-party compiler warnings to 0 - AGENT.md renamed to AGENTS.md across Source/ - graft repository context graph and its hooks - JANITOR_TASKS.md and UI_UX_AUDIT.md records
This commit is contained in:
1 parent
5c942cad0c
commit
e4cea300db
63 files changed
+2360
-805
No files matched your search
@@ -0,0 +1,44 @@
|
||||
# plugin module
|
||||
|
||||
## Related source files
|
||||
|
||||
This directory contains guidance; the implementation remains in
|
||||
`../PluginProcessor.h` and `../PluginProcessor.cpp`.
|
||||
|
||||
## Rules
|
||||
|
||||
- Keep this the JUCE `AudioProcessor` boundary: APVTS, engine, RAVE, presets and state.
|
||||
- Declare the full parameter layout in `createParameterLayout()`.
|
||||
- Use `juce::ScopedNoDenormals` in `processBlock`.
|
||||
- Guard `getRawParameterValue` and `getParameter` results before dereferencing them.
|
||||
- Return silently on null or invalid state XML and invalid ValueTrees.
|
||||
- Use raw `new` only for JUCE-owned objects (`createEditor`, `createPluginFilter`).
|
||||
- Hold the engine control lock across preset and state changes; preserve parameter IDs and normalized values for saved-project compatibility.
|
||||
- Factory presets reset sound parameters before applying overrides, while preserving UI scale.
|
||||
- Save one copy of each custom state section. LFO shape arrays are stored as JSON text inside XML.
|
||||
- RAVE is an ordinary parameter that enables a render-time boost; it does not rewrite other parameters.
|
||||
|
||||
## IF-THEN
|
||||
|
||||
- IF state XML is null or invalid THEN return without touching the APVTS.
|
||||
- IF a parameter is missing from a preset load THEN skip it with an `if (auto* param = ...)` guard.
|
||||
|
||||
## Examples
|
||||
|
||||
```cpp
|
||||
// BAD: dereferences a possibly null XML result
|
||||
auto xml = getXmlFromBinary (data, size);
|
||||
auto state = juce::ValueTree::fromXml (*xml);
|
||||
```
|
||||
|
||||
```cpp
|
||||
// GOOD: null guard, silent return
|
||||
std::unique_ptr<juce::XmlElement> xml (getXmlFromBinary (data, size));
|
||||
if (xml == nullptr)
|
||||
return;
|
||||
juce::ValueTree state = juce::ValueTree::fromXml (*xml);
|
||||
if (! state.isValid())
|
||||
return;
|
||||
```
|
||||
|
||||
This file overrides /AGENTS.md where they conflict.
|
||||
Reference in new issue
Block a user