Signal Processing¶
The Signal Processing module contains functions for signal processing.
-
streaming.signal.
constant
(value, nblock=None)[source]¶ Stream with constant value.
Return type: Stream
orBlockStream
if nblock is not None.
-
streaming.signal.
convolve
(signal, impulse_responses, nhop, ntaps, initial_values=None)¶ Convolve signal with impulse_responses.
Parameters: - signal (
Stream
orBlockStream
) – Signal - impulse_responses –
Stream
- ntaps – Amount of taps.
Returns: Convolution of signal with impulse_responses.
Return type: BlockStream
See also
streaming._iterator.blocked_convolve()
- signal (
-
streaming.signal.
convolve_overlap_add
(signal, impulse_responses, nhop, ntaps, initial_values=None)[source]¶ Convolve signal with impulse_responses.
Parameters: - signal (
Stream
orBlockStream
) – Signal - impulse_responses –
Stream
- ntaps – Amount of taps.
Returns: Convolution of signal with impulse_responses.
Return type: BlockStream
See also
streaming._iterator.blocked_convolve()
- signal (
-
streaming.signal.
convolve_overlap_save
(signal, impulse_responses, nhop, ntaps)[source]¶ Convolve signal with linear time-variant impulse_responses using overlap-save method.
Parameters: - signal – Signal.
- impulse_responses – Impulse responses of the filter. Each impulse response belongs to a hop.
- nhop – Hop in samples.
- ntaps – Length of each impulse response.
Returns: Stream with blocksize equal to nhop.
Return type:
-
streaming.signal.
interpolate
(x, y, xnew)[source]¶ Interpolate y at xnew.
Parameters: - x – Previous sample positions
- y – Previous sample values
- xnew – New sample positions
Returns: Interpolated sample positions
Return type: Stream
-
streaming.signal.
noise
(nblock=None, state=None, color='white', ntaps=None)[source]¶ Generate white noise with standard Gaussian distribution.
Parameters: - nblock – Amount of samples per block.
- state (
np.random.RandomState
) – State of PRNG.
Returns: When nblock=None, individual samples are generated and a
streaming.Stream
isreturned. When integer, a
streaming.BlockStream
is returned.
-
streaming.signal.
sine
(frequency, fs)[source]¶ Sine with frequency and sample frequency fs.
Parameters: - frequency – Frequency of the sine.
- fs – Sample frequency.
Returns: Sine.
Return type: Stream
-
streaming.signal.
vdl
(signal, times, delay, initial_value=0.0)[source]¶ Variable delay line which delays signal at times with delay.
Parameters: - signal – Signal to be delayed.
- times – Sample times corresponding to signal before delay.
- delay – Delays to apply to signal.
- initial_value – Value to return before first sample.
Returns: Delayed version of signal.
Return type: Stream
See also