dsp

class Delay(nodes, len, fb, lenct=None)

Bases: object

Parameters
  • nodes – An array of nodes that should be delayed

  • len (int) – The length of the delay line in samples

  • fb (float) – The ammount of feedback into the delay line

Variables
  • buffer (array) – A buffer which contains audio data from the nodes

  • txrx (int) – A pointer to the read/write position in the buffer

add_input(node)
Parameters

node – Node to add to the delay line

get_sample(time)
Parameters

time (float) – The time in seconds of which the sample should be gotten

Returns

A PCM value for the node at the given time

Return type

float

class MultiChannelDelay(nodes, len, fb)

Bases: object

Parameters
  • nodes – An array of nodes that should be fed into the delay line

  • len (array(int)) – An array of lengths for each delay channel

  • fb (float) – Ammount of feedback into the delay line

Variables
  • buffer (array) – An array of buffers of audio data in the delay line

  • txrx (array) – An array of read/write position values for the respective delay buffers

  • ch_num (int) – The current channel number which the buffer will be read from

add_input(node)
Parameters

node – Node to add to the delay line

get_sample(time)
Parameters

time (float) – The time in seconds of which the sample should be gotten

Returns

A PCM value for the node at the given time

Return type

float

class MultiTapDelay(node, taps=[])

Bases: object

Parameters
  • node – The node which should be delayed

  • taps (array(int)) – An array of positions where the delay line should be tapped

get_sample(time)
Parameters

time (float) – The time in seconds of which the sample should be gotten

Returns

A PCM value for the node at the given time

Return type

float