VowelEditor.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef _VowelEditor_h_
  2. #define _VowelEditor_h_
  3. /* VowelEditor.h
  4. *
  5. * Copyright (C) 2008-2017 David Weenink
  6. *
  7. * This code is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. /*
  21. djmw 20070130 First
  22. djmw 20110306 Latest modification.
  23. */
  24. #include "FormantTier.h"
  25. #include "PitchTier.h"
  26. #include "TableOfReal.h"
  27. #include "Editor.h"
  28. #include "Vowel_def.h"
  29. struct structVowelEditor_F0 {
  30. double start;
  31. double slopeOctPerSec;
  32. double minimum, maximum;
  33. double samplingFrequency, adaptFactor, adaptTime;
  34. integer interpolationDepth;
  35. };
  36. struct structVowelEditor_F1F2Grid {
  37. double df1, df2;
  38. int text_left, text_right, text_bottom, text_top;
  39. double grey;
  40. };
  41. Thing_define (VowelEditor, Editor) {
  42. int soundFollowsMouse, shiftKeyPressed;
  43. double f1min, f1max, f2min, f2max; // domain of graphics F1-F2 area
  44. autoMatrix f3, b3, f4, b4;
  45. int frequencyScale; // 0: lin, 1: log, 2: bark, 3: mel
  46. int axisOrientation; // 0: origin topright + f1 down + f2 to left, 0: origin lb + f1 right +f2 up
  47. int marksDataset, speakerType; // 1 = male, 2 = female, 3 = child
  48. int marksFontSize;
  49. autoGraphics graphics; // the drawing
  50. short width, height; // size of drawing area in pixels
  51. autoTable marks; // Vowel, F1, F2, Colour...
  52. autoVowel vowel;
  53. double markTraceEvery;
  54. structVowelEditor_F0 f0;
  55. double maximumDuration, extendDuration;
  56. GuiDrawingArea drawingArea;
  57. GuiButton playButton, reverseButton, publishButton;
  58. GuiText f0TextField, f0SlopeTextField, durationTextField, extendTextField;
  59. GuiLabel startInfo, endInfo;
  60. structVowelEditor_F1F2Grid grid;
  61. void v_destroy () noexcept
  62. override;
  63. bool v_scriptable ()
  64. override { return false; }
  65. void v_createChildren ()
  66. override;
  67. void v_createMenus ()
  68. override;
  69. void v_createHelpMenuItems (EditorMenu menu)
  70. override;
  71. };
  72. autoVowelEditor VowelEditor_create (conststring32 title, Daata data);
  73. void VowelEditor_prefs ();
  74. #endif /* _VowelEditor_h_ */