aspen.sounds.complex_tone¶
Complex tone
Functions
|
Generate complex tone. |
Classes
|
Generate complex tone. |
-
class
aspen.sounds.complex_tone.
ComplexTone
(complex_tone_duration=[1000], complex_tone_fundamental_freq=[440], complex_tone_num_harmonics=[10], complex_tone_first_harmonic_freq=[440], complex_tone_harmonics_amp=['1'], complex_tone_tilt_type=['default'], complex_tone_num_signals=1, samp_freq=16000)[source]¶ Bases:
aspen.interfaces.abs_common_interface.AbsCommonInterface
,aspen.interfaces.abs_sound_interface.AbsSoundInterface
Generate complex tone.
- Parameters
complex_tone_duration¶ (
Sequence
[float
]) – The duration of complex tone in millisecond. Defaults to [1000].complex_tone_fundamental_freq¶ (
Sequence
[float
]) – The fundamental frequency of complex tone in Hz. This value determines the interval of each frequency peak. Defaults to [440].complex_tone_num_harmonics¶ (
Sequence
[int
]) – The number of harmonics. Defaults to [10].complex_tone_first_harmonic_freq¶ (
Sequence
[float
]) – The frequency of first harmonics. When this value is not same value as –complex-tone-fundamental-freq or a multiple of –complex-tone-fundamental-freq, the output signal becomes inharmonic. Defaults to [440].complex_tone_harmonics_amp¶ (
Sequence
[str
]) – Relative amplitude of each harmonics. The format is like 2_1_1_1 which is meant that the first harmonics has twice as much amplitude as the other three harmonics. Defaults to [“1”] which generates the same amplitude signal for all harmonics.complex_tone_tilt_type¶ (
Sequence
[str
]) – Type of spectral tilt. up, down means 6, -6 dB/Oct, respectively. default will do nothing.complex_tone_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.complex_tone.
complex_tone
(duration=[1000], fundamental_freq=[440], num_harmonics=[10], first_harmonic_freq=[440], harmonics_amp=['1'], tilt_type=['default'], num_signals=1, samp_freq=16000)[source]¶ Generate complex tone.
- Parameters
duration¶ (
Sequence
[float
]) – The duration of complex tone in millisecond. Defaults to [1000].fundamental_freq¶ (
Sequence
[float
]) – The fundamental frequency of complex tone in Hz. This value determines the interval of each frequency peak. Defaults to [440].num_harmonics¶ (
Sequence
[int
]) – The number of harmonics. Defaults to [10].first_harmonic_freq¶ (
Sequence
[float
]) – The frequency of first harmonics. When this value is not same value as –complex-tone-fundamental-freq or a multiple of –complex-tone-fundamental-freq, the output signal becomes inharmonic. Defaults to [440].harmonics_amp¶ (
Sequence
[str
]) – Relative amplitude of each harmonics. The format is like 2_1_1_1 which is meant that the first harmonics has twice as much amplitude as the other three harmonics. Defaults to [“1”] which generates the same amplitude signal for all harmonics.tilt_type¶ (
Sequence
[str
]) – Type of spectral tilt. up, down means 6, -6 dB/Oct, respectively. default will do nothing.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.