yodel.delay module

This module provides classes for delaying signals.

class yodel.delay.DelayLine(samplerate, maxdelay=1000, delay=0)

Bases: builtins.object

A delayline allows to delay a given signal by a certain amount of time or samples. Time-varying delay is allowed.

__init__(samplerate, maxdelay=1000, delay=0)

Create a delayline.

  • samplerate – sample-rate in Hz
  • maxdelay – maximum allowed delay in ms
  • delay – initial delay in ms

Clear the current samples in the delayline with zeros. Every other state is kept (current delay, max delay).

process(input_signal, output_signal)

Delay an input signal by the current amount of delay.

  • input_signal – signal to be delayed
  • output_signal – resulting delayed signal

Delay an input sample by the current amount of delay.

Parameters:input_signal – sample to be delayed
Returns:resulting delayed sample

Specify a new time delay value.

Parameters:delay – new delay value in ms