Another Delay-based Looper

Delay Looper

Records to an Audulus delay node, the delay time becoming the loop period. Up to 100% feedback can be set, creating an endless sound loop. The module allows either continuous layering or single capture. The capture window is either fixed or input-based with fade in and fade out to avoid clicks. Fade options are to fade out at by the end of the initial capture period or to allow signal decay to layer over subsequent passes…

The delay node is set up internally with mix set 100% to the delayed output. The delay time becomes the loop length, and in this module is a fractional time value in seconds.

To avoid transient bursts at the breakpoints of audio, the input, output, and feedback for the delay node are faded in or out or crossfaded over a specific number of samples (300 at present). To avoid adding discontinuities into the audio as the fade is occurring, the fader control signal follows a cosine function over the range of zero to pi radians (0 to 180 degrees), reducing the gain quickly without adding lots of high frequency artifacts. (the fade is complete in about 6.8 milliseconds, but with minimal discontinuity at the end points.)

A rat’s nest of logic now provides the control, replacing the state machine.

The looper now includes peak functionality that was previously an external element. The peak limit section computes a rolling average of output envelope and if the average exceeds the set point will goose the feedback level Back from 100% until the output level has hit the set point. In Peak Limit mode, the feedback knob setting serves as the set point. This allows you to create huge chorus effects without blowing out the audio level.



Loop output – The number beneath the output is the approx loop length, in seconds.


per – The time base for the looper. This is a floating point value at the “per” input, which is multiplied or divided by an integer set by adjusting the “period mult/div” knob. The resulting value is quantized to the sample rate to avoid blurring as the feedback is resampled.

Layer – TRUE sets layered recording mode in which samples pile up as long as samp is held high. FALSE sets single mode, starting a fresh loop.

samp – A trigger initiates capture of an audio stream, or extends capture time in some circumstances. Holding this input high extends the capture.

erase – A trigger initiates an erasure of the loop.

tails – FALSE sets the looper to force a fade-out before the end of one period. Best for sampled live audio which may never fade entirely. TRUE allows the capture to continue until the input has dropped to nearly zero.

Arm – TRUE allows new samples to be recorded. If FALSE, looper plays and can be erased but it can’t be recorded to.

Pk Lim — input or button controls peak-limit mode. Tthe button and input are connected to an XOR expression node, so one but not both true will set peak limit mode. Green light indicates peak limit is on.

## Modes of operation:

this module will either layer audio streams continuously into the loop)o or will add each new audio stream as a new loop (“layer”==FALSE).

In single mode capture, a trigger applied at the “samp” input initiates recording an audio stream into the delay node, crossfading what emerges from the looper from the previous loop output to the live input and crossfading back when the initial period has passed, effectively erasing the old loop while recording the new one. Audio is either rapidly faded out by the end of one period (tails==FALSE) or is allowed to fade to zero naturally (tails==TRUE). Any audio in the stream initiated by the initial samp^ hit will be recorded until one of those fade-out scenarios plays out.

With “layer“ set to TRUE, audio streams layer over older streams. Any hit to “samp” will initiate a new audio stream having a duration at minimum the period of the loop, and with the same fade-out characteristics as for single mode. (The delay node when used in this configuration can produce audio volume values too high for the OS to handle. To avoid eventual sound system crashes, I added an arbitrary limit to the envelope, which once hit, will force the looper to perform an erase operation.)

A trigger at the “erase” input stops recording and empties the delay by zeroing the input and feedback on the delay node for a time equal to the current delay period, plus the fade/crossfade time*. In either recording mode, any hits to “samp” after erase is underway will initiate a new capture into the looper, erasing the old loop audio.

*Because to the delay to 100% that’s inherent to the operation of the he smooth fade control, failing to add that delay beyond the basic loop when erasing will leave a blip of audio at the very beginning of the loop. Adding the fade time to the period in erase mops up that blip.

Version History

Revision File Date Notes

Delay Looper Module.audulus (137.0 KB)
Delay Looper Module.audulus (133.1 KB)
Delay Looper Module.audulus (128.8 KB)
Delay Looper Module.audulus (208.9 KB)


