No new tools in this one. v1.2.4 is infrastructure. The kind of release that’s invisible if it works.
The cache
The biggest change is a thread-safe LRU analysis cache. If you’re running a session with a lot of stems and calling comparison tools, compare_to_reference, compare_to_profile, multi_stem_masking, Phantom was re-analyzing files it had already seen. Every call kicked off a fresh set of FFT passes, loudness calculations, and spectrum reads.
Now it doesn’t. Results get cached keyed to the file and its analysis parameters. Second call on the same stem is instant. On a full mix session with 8–10 stems and a few rounds of comparison, that adds up fast.
We also replaced a TOCTOU-vulnerable cache write pattern with proper fcntl.flock advisory locking. Thread safety on the cache isn’t an afterthought.
FFT sharing in detect_problems
detect_problems was running four separate FFT passes to feed different parts of its analysis. All four were looking at the same file. Now there’s one pass and the spectrum gets shared across the sub-analyzers. Faster, and one less place for results to diverge.
Cross-sample-rate comparison
Comparing a 48kHz stem against a 44.1kHz reference used to throw an error. Now Phantom auto-resamples using polyphase FIR resampling before the comparison runs. No more manual bouncing just to match sample rates.
Tuning knobs
Two new environment variables if you want to dial things in:
PHANTOM_PHAT_WINDOW_Scontrols the PHAT correlation window sizePHANTOM_MASKING_TOP_Ncaps how many masking relationshipsmulti_stem_maskingtracks
The masking cap also adapts automatically based on stem count, so you’re not drowning in relationships on large sessions even without touching the env var.
CI pipeline
Every PR now runs against Python 3.10 and 3.12 via GitHub Actions. Dependabot keeps dependencies current. Regressions get caught before they ship.
The test suite picked up a 60-second stereo fixture, error schema consistency checks, long audio duration tests with timeout guards, and plugin skill content validation. More of the edge cases that show up in real sessions are covered now.
How to update
pip install --upgrade phantom-audio
Same session workflow. The cache is automatic. No config changes needed.
Star the repo or join the waitlist for Phantom Studio.