Error concealment, or quick and short Freeze effect

Hi all.

I have a guitar/bass audio signal (note or chord) that has been stable (no onsets) since at least 40ms.

When a new onset is detected, I want to delay the new signal (100ms delay max) and fill the silence gap with a smooth, low-artefact frozen/predicted signal, based on the previous stable signal (min 40ms) .

Kind of like if I lost the signal for 100ms (except I didn’t’) and I wanted to predict the lost packets.

I’ve been looking on “error concealment” (or “lost-packet concealment”) algorithms like :

  • the “Burg method” (hard to understand, can’t see how to implement it, not sure it’ll work)
  • and “sinusoidal model” (hard to make it work from scratch)

Anyone has done this before ? Any ideas ?

Thanks.