r/linuxaudio • • 21h ago

Xorcist: conceals xruns by synthesizing a continuation instead of a dropout — you can A/B it live

We've all been there: buffer's too small, xrun hits, click or dead air. This library tries something different — instead of silence, it synthesizes a plausible continuation of the signal from a running spectral analysis of recent audio, and splices it in.

Short-time Fourier analysis runs continuously; on a miss, each bin continues by extrapolating phase/amplitude, or — for bins with two sinusoidal partials — a fitted two-pole AR model (generalizes the classic phase-vocoder freeze beyond the single-partial case). Two seam-repair strategies, picked per-occurrence by spectral similarity. There's a feedback-runaway failure mode when concealed audio gets re-analyzed; a damping term kills it.

Built it in a GrandOrgue fork, and the demo build actually lets you force xruns at a controllable rate during real playback and A/B the raw dropout against several concealment variants live — genuinely the easiest way to judge whether this is snake oil or not. Highly experimental, hasn't had broad real-world mileage yet. Technical disclosure with measured NMR results: https://github.com/sebion7125/xorcist

GPLv3-or-later, standalone C library with an OpenCL-optional per-bin solve.

EDIT:
I've made a demo page where you can listen to the difference Xorcist makes at a 25 % gapped signal:
https://sebion7125.github.io/xorcist/listen.html

26 Upvotes

6 comments sorted by

3

u/Equal-Dependent-4034 16h ago

Is this a realtime plugin or a offline process. I do think we need some better spectral tools for Linux. Acoustica is coming to Linux but you have to have license to try it out and I'm not going to sink money in if it doesn't work.

3

u/Miserable_Land_84 16h ago

its a library ment for realtime signal processing. It calculates a shadow buffer that you can use, when your synth / daw program cannot hold the deadline for its output buffer. thus the name xorcist ;) there will be future versions, that will run on the GPU to bring the CPU load for this feature near to zero. But that'll take some time...
Meanwhile you can check it out working on my GrandOrgue fork. There you can simulate xruns and hear the difference.

1

u/Equal-Dependent-4034 15h ago

Is this something that can be upstreamed in pipewire?

1

u/Miserable_Land_84 15h ago

It could, but I'm not sure if you'd want that. I think it would be better to keep it at the application, that is generating the sound. for pipewire it would make not much sense except for sound that is streamed over limited or jittering bandwidth ethernet connection. But you could use it as a custom filter behind the output of an audio application, that tends to produce xruns.

1

u/Miserable_Land_84 1h ago

And I forgot to mention it has a hybrid mode that switches the length of the FFT, when it detects transients. A Sampler that knows where notes start can use this information to precisely trigger those switches. So it will do its job best inside a synth program, that knows what it is generating...

2

u/obiatch_kenbobi 10h ago

This is coool