pyFDN.fade_out#

pyFDN.fade_out(x, fade_samples)[source]#

Apply a linear fade-out over the last fade_samples samples.

Ramps the tail of x linearly from 1 to 0 along the last axis, so a finite render can end at zero instead of clicking on an abrupt cutoff.

Parameters:
  • x (ArrayLike) – Input signal; the fade is applied along the last axis.

  • fade_samples (int) – Number of trailing samples to ramp down. Clamped to the signal length; values <= 0 leave the signal unchanged.

Return type:

ndarray

Returns:

Faded copy of x (float), same shape as the input. x is not modified in place.