agentsclimarketplace

Audio numerics review

Skill kunitoki/sonic-skills/skills/audio-numerics-review

Modular Markdown-based audio skills for AI agents and developers, covering signal processing, synthesis, effects, analysis, and spatial audio.

Install
npx -y skills add kunitoki/sonic-skills --skill audio-numerics-review

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Reviews audio DSP code for numerical correctness. Use when the user asks to review, audit, or check DSP code for correctness issues — filters, feedback loops, fixed-point arithmetic, accumulation loops, or any numeric computation in audio code. Trigger on "check this filter for NaN", "why does my reverb blow up?", "is this numerically stable?", "why do I hear DC in my output?". Pairs with audio-dsp-review (realtime safety); this skill covers numeric correctness. Flag issues proactively.

SKILL.md

3.2 KB, as published. Nobody here has run it

Audio Numerics Review

Floating-point is not real math. IEEE 754 edge cases — denormals, NaN propagation, catastrophic cancellation, precision loss — silently produce wrong audio output without crashing. You won't find them with a debugger; you find them by knowing where to look.

Step 1 — Find numeric-critical paths

Locate every function doing floating-point or integer DSP: filter state loops, feedback delay lines, envelope followers, RMS/energy accumulators, pitch detectors, fixed-point paths (CMSIS-DSP, SIMD int16/int32), any division whose denominator may be zero.

Step 2 — Scan for violations

ViolationWhere to lookSymptom
Denormal floatsIIR state vars, reverb tanks, delay feedbackSudden 100× CPU spike when signal decays
NaN / InfDivisions, sqrt, acos/asin, peak normalizersSilence or noise that can't be traced
Catastrophic cancellationDC-blocking filters, near-Nyquist biquads, first-order diffNoise floor jumps, loss of precision
Fixed-point overflowQ15/Q31 multiply, CMSIS paths, SIMD int16Audible distortion / wrapping
Precision lossRMS/energy sums, mixing buses, long loopsAccumulated DC offset, incorrect levels
FTZ/DAZ absentprepareToPlay/stream-open — no mode setupDenormals hit on some hosts but not others

For code examples and platform-specific notes see references/numerics-pitfalls.md.

Step 3 — Write the review

## Audio Numerics Review: `[file / function]`

### Verdict
[Safe | Has critical violations | Warnings only] — one sentence summary

### Critical Violations
**[Category]: [description]**
`file:line` — `offending code`
Why: one sentence on the numeric risk
Fix: concrete suggestion

### Warnings
[same format]

### What's Done Well
[guarded divisions, double accumulators, FTZ setup, etc.]

### Recommended Fixes (priority order)
1. ...

Quick fix table

ViolationSafe alternative
Denormal in feedbackScopedNoDenormals; FTZ+DAZ in prepareToPlay; DC-offset clamp
Division by zero(denom > 1e-6f) ? num/denom : fallback
sqrt/acos/asin unclampedstd::sqrt(std::max(0.f, x)), std::clamp inputs
NaN propagating silentlyassert(!std::isnan(y)) in debug; validate at entry points
Cancellation in coefficientsCompute coefficients in double; use numerically stable forms
Fixed-point overflowPromote to wider type before multiply; __SSAT, CMSIS saturating ops
Precision loss in long sumdouble accumulator or Kahan compensated summation
FTZ/DAZ absentSet explicitly in prepareToPlay; use ScopedNoDenormals per-block

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.