TimeSoundAnalysisEditor.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #ifndef _TimeSoundAnalysisEditor_h_
  2. #define _TimeSoundAnalysisEditor_h_
  3. /* TimeSoundAnalysisEditor.h
  4. *
  5. * Copyright (C) 1992-2011,2012,2013,2014 Paul Boersma
  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.
  15. * See the GNU 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. #include "TimeSoundEditor.h"
  21. #include "Sound_and_Spectrogram.h"
  22. #include "Pitch.h"
  23. #include "Intensity.h"
  24. #include "Formant.h"
  25. #include "PointProcess.h"
  26. #include "TimeSoundAnalysisEditor_enums.h"
  27. Thing_define (TimeSoundAnalysisEditor, TimeSoundEditor) {
  28. autoSpectrogram d_spectrogram;
  29. double d_spectrogram_cursor;
  30. autoPitch d_pitch;
  31. autoIntensity d_intensity;
  32. autoFormant d_formant;
  33. autoPointProcess d_pulses;
  34. GuiMenuItem spectrogramToggle, pitchToggle, intensityToggle, formantToggle, pulsesToggle;
  35. void v_destroy () noexcept
  36. override;
  37. void v_info ()
  38. override;
  39. void v_createMenuItems_query (EditorMenu menu)
  40. override;
  41. bool v_click (double xWC, double yWC, bool shiftKeyPressed)
  42. override;
  43. void v_createMenuItems_view_sound (EditorMenu menu)
  44. override;
  45. double v_getBottomOfSoundArea ()
  46. override
  47. {
  48. return p_spectrogram_show || p_pitch_show || p_intensity_show || p_formant_show ? 0.5 : 0.0;
  49. }
  50. virtual bool v_hasAnalysis () { return true; }
  51. virtual bool v_hasSpectrogram () { return true; }
  52. virtual bool v_hasPitch () { return true; }
  53. virtual bool v_hasIntensity () { return true; }
  54. virtual bool v_hasFormants () { return true; }
  55. virtual bool v_hasPulses () { return true; }
  56. virtual void v_reset_analysis ();
  57. virtual void v_createMenuItems_spectrum_picture (EditorMenu menu);
  58. virtual void v_createMenuItems_pitch_picture (EditorMenu menu);
  59. virtual void v_createMenuItems_intensity_picture (EditorMenu menu);
  60. virtual void v_createMenuItems_formant_picture (EditorMenu menu);
  61. virtual void v_createMenuItems_pulses_picture (EditorMenu menu);
  62. virtual void v_draw_analysis ();
  63. virtual void v_draw_analysis_pulses ();
  64. virtual void v_createMenuItems_query_log (EditorMenu menu);
  65. virtual void v_createMenus_analysis ();
  66. virtual void v_createMenuItems_view_sound_analysis (EditorMenu menu);
  67. #include "TimeSoundAnalysisEditor_prefs.h"
  68. };
  69. void TimeSoundAnalysisEditor_init (TimeSoundAnalysisEditor me,
  70. conststring32 title, Function data, Sampled sound, bool ownSound);
  71. void TimeSoundAnalysisEditor_computeSpectrogram (TimeSoundAnalysisEditor me);
  72. void TimeSoundAnalysisEditor_computePitch (TimeSoundAnalysisEditor me);
  73. void TimeSoundAnalysisEditor_computeIntensity (TimeSoundAnalysisEditor me);
  74. void TimeSoundAnalysisEditor_computeFormants (TimeSoundAnalysisEditor me);
  75. void TimeSoundAnalysisEditor_computePulses (TimeSoundAnalysisEditor me);
  76. /* End of file TimeSoundAnalysisEditor.h */
  77. #endif