Wish "GAP FILLER" - POC for a GAPLESS Presets/Scenes/Channel Switching - Proof of concept

BobXX

Inspired
6 oct 2023 - IMPORTANT UPDATE:
Maybe I need to throw this topic in the trash bin !! And I will be crazy happy of it !!!
Version 23.00 public beta 1 announced:
"...Preset, Scene and Channel changes are now gapless."
https://forum.fractalaudio.com/threads/axe-fx-iii-firmware-23-00-public-beta-1.198479/#post-2467451
❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️


NOTE: I hereby release Fractal Audio Systems from any commitment to me concerning the contents/ideas of this post, renouncing all present and future claims in this respect.

I will be always looking for a gapless switching of sounds for my live performances.

The architecture of AXE FX3 / FM9 / FM3 at the moment allows a gapless switch only under certain conditions and within the same preset.

Apart from tricks & precautions to eliminate or reduce the gap, I wish to submit to Fractal this idea,
not perfect, but I demonstrated to be very effective.
It could be an option, that user can decide to use or not, accepting the good and bad of it.

I did a deep analisys about those gaps:
https://forum.fractalaudio.com/threads/get-rid-of-switching-audio-gaps-p1-6-technical-measurements-and-info.195653/

We already know that switching PRESETS there's always a gap (from 15ms to 80ms depending of new preset complexity)

In addition I have also detailed that (see link above):

1) switching SCENES, we know exactly when there will be a gap​
2) we can even estimate its amount in ms

In next picture you can see a typical preset or scene&channels switching result (in the last case only when scene switches channels of "gap inducing blocks"):

The blu arrow above is the "starting event" (e.g. FC choice).
  1. After a typical 10ms of "reaction delay" AF3 starts a fade-out of the old sound for additional 10ms

  2. there's a complete silence (gap), in that case for 80ms, this vary from 15ms to 120ms depending on the cases

  3. the new sound appears with a fade-in of 10ms, than new sound becomes 100% running

SDS00392b.png


Having that said, imagine:

For Scenes switching:
to continuously store last ~100ms sound in a buffer (FIFO first in first out) for every AMP blocks and​
~40ms for the other "gap inducing" blocks (listed in my linked job).​

For Presets switching:
to continuously store in a buffer last ~100-140ms sound for all the general outputs​

The concept is:

instead of the fade-out => gap => fade-in,
  1. do a cross-fade of current sound with the  bufferized sound (last XXXms of itself)

  2. it will play all along the gap, filling it. It acts as a sort of "stretching" of the previous sound
    There may be other techniques for doing so, such as repeating a smaller piece of the sampled material, this is just the easier one.

  3. then cross-fade it with the new sound selected
The system can perfectly cross-fade those audio material because it has the timing control of everything, reducing any artifacts to the minimum.
In any case in 99% of cases they will be much much less audible than a total silent gap.


GlennO in a reply here suggests a variation of it, avoiding the first cross-fade and simply mirroring the buffer starting with the last data zero-crossed and cross-fading just the final part of the filling played backwards:​
"A more common solution for this kind of problem is ping pong time stretching.
Keep a short history buffer of the audio to be extrapolated, then when switching channels, find a zero crossing and play the buffer backwards from there with the phase inverted. That gives you a seamless extrapolation of the audio that will be unnoticeable for a few dozen ms. Cross fade that with the audio from the new channel and you'll get a gapless channel switch."

_________________________

PROOF OF CONCEPT (with the limited user's powers...)

I have found that a ducked delay could somehow distantly simulate it, unfortunately without good cross-fadings... I know, but at least to hear/see the potential results.

Only Fractal system know in advance when sound is changing and can predict the gap, cross-fade it and so on...

What we can do with the Ducked Delay is detect the total silence (unfortunately afterwards) and then start filling the gap ASAP,
then detect the new coming sound and silence the "filler", in this case with a partial cross-fading.

So, after a "gap inducing" block such as AMP, CAB, COMP, DRIVE... or after the last of them if they are more,
I added a DELAY Block - Digital Stereo type with the following settings:

Time = 120ms.
Mix = 100% wet
Feedback R and L = 0%


402-405.png

In the Ducker section:

Attenuation= 80dB,
Threshold = -60/-80db to a maximum of -40db (it's a compromise point, we will see what changes)
Release Time= 1ms

2023-08-02_18h05_08.png


Full range 20-20kHz response:

394-4.png



That's the results, in the best case:

BEFORE:
SDS00392b.png

AFTER:
SDS00403bb.png


The gap is visually nearly filled (80%, because of silence detection delay of the Ducked Delay).
But in the more important listening comparison,
the result the gap becomes really very much less audible ! Even in the approximation of this proof of concept.

NOTE:​
I don't know why, but even if the fade-out is 10ms long (sound takes 10ms to go to zero),​
changing Threshold from -30dB to -80db changes the activation of the filling from 10ms to 45ms. :confused:
I have tried all delays types with similar results:​

SDS00403-409b2.png

Apparently this has no sense, but we must also understand that Ducked Delay wasn't designed for this particular use,​
it's already incredible it's enough flexible for our POC! ;)


If FAS will implement this concept AF3/FM9/FM3 can:

1) perfectly cross-fade original material and the "filling",
cross-fading time could even be user adjustable (sudden...smooth) depending on users' needs
2) the result will be 100% GAPLESS
3) the artifacts will be reduced to the minimum, rare, and much much much better than a complete silent gap
4) could be applied also for PRESET SWITCHING !
5) very low CPU use (just short term buffers)

It's not a "engineering perfect" solution but IMHO a very good hearing compromise, without doubling CPU for parallel processings.

In any case it can be an option that user can activate or not, accepting its little limitations and great benefits.
 

Attachments

  • 394-3.png
    394-3.png
    247.1 KB · Views: 60
Last edited:
A more common solution for this kind of problem is ping pong time stretching. Keep a short history buffer of the audio to be extrapolated, then when switching channels, find a zero crossing and play the buffer backwards from there with the phase inverted. That gives you a seamless extrapolation of the audio that will be unnoticeable for a few dozen ms. Cross fade that with the audio from the new channel and you'll get a gapless channel switch.

Whether it would be worthwhile for anyone to spend time and effort implementing that is another matter though.
 
A more common solution for this kind of problem is ping pong time stretching. Keep a short history buffer of the audio to be extrapolated, then when switching channels, find a zero crossing and play the buffer backwards from there with the phase inverted. That gives you a seamless extrapolation of the audio that will be unnoticeable for a few dozen ms. Cross fade that with the audio from the new channel and you'll get a gapless channel switch.

Whether it would be worthwhile for anyone to spend time and effort implementing that is another matter though.
It could potentially be even better, because there's only 1 cross fade instead of 2.
 
A more common solution for this kind of problem is ping pong time stretching. Keep a short history buffer of the audio to be extrapolated, then when switching channels, find a zero crossing and play the buffer backwards from there with the phase inverted. That gives you a seamless extrapolation of the audio that will be unnoticeable for a few dozen ms. Cross fade that with the audio from the new channel and you'll get a gapless channel switch.

Whether it would be worthwhile for anyone to spend time and effort implementing that is another matter though.
Added your variation in my post. Hope somebody in the high towers ;) will consider it.
 
Back
Top Bottom