For the latest demo patch I used the smooth crossfade to create a noise gate module. Audio envelope level below setpoint is muted. Hysteresis is used to avoid oscillation near the start and end of muting (you can set the hysteresis amount as a fraction of the setpoint.) Output is the gated audio (smoothly switched by the crossfade function) and a gating pulse that in the demo is the trigger that initiates a stream. The big input selector feeding the loopers allows setting the gain and the muting threshold fo each input. The latest change to the noise gate is an optional holdoff time, which allows the logical “found” output signal (which is routed to the loopers’ samp input) to be held TRUE after the input audio level has dropped below the threshold. This optional input was added to allow the looper to capture certain words, such as “tasks,” which often got broken into two streams, with “found” dropping to FALSE briefly between “task” and “s.”

Screen capture movie (unchanged in this version):

Demo—Latest demo has The final version of the noise gate feeding the looper. This version of the noise gate does a better job delivering on the promise broken by the last demo.

Patch Revision File Date Notes

[2020.07.03.01] in which I hooked up the sound from the noise gate so you’ll hear the immediate as well as the looper output that comes later!
Noise Gate and Looper Demo.audulus (420.3 KB)
Noise Gate and Looper Demo.audulus (420.1 KB)
[2020.06.30 Noise Gate Work (looper demo)]
Noise Gate Work.audulus (267.8 KB)
Delay Looper Play Set.audulus (1.4 MB)
Delay Looper 14.audulus (1.3 MB)
Delay Looper Demo.audulus (521.1 KB)


This looper patch works really well for making seamless loops.

1 Like

That’s definitely what I was aiming for. I’m glad it’s working for you!

1 Like

There is a problem with the calculations for the loop period on mobile devices with a 48k default sample rate using the demo patch. For example, setting the bpm to 120 and the period multiplier to 16, you get an 8 sec period for the loop length as you’d expect on 44.1k sample rate devices whereas you get a 7 sec 350 ms loop length with the same settings on a 48k sample rate device.

I’m tried to figure out where the adjustment needed to be made. The problem seems to be that the Audulus 3 internal clock seems to be running at a 44.1k sample rate so if you multiply the bpm frequency value 1/f by 48/44.1 that is fed into the Delay Looper module in the patch, the loop length will be correct.

The 44.1K and 48K sample difference on mobile Apple devices has been a headache for app developers for years now.

1 Like

Dang! I tried to avoid that problem by using the Samplerate node everywhere to provide that value for calculations, but guess what? I only tested on MacOS. My bad. I’ll take a look.

1 Like

One thing I noticed when looking at timing was that I didn’t correct the crossfade number of samples for the various sample rates. The 300 sample number was based on testing at the 44100 hz sample rate. The number needs to be adjusted by the ratio of the current sample rate to 44100. The patch makes the result an integer again. That way the transitions should be similar for other sample rates. Also, this module may not work for all higher rates. More later.

1 Like

I’ve started looking back at the earlier, simpler timing circuit, applying what I’ve learned doing this one. I suspect I can get all the same functionality with hardwired logic, now that I have my little fader thingie And have learned more about how these delays work. So far so good!


I uploaded a new version and demo patch. The Looper is lighter weight, my having switched to straight logic snarl. The demo features a noise gate module I created to allow audio above some set point initiate a new stream to the looper, mostly for hands off mic keying.

1 Like

I just uploaded looper version 2020.06.25.01, as well as a new version of the demo patch.
Dynamics of the peak limit function were changed to make a bit more responsive.
Change to the noise gate to aid in voice capture (details in the post) by adding a holdoff time at the end of each capture.

1 Like

The July 2nd update and new demo (just a single looper with noise gate and source selector. I assume many of you are either retired or are in technical professions that translate to work-at-home. Either way, have a great July 4th weekend (and yes, you, too, you non—USA folks, for whom the 4th of July means little or nothing!) Stay safe and wear that mask when you’re out and about (this mainly for my US friends, as we’ve done a terrible job so far in containing this.)