synth.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #define IS_GROUCHO_COMPILE (1)
  22. #define WAVE_TABSIZE (256)
  23. #define WAVE_DEFAULT_SR (44100)
  24. #define MAX_SYN_DUR (7200.0) /* 2 hrs */
  25. #define MIN_SYN_DUR (0.04) /* Assumes min samprate = 16000 and max chans = 2 */
  26. /* Otherwise, internal trap */
  27. #define MAX_SYNTH_FRQ (22000) /* lowest conceivable nyquist */
  28. #define MIN_SYNTH_FRQ (0.1) /*arbitrary */
  29. #define SYNTH_SPLICELEN (256)
  30. int do_synth(dataptr dz);
  31. int do_stereo_specsynth(dataptr dz);
  32. #define CHANUP (4) /* half-band of channels over which same frq can occur */
  33. //TW: total amp of 1.0 seems rational, but causes distorttion on resynth
  34. //#define SPECSYN_MAXAMP (1.0) /* maximum total amp of a spectrum : guess */
  35. #define SPECSYN_MAXAMP (0.5) /* maximum total amp of a spectrum : guess */
  36. //#define SPECSYN_SRATE (48000)
  37. //#define SPECSYN_MLEN (4098)
  38. /*RWD more economical ones! */
  39. #define SPECSYN_SRATE (44100)
  40. #define SPECSYN_MLEN (1026)
  41. #define CLICK_SRATE (48000)
  42. #define CLICKLEN (20)
  43. #define CLICKAMP1 (1.0)
  44. #define CLICKAMP2 (.5)
  45. #define CLICKAMP3 (.2)