volume ducks in xfade loops

Hi

The xfade loop is IMHO broken (or I’m doing something wrong), as heard in this xrns. The problem should be obvious by listening to the examples, but to make it clear, the renoise xfadeloop is ducking in volume, which makes the loop quite obvious.

Three instruments:
00: original, no loop
01: xfadeloop by renoise
02: xfadeloop by a python script I wrote.

The loop can be heard in 02, but 01 is not useable to my ears. I’d be happy to supply more info, tests or whatever.

NB: I’ve tried this with alot of other sounds, mostly pads, same result.

The looping function itself is actually quite ‘dumb’ in terms of the logic behind it.

  • If you have the entire sample selected, then it will simply divide the sample in half and cross-fade the 2 halves together so they overlap.

  • If you have a smaller portion of the whole sample selected, then it divides that selection into 3 parts and cross-fades the 1st and 2nd parts together so they overlap, leaving the 3rd part untouched. The reasoning behind this 3-part split is that it allows you to play a sustained note during the looped portion of the sample, then have a note-off stage that transitions smoothly into the remaining tail end of the sample.

Overall, the end result is very much dependent on the audio material itself, and where you make the selections within the sample before applying the loop function. You will often be prone to some phase cancellation issues (which can of course lead to volume ducking), as the cross-faded sections may not always align perfectly with the phase of the waveform cycles in the sound itself.

This could be improved by performing more detailed analysis of the sound itself and trying to determine more ideal loop points, but obviously every sound is different, and extracting any meaningful data can often be incredibly difficult except in cases where the waveform itself is very simple.

The loop in your 02 sound is definitely a big improvement in this particular case anyway. Would you mind sharing the script, or your techniques for how you achieved this? Was there any special care taken with regard to choosing potential loop points/size, ie. some prep work you needed to do first, or is your script fully automated? How does it handle other waveform types?

Even Kontakt seems to have this problem sometimes, I guess it’s just the phasing.

My python script is here. It uses external programs for processing, so I’d be surprised if it works on anything else than linux, sorry 'bout that.

It does nothing special, and works great on all kinds of material. To me it sounds like the problem with renoise xfadeloop is that the fadeout is faster than the fadein. Exponential or logarithmic mixup or something like that.

So I don’t think fancy stuff is needed, just a simple fix of the fadein/fadeout curves.

If it gets changed, please also keep the current xfade looping scheme as the volume ducking can sound interesting.

OK, so here’s another xrns with several different randomly chosen sounds, with original, renoise xfade and my script xfade.

Looking at the sine looped by renoise, it’s quite obvious that there’s a volume problem in the xfade… I think you’ll agree that although renoise is not horrible in all cases, my script does a better job. And again: my script does NO magic, and I didn’t fool around with values or selections to get best result, all loops (both renoise and by my script) were “first takes”…