home/ atoms/ ddsp-trainable-reverb

DDSP's Reverb processor can use either a predicted or a single learned impulse response for convolution

The Reverb processor applies a finite-impulse-response convolution reverb. In non-trainable mode (default) it accepts an impulse response tensor from the neural network decoder, enabling per-example or per-instrument reverberation. In trainable mode (trainable=True) it learns a single global impulse response as a model parameter — useful when all training examples share the same acoustic space. The dry signal is always masked from the IR (first sample set to zero) to prevent the reverb from learning to simply pass audio through. A wet+dry mix (add_dry=True) returns the sum of convolved and original signals. A simpler ExpDecayReverb subclass parameterizes the IR as an exponential decay of white noise with gain and decay coefficients.

Examples

# Trainable global reverb:
reverb = ddsp.effects.Reverb(trainable=True, reverb_length=48000)
# Network-predicted per-example reverb:
reverb = ddsp.effects.Reverb(trainable=False)
audio_wet = reverb(audio_dry, ir=predicted_ir)
# Simplified exponential decay reverb:
reverb = ddsp.effects.ExpDecayReverb()
audio_wet = reverb(audio_dry, gain=gain, decay=decay)

Assessment

When would you choose trainable=True vs trainable=False for the Reverb? Why is the first sample of the impulse response always zeroed out?

“class Reverb(processors.Processor): """Convolutional (FIR) reverb.""" def __init__(self, trainable=False, reverb_length=48000, add_dry=True,”
corpus · ddsp-differentiable-digital-signal-processing-magenta-code-c · chunk 39