audio-engineering-principles

Enforces real-time audio coding standards for DSP, analysis, and JUCE integration.

16|9|Updated Nov 6, 2013
One-click install
npx skills add https://github.com/erikstmartin/dotfiles --skill audio-engineering-principles
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audio-engineering-principles
Source: https://github.com/erikstmartin/dotfiles/tree/main/skills/catalog/audio/audio-engineering-principles
Command: npx skills add https://github.com/erikstmartin/dotfiles --skill audio-engineering-principles

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This section explains the need for invariant engineering standards to ensure safe, deterministic, and numerically robust audio code across DSP, analysis, and JUCE integration.

Core Features & Use Cases

  • Real-Time Safety Rules: Preallocate, avoid heap usage, and minimize blocking on audio threads.
  • Determinism: Ensures reproducible processing with stable floating-point operations and no undefined behavior.
  • Numeric Hygiene: Manages denormals, DC offset, and proper gain staging to avoid artifacts.
  • Performance Mindset: Documented Big-O, memory usage, and cache-friendly design.
  • Output Contract & Guardrails: Clear constraints on outputs and failure handling.
  • Scope Guardrails: Boundaries to prevent unsafe practices and promote safe integration.

Quick Start

Follow these guidelines when implementing real-time audio processing to guarantee safety, determinism, and numerical hygiene.

Frequently Asked Questions about audio-engineering-principles

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write safe real-time audio code that avoids audio thread glitches?

Safe real-time audio code requires preallocating fixed-size buffers, avoiding heap allocations, locks, logging, file I/O, syscalls, and exceptions on the audio thread to ensure deterministic processing.

What is numeric hygiene in DSP and why do denormals cause audio artifacts?

Numeric hygiene in DSP manages denormals, DC offset, and proper gain staging to prevent artifacts. It requires stable floating-point operations and avoids undefined behavior for reproducible audio processing.

Can I use dynamic container resizing or standard locks in JUCE audio processing?

No, JUCE audio processing requires lock-free structures and fixed-size buffers instead of dynamic container resizing or standard locks. This prevents thread blocking and maintains real-time safety.

What's the best way to ensure determinism in real-time audio systems?

Ensuring determinism in real-time audio systems involves using stable floating-point operations, preallocation, and lock-free structures while prohibiting syscalls, exceptions, and undefined behavior on the audio thread.

Why does my audio plugin drop out or glitch during heavy DSP processing?

Audio plugins drop out when DSP processing violates real-time safety by allocating memory, using locks, or performing file I/O on the audio thread. Preallocate fixed-size buffers and use lock-free structures to resolve this.

Do I need to document Big-O performance characteristics for real-time audio code?

Yes, documenting Big-O complexity, memory usage, and cache-friendly design is required for real-time audio code. This performance mindset ensures processing remains within strict time constraints and avoids audio thread violations.