WavBakeCache

from acron.dsp import WavBakeCache
class WavBakeCache(root: Path, *, name: str = 'audio', version: int = 1)

Bases: object

A versioned directory of baked WAVs with a manifest of true levels.

Subclass and implement bake_all(); call ensure() at startup. Every file is peak-normalised so 16-bit PCM keeps its precision, and the TRUE amplitude is kept in manifest.json as a playback scale — at play time the volume is the mix’s own gain times that scale, and no level anywhere is retuned by ear. Bump version when the synthesis changes: the cache directory carries it, so an old cache is simply never found again.

Inheritance diagram

digraph inheritancebbf1137752 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "WavBakeCache" [URL="acron.dsp.WavBakeCache.html#acron.dsp.WavBakeCache",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="A versioned directory of baked WAVs with a manifest of true levels."]; }