Sound_to_Intensity.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Sound_to_Intensity.h
  2. *
  3. * Copyright (C) 1992-2011,2015,2017 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. #include "Sound.h"
  19. #include "Intensity.h"
  20. #include "IntensityTier.h"
  21. autoIntensity Sound_to_Intensity (Sound me, double minimumPitch, double timeStep, bool subtractMean);
  22. /*
  23. Function:
  24. smooth away the periodic part of a signal,
  25. by convolving the square of the signal with a Kaiser(20.24) window;
  26. and resample on original sample points.
  27. Arguments:
  28. `minimumPitch`:
  29. the minimum periodicity frequency that will be smoothed away
  30. to at most 0.00001 %.
  31. The Hanning/Hamming-equivalent window length will be 3.2 / 'minimumPitch'.
  32. The actual window length will be twice that.
  33. `timeStep`:
  34. if <= 0.0, then 0.8 / minimumPitch.
  35. Performance:
  36. every periodicity frequency greater than 'minimumPitch'
  37. will be smoothed away to at most 0.00001 %;
  38. if 'timeStep' is 0 or less than 3.2 / 'minimumPitch',
  39. aliased frequencies will be at least 140 dB down.
  40. Example:
  41. minimumPitch = 100 Hz;
  42. Hanning/Hanning-equivalent window duration = 32 ms;
  43. actual window duration = 64 ms;
  44. */
  45. autoIntensityTier Sound_to_IntensityTier (Sound me, double minimumPitch, double timeStep, bool subtractMean);
  46. /* End of file Sound_to_Intensity.h */