aspen.sounds.filtered_noise¶
Filtered noise
Functions
|
Generate filtered noise. |
Classes
|
Generate filtered noise. |
-
class
aspen.sounds.filtered_noise.
FilteredNoise
(filtered_noise_duration=[1000], filtered_noise_btype=['bandpass'], filtered_noise_filter_freq=['800_1200'], filtered_noise_filter_impulse_response=['fir'], filtered_noise_filter_order=[512], filtered_noise_filter_firwin=['hann'], filtered_noise_num_signals=1, samp_freq=16000)[source]¶ Bases:
aspen.interfaces.abs_common_interface.AbsCommonInterface
,aspen.interfaces.abs_sound_interface.AbsSoundInterface
Generate filtered noise.
- Parameters
filtered_noise_duration¶ (
Sequence
[float
]) – The duration of filtered noise in millisecond. Defaults to [1000].filtered_noise_btype¶ (
Sequence
[str
]) – The type of filtering. The choices are lowpass, highpass, bandpass or bandstop. Defaults to [“bandpass”].filtered_noise_filter_freq¶ (
Sequence
[str
]) – Cutoff frequency to filter a noise in Hz. In the case of bandpass or bandstop, specify the lower/upper freqencies splitted by the underscore symbol (e.g. 800_1200). Defaults to [“800_1200”].filtered_noise_filter_impulse_response¶ (
Sequence
[str
]) – The type of impulse response for filtering noise. The choices are fir or iir that are a finite impulse response or infinite impulse response, respectively. Defaults to [“fir”].filtered_noise_filter_order¶ (
Sequence
[int
]) – The number of the filter order. Defaults to [512].filtered_noise_filter_firwin¶ (
Sequence
[str
]) – Type of FIR window. Window functions are listed in Scipy doc (https://docs.scipy.org/doc/scipy/reference/signal.windows.html). Defaults to [“hann”].filtered_noise_num_signals¶ (
int
) – Number of signals. If this value greater than 2, the other arguments should contain 2 types. Defaults to 1.
-
__call__
()¶ Generate a specified number of signals.
-
aspen.sounds.filtered_noise.
filtered_noise
(duration=[1000], btype=['bandpass'], filter_freq=['800_1200'], filter_impulse_response=['fir'], filter_order=[512], filter_firwin=['hann'], num_signals=1, samp_freq=16000)[source]¶ Generate filtered noise.
- Parameters
duration¶ (
Sequence
[float
]) – The duration of filtered noise in millisecond. Defaults to [1000].btype¶ (
Sequence
[str
]) – The type of filtering. The choices are lowpass, highpass, bandpass or bandstop. Defaults to [“bandpass”].filter_freq¶ (
Sequence
[str
]) – Cutoff frequency to filter a noise in Hz. In the case of bandpass or bandstop, specify the lower/upper freqencies splitted by the underscore symbol (e.g. 800_1200). Defaults to [“800_1200”].filter_impulse_response¶ (
Sequence
[str
]) – The type of impulse response for filtering noise. The choices are fir or iir that are a finite impulse response or infinite impulse response, respectively. Defaults to [“fir”].filter_order¶ (
Sequence
[int
]) – The number of the filter order. Defaults to [512].filter_firwin¶ (
Sequence
[str
]) – Type of FIR window. Window functions are listed in Scipy doc (https://docs.scipy.org/doc/scipy/reference/signal.windows.html). Defaults to [“hann”].num_signals¶ (
int
) – Number of signals. If this value greater than 2, the other arguments should contain 2 types. Defaults to 1.
- Return type
- Returns
Output signals.