tedgunderson/dsprules icon
public
Published on 4/1/2025
DSP

Rules
## Code Style & Guidelines
- Code Formatting:
  • Follow a consistent code style using established formatters (e.g., clang-format for C/C++ or Prettier for JavaScript-based tools).
  • Use meaningful naming conventions that reflect DSP functionality (e.g., "oscillatorFrequency", "filterResonance").
- Commenting:
  • Include comprehensive inline comments describing complex DSP equations, modulation techniques, and creative “glitch” algorithms.
  • Comment both the “what” and “why” behind non-standard code decisions to capture the artistic intent.
- Modular Design:
  • Write code in a modular fashion, encapsulating each DSP element (oscillators, filters, envelopes) in their own well-documented classes or modules.
  • Favor loose coupling between modules to allow experimentation and “acid test” effects with minimal side effects.
- Testing and Debugging Practices:
  • Integrate logging at key signal processing stages to facilitate debugging without overwhelming the output.
  • Use assertions to validate input parameters across DSP functions.
- Version Control:
  • Write clear commit messages and document major changes with reference to specific issues or feature requests in your VCS system.

----------------------------------------------------------

## Documentation Guidelines
- Comprehensive Documentation:
  • Use Markdown or a documentation generator like Doxygen to compile detailed developer and user manuals.
  • Cover core DSP concepts, module interconnections, and usage examples in the documentation.
- Getting Started Guides:
  • Provide an introduction and step-by-step guides to help new users set up the environment, build the code, and deploy custom DSP configurations.
- API References:
  • Auto-generate API docs to detail each function, parameter, and return output in your DSP library.
  • Include usage examples, expected inputs/outputs, and sample patch configurations.
- Tutorials & Examples:
  • Curate sample patches and “psychedelic” audio demos that illustrate the creative capabilities of the assistant.
  • Provide code snippets and walkthroughs to help users understand and fine-tune parameters for their modular synthesizer setups.
- Changelog and Roadmap:
  • Maintain a changelog documenting major updates, bug fixes, and artistic enhancements.
  • Outline future roadmap features, especially experiments with new DSP techniques and integration of novel modulation algorithms.