| 1 |
/* Sound_to_Intensity.h |
| 2 |
* |
| 3 |
* Copyright (C) 1992-2011,2015,2017,2023 Paul Boersma |
| 4 |
* |
| 5 |
* This code is free software; you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation; either version 2 of the License, or (at |
| 8 |
* your option) any later version. |
| 9 |
* |
| 10 |
* This code is distributed in the hope that it will be useful, but |
| 11 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 |
* See the GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
#include "Sound.h" |
| 20 |
#include "Intensity.h" |
| 21 |
#include "IntensityTier.h" |
| 22 |
|
| 23 |
autoIntensity Sound_to_Intensity (Sound me, double pitchFloor, double timeStep, bool subtractMean); |
| 24 |
/* |
| 25 |
Function: |
| 26 |
smooth away the periodic part of a signal, |
| 27 |
by convolving the square of the signal with a Kaiser(20.24) window; |
| 28 |
and resample on original sample points. |
| 29 |
Arguments: |
| 30 |
`pitchFloor`: |
| 31 |
the minimum periodicity frequency that will be smoothed away |
| 32 |
to at most 0.00001 %. |
| 33 |
The Hanning/Hamming-equivalent window length will be 3.2 / 'pitchFloor'. |
| 34 |
The actual window length will be twice that. |
| 35 |
`timeStep`: |
| 36 |
if <= 0.0, then 0.8 / pitchFloor. |
| 37 |
Performance: |
| 38 |
every periodicity frequency greater than 'pitchFloor' |
| 39 |
will be smoothed away to at most 0.00001 %; |
| 40 |
if 'timeStep' is 0 or less than 3.2 / 'pitchFloor', |
| 41 |
aliased frequencies will be at least 140 dB down. |
| 42 |
Example: |
| 43 |
pitchFloor = 100 Hz; |
| 44 |
Hanning/Hanning-equivalent window duration = 32 ms; |
| 45 |
actual window duration = 64 ms; |
| 46 |
*/ |
| 47 |
|
| 48 |
autoIntensityTier Sound_to_IntensityTier (Sound me, double pitchFloor, double timeStep, bool subtractMean); |
| 49 |
|
| 50 |
/* End of file Sound_to_Intensity.h */ |