formants.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (c) 1983-2013 Trevor Wishart and Composers Desktop Project Ltd
  3. * http://www.trevorwishart.co.uk
  4. * http://www.composersdesktop.com
  5. *
  6. This file is part of the CDP System.
  7. The CDP System is free software; you can redistribute it
  8. and/or modify it under the terms of the GNU Lesser General Public
  9. License as published by the Free Software Foundation; either
  10. version 2.1 of the License, or (at your option) any later version.
  11. The CDP System is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU Lesser General Public License for more details.
  15. You should have received a copy of the GNU Lesser General Public
  16. License along with the CDP System; if not, write to the Free Software
  17. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  18. 02111-1307 USA
  19. *
  20. */
  21. /* FORMANT PARAMS */
  22. #define FREQWISE_FORMANTS (0)
  23. #define PICHWISE_FORMANTS (1)
  24. #define TOP_OF_LOW_OCTAVE_BANDS (4)
  25. #define CHAN_ABOVE_LOW_OCTAVES (8)
  26. #define IGNORE_ACTUAL_CHAN_FRQS (1)
  27. #define RECTIFY_CHANNEL_FRQ_ORDER (2)
  28. #define MAX_BANDS_PER_OCT (12) /* semitone is max width */
  29. #define FBAND_DEFAULT (4) /* default no of formant bands */
  30. #define FMNT_BUFMULT (512)
  31. /* FORMANTS */
  32. int initialise_specenv(int *arraycnt,dataptr dz);
  33. int write_formant_descriptor(float **fptr1,float *fptr2,dataptr dz);
  34. int initialise_specenv2(dataptr dz);
  35. int get_channel_corresponding_to_frq(int *chan,double thisfrq,dataptr dz);
  36. int establish_formant_band_ranges(int channels,aplptr ap);
  37. int read_formantband_data_and_setup_formants(char ***cmdline,int *cmdlinecnt,dataptr dz);
  38. int initialise_specenv(int *arraycnt,dataptr dz);
  39. int extract_specenv(int bufptr_no,int storeno,dataptr dz);
  40. int getspecenvamp(double *thisamp,double thisfrq,int storeno,dataptr dz);
  41. int extract_specenv_over_partials(int *specenvcnt,double thispitch,int bufptr_no,dataptr dz);
  42. int setup_formant_params(int fd,dataptr dz);
  43. void print_formant_params_to_screen(dataptr dz);