Generates a chirp signal defined by the "method" input, windowed, with silence interval at the beggining and end of the signal, plus a hanning fade in and fade out. >>> x = pytta.generate.sweep() >>> x.plot_time() Return a signalObj containing a logarithmic chirp s
(freqMin=None,
freqMax=None,
samplingRate=None,
fftDegree=None,
startMargin=None,
stopMargin=None,
method='logarithmic',
windowing='hann')
| 104 | return sinSigObj |
| 105 | |
| 106 | def sweep(freqMin=None, |
| 107 | freqMax=None, |
| 108 | samplingRate=None, |
| 109 | fftDegree=None, |
| 110 | startMargin=None, |
| 111 | stopMargin=None, |
| 112 | method='logarithmic', |
| 113 | windowing='hann'): |
| 114 | """ |
| 115 | Generates a chirp signal defined by the "method" input, windowed, with |
| 116 | silence interval at the beggining and end of the signal, plus a hanning |
| 117 | fade in and fade out. |
| 118 | |
| 119 | >>> x = pytta.generate.sweep() |
| 120 | >>> x.plot_time() |
| 121 | |
| 122 | Return a signalObj containing a logarithmic chirp signal from 17.8 Hz |
| 123 | to 22050 Hz, with a fade in beginning at 17.8 Hz time instant and ending at |
| 124 | the 20 Hz time instant; plus a fade out beginning at 20000 Hz time instant |
| 125 | and ending at 22050 Hz time instant. |
| 126 | |
| 127 | The fade in and the fade out are made with half hanning window. First half |
| 128 | for the fade in and last half for the fade out. Different number of points |
| 129 | are used for each fade, so the number of time samples during each frequency |
| 130 | is respected. |
| 131 | |
| 132 | Input arguments (default), (type): |
| 133 | ------------------------ |
| 134 | |
| 135 | * freqMin (20), (float) |
| 136 | |
| 137 | * freqMax (20), (float) |
| 138 | |
| 139 | * samplingRate (44100), (int) |
| 140 | |
| 141 | * fftDegree (18), (float) |
| 142 | |
| 143 | * startMargin (0.3), (float) |
| 144 | |
| 145 | * stopMargin (0.7), (float) |
| 146 | |
| 147 | * method (logarithmic'), (string) |
| 148 | |
| 149 | * windowing ('hann'), (string) |
| 150 | |
| 151 | |
| 152 | """ |
| 153 | # Code snippet to guarantee that generated object name is |
| 154 | # the declared at global scope |
| 155 | # for frame, line in traceback.walk_stack(None): |
| 156 | for framenline in traceback.walk_stack(None): |
| 157 | # varnames = frame.f_code.co_varnames |
| 158 | varnames = framenline[0].f_code.co_varnames |
| 159 | if varnames == (): |
| 160 | break |
| 161 | # creation_file, creation_line, creation_function, \ |
| 162 | # creation_text = \ |
| 163 | extracted_text = \ |
no test coverage detected