Debian Codegraph @

LPC/FormantPathEditor.h

raw symbols SCIP
1 #cxx . . $ `<file>/LPC/FormantPathEditor.h`/ifndef _FormantPathEditor_h_
2 #define _FormantPathEditor_h_cxx . . $ `LPC/FormantPathEditor.h:2:9`!
3 /* FormantPathEditor.h
4 *
5 * Copyright (C) 2020-2023 David Weenink, 2022 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
21 #include "FormantPathArea.h"cxx . . $ `<file>/LPC/FormantPathArea.h`/
22 #include "SoundArea.h"cxx . . $ `<file>/foned/SoundArea.h`/
23 #include "TextGridArea.h"cxx . . $ `<file>/foned/TextGridArea.h`/
24
25 Thing_definecxx . . $ classFormantPathEditor. (FormantPathEditor, FunctionEditor) {
26 DEFINE_FunctionAreacxx . . $ structFunctionEditor#functionAreas. (1, FormantPathArea, formantPathArea)
27 DEFINE_FunctionAreacxx . . $ structFunctionEditor#functionAreas. (2, SoundArea, soundArea)
28 DEFINE_FunctionAreacxx . . $ structFunctionEditor#functionAreas. (3, TextGridArea, textGridArea)
29
30 FormantPathcxx . . $ FormantPath# formantPathcxx . . $ structFormantPathEditor#formantPath(455ff8d8cd4b76c5).() { return static_cast <FormantPathcxx . . $ FormantPath#> (ourcxx . . $ `melder/melder.h:42:9`! datacxx . . $ structDataGui#data(e8441e10bf3a9c6e).()); }
31 autoFormantcxx . . $ autoFormant# previousFormantcxx . . $ structFormantPathEditor#previousFormant.;
32 Graphics_Viewportcxx . . $ Graphics_Viewport# selectionViewer_viewportcxx . . $ structFormantPathEditor#selectionViewer_viewport.;
33 integercxx . . $ integer# selectedCandidatecxx . . $ structFormantPathEditor#selectedCandidate. = 0;
34 GuiMenuItemcxx . . $ GuiMenuItem# navigateSettingsButtoncxx . . $ structFormantPathEditor#navigateSettingsButton., navigateNextButtoncxx . . $ structFormantPathEditor#navigateNextButton., navigatePreviousButtoncxx . . $ structFormantPathEditor#navigatePreviousButton.;
35
36 void v1_infocxx . . $ structFormantPathEditor#v1_info(49f6e7a06ebc5aa8). ()
37 override;
38 void v_createMenuscxx . . $ structFormantPathEditor#v_createMenus(49f6e7a06ebc5aa8). ()
39 override;
40 void v_createMenuItems_helpcxx . . $ structFormantPathEditor#v_createMenuItems_help(6ea9c8c6ea2f58a9). (EditorMenucxx . . $ EditorMenu# menu)
41 override;
42 void v1_dataChangedcxx . . $ structFormantPathEditor#v1_dataChanged(c0154a85f79216c7). (Editorcxx . . $ Editor# sender) override {
43 FormantPathEditor_Parentcxx . . $ FormantPathEditor_Parent# :: v1_dataChangedcxx . . $ structFunctionEditor#v1_dataChanged(c0154a85f79216c7). (sender);
44 if (ourcxx . . $ `melder/melder.h:42:9`! soundAreacxx . . $ structFormantPathEditor#soundArea(f75ec617f241a3e6).())
45 ourcxx . . $ `melder/melder.h:42:9`! soundAreacxx . . $ structFormantPathEditor#soundArea(f75ec617f241a3e6).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). functionChangedcxx . . $ structFunctionArea#functionChanged(18c8ee0a6873bee4). (nullptr);
46 ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). functionChangedcxx . . $ structFunctionArea#functionChanged(18c8ee0a6873bee4). (nullptr);
47 ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). d_formantcxx . . $ structSoundAnalysisArea#d_formant. =cxx . . $ autoSomeThing#`operator=`(80cc59814f7161e8). FormantPath_extractFormantcxx . . $ FormantPath_extractFormant(c1105e94bde1773c). (ourcxx . . $ `melder/melder.h:42:9`! formantPathcxx . . $ structFormantPathEditor#formantPath(455ff8d8cd4b76c5).()); // BUG: also on window changed
48 if (ourcxx . . $ `melder/melder.h:42:9`! textGridAreacxx . . $ structFormantPathEditor#textGridArea(fd24f7f644037235).())
49 ourcxx . . $ `melder/melder.h:42:9`! textGridAreacxx . . $ structFormantPathEditor#textGridArea(fd24f7f644037235).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). functionChangedcxx . . $ structFunctionArea#functionChanged(18c8ee0a6873bee4). (nullptr);
50 }
51 void v_distributeAreascxx . . $ structFormantPathEditor#v_distributeAreas(49f6e7a06ebc5aa8). () override {
52 if (ourcxx . . $ `melder/melder.h:42:9`! soundAreacxx . . $ structFormantPathEditor#soundArea(f75ec617f241a3e6).() && ourcxx . . $ `melder/melder.h:42:9`! textGridAreacxx . . $ structFormantPathEditor#textGridArea(fd24f7f644037235).()) {
53 ourcxx . . $ `melder/melder.h:42:9`! soundAreacxx . . $ structFormantPathEditor#soundArea(f75ec617f241a3e6).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). setGlobalYRange_fractioncxx . . $ structFunctionArea#setGlobalYRange_fraction(bc12c9ec15586e6a). (0.7, 1.0);
54 ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). setGlobalYRange_fractioncxx . . $ structFunctionArea#setGlobalYRange_fraction(bc12c9ec15586e6a). (0.2, 0.7);
55 ourcxx . . $ `melder/melder.h:42:9`! textGridAreacxx . . $ structFormantPathEditor#textGridArea(fd24f7f644037235).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). setGlobalYRange_fractioncxx . . $ structFunctionArea#setGlobalYRange_fraction(bc12c9ec15586e6a). (0.0, 0.2);
56 } else if (ourcxx . . $ `melder/melder.h:42:9`! soundAreacxx . . $ structFormantPathEditor#soundArea(f75ec617f241a3e6).()) {
57 ourcxx . . $ `melder/melder.h:42:9`! soundAreacxx . . $ structFormantPathEditor#soundArea(f75ec617f241a3e6).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). setGlobalYRange_fractioncxx . . $ structFunctionArea#setGlobalYRange_fraction(bc12c9ec15586e6a). (0.6, 1.0);
58 ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). setGlobalYRange_fractioncxx . . $ structFunctionArea#setGlobalYRange_fraction(bc12c9ec15586e6a). (0.0, 0.6);
59 } else if (ourcxx . . $ `melder/melder.h:42:9`! textGridAreacxx . . $ structFormantPathEditor#textGridArea(fd24f7f644037235).()) {
60 ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). setGlobalYRange_fractioncxx . . $ structFunctionArea#setGlobalYRange_fraction(bc12c9ec15586e6a). (0.3, 1.0);
61 ourcxx . . $ `melder/melder.h:42:9`! textGridAreacxx . . $ structFormantPathEditor#textGridArea(fd24f7f644037235).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). setGlobalYRange_fractioncxx . . $ structFunctionArea#setGlobalYRange_fraction(bc12c9ec15586e6a). (0.0, 0.3);
62 } else {
63 ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). setGlobalYRange_fractioncxx . . $ structFunctionArea#setGlobalYRange_fraction(bc12c9ec15586e6a). (0.1, 1.0);
64 }
65 }
66 void v_drawcxx . . $ structFormantPathEditor#v_draw(49f6e7a06ebc5aa8). () override {
67 if (ourcxx . . $ `melder/melder.h:42:9`! soundAreacxx . . $ structFormantPathEditor#soundArea(f75ec617f241a3e6).()) {
68 FunctionArea_prepareCanvascxx . . $ FunctionArea_prepareCanvas(88b39197b202d92f). (ourcxx . . $ `melder/melder.h:42:9`! soundAreacxx . . $ structFormantPathEditor#soundArea(f75ec617f241a3e6).().getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).());
69 if (ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). instancePref_pulses_showcxx . . $ structSoundAnalysisArea#instancePref_pulses_show(50ce9a9e25b4a850).())
70 ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). v_draw_analysis_pulsescxx . . $ structSoundAnalysisArea#v_draw_analysis_pulses(49f6e7a06ebc5aa8). ();
71 FunctionArea_drawInsidecxx . . $ FunctionArea_drawInside(88b39197b202d92f). (ourcxx . . $ `melder/melder.h:42:9`! soundAreacxx . . $ structFormantPathEditor#soundArea(f75ec617f241a3e6).().getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).());
72 if (ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). hasContentToShowcxx . . $ structSoundAnalysisArea#hasContentToShow(c9857a73d68e59ba).()) {
73 FunctionArea_prepareCanvascxx . . $ FunctionArea_prepareCanvas(88b39197b202d92f). (ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).().getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).());
74 ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). v_draw_analysiscxx . . $ structSoundAnalysisArea#v_draw_analysis(49f6e7a06ebc5aa8). ();
75 }
76 } else {
77 FunctionArea_prepareCanvascxx . . $ FunctionArea_prepareCanvas(88b39197b202d92f). (ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).().getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).());
78 ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).() ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). v_draw_analysis_formantscxx . . $ structFormantPathArea#v_draw_analysis_formants(49f6e7a06ebc5aa8). ();
79 }
80 if (ourcxx . . $ `melder/melder.h:42:9`! textGridAreacxx . . $ structFormantPathEditor#textGridArea(fd24f7f644037235).())
81 FunctionArea_drawOnecxx . . $ FunctionArea_drawOne(88b39197b202d92f). (ourcxx . . $ `melder/melder.h:42:9`! textGridAreacxx . . $ structFormantPathEditor#textGridArea(fd24f7f644037235).().getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).());
82 }
83 bool v_hasSelectionViewercxx . . $ structFormantPathEditor#v_hasSelectionViewer(c9857a73d68e59ba). () override { return true; }
84 void v_drawSelectionViewercxx . . $ structFormantPathEditor#v_drawSelectionViewer(49f6e7a06ebc5aa8). ()
85 override;
86 void v_drawRealTimeSelectionViewercxx . . $ structFormantPathEditor#v_drawRealTimeSelectionViewer(ba8836b59fb42830). (double /* time */) override {
87 v_drawSelectionViewercxx . . $ structFormantPathEditor#v_drawSelectionViewer(49f6e7a06ebc5aa8). (); // avoid discontinuity during play
88 }
89 void v_clickSelectionViewercxx . . $ structFormantPathEditor#v_clickSelectionViewer(bc12c9ec15586e6a). (double xWC, double yWC)
90 override;
91 void v_playcxx . . $ structFormantPathEditor#v_play(bc12c9ec15586e6a). (double startTime, double endTime)
92 override;
93 bool v_hasTextcxx . . $ structFormantPathEditor#v_hasText(c9857a73d68e59ba). ()
94 override { return false; }
95 void v_updateTextcxx . . $ structFormantPathEditor#v_updateText(49f6e7a06ebc5aa8). ()
96 override { };
97 conststring32cxx . . $ conststring32# v_selectionViewerNamecxx . . $ structFormantPathEditor#v_selectionViewerName(1912f6684645c851). ()
98 override { return U"Formant candidates"; }
99 void v_drawLegendscxx . . $ structFormantPathEditor#v_drawLegends(49f6e7a06ebc5aa8). () override {
100 FormantPathAreacxx . . $ FormantPathArea# you = ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).().getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).();
101 const bool showAnalyses = ( yourcxx . . $ `melder/melder.h:46:9`! endWindowcxx . . $ structFunctionArea#endWindow(21b6c25e127938e2).() - yourcxx . . $ `melder/melder.h:46:9`! startWindowcxx . . $ structFunctionArea#startWindow(21b6c25e127938e2).() <= yourcxx . . $ `melder/melder.h:46:9`! instancePref_longestAnalysiscxx . . $ structSoundAnalysisArea#instancePref_longestAnalysis(21b6c25e127938e2).() );
102 if (showAnalyses)
103 FunctionArea_drawLegendcxx . . $ FunctionArea_drawLegend(b4cb387346b51cd7). (ourcxx . . $ `melder/melder.h:42:9`! formantPathAreacxx . . $ structFormantPathEditor#formantPathArea(e5a7ab802631ed92).().getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(),
104 yourcxx . . $ `melder/melder.h:46:9`! instancePref_spectrogram_showcxx . . $ structSoundAnalysisArea#instancePref_spectrogram_show(50ce9a9e25b4a850).() ? FunctionArea_legend_GREYScxx . . $ `foned/FunctionArea.h:249:10`! U" %%derived spectrogram" : U"",
105 1.2 *cxx . . $ `operator*`(b464376f9cf8932a). Melder_BLACKcxx . . $ Melder_BLACK.,
106 yourcxx . . $ `melder/melder.h:46:9`! instancePref_intensity_showcxx . . $ structSoundAnalysisArea#instancePref_intensity_show(50ce9a9e25b4a850).() ? FunctionArea_legend_LINEScxx . . $ `foned/FunctionArea.h:244:10`! U" %%derived intensity" : U"",
107 1.2 *cxx . . $ `operator*`(b464376f9cf8932a). Melder_GREENcxx . . $ Melder_GREEN.,
108 yourcxx . . $ `melder/melder.h:46:9`! instancePref_pitch_showcxx . . $ structSoundAnalysisArea#instancePref_pitch_show(50ce9a9e25b4a850).() ? FunctionArea_legend_LINES_SPECKLEScxx . . $ `foned/FunctionArea.h:246:10`! U" %%derived pitch" : U"",
109 1.2 *cxx . . $ `operator*`(b464376f9cf8932a). Melder_BLUEcxx . . $ Melder_BLUE.,
110 FunctionArea_legend_SPECKLEScxx . . $ `foned/FunctionArea.h:245:10`! U" ##modifiable FormantPath",
111 1.2 *cxx . . $ `operator*`(b464376f9cf8932a). Melder_REDcxx . . $ Melder_RED.
112 );
113 if (ourcxx . . $ `melder/melder.h:42:9`! soundAreacxx . . $ structFormantPathEditor#soundArea(f75ec617f241a3e6).())
114 FunctionArea_drawLegendcxx . . $ FunctionArea_drawLegend(b4cb387346b51cd7). (ourcxx . . $ `melder/melder.h:42:9`! soundAreacxx . . $ structFormantPathEditor#soundArea(f75ec617f241a3e6).().getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(),
115 FunctionArea_legend_WAVEFORMcxx . . $ `foned/FunctionArea.h:248:10`! U" %%non-modifiable copy of sound",
116 DataGui_defaultForegroundColourcxx . . $ DataGui_defaultForegroundColour(7d058e310f398cfa). (ourcxx . . $ `melder/melder.h:42:9`! soundAreacxx . . $ structFormantPathEditor#soundArea(f75ec617f241a3e6).().getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), false)
117 );
118 if (ourcxx . . $ `melder/melder.h:42:9`! textGridAreacxx . . $ structFormantPathEditor#textGridArea(fd24f7f644037235).())
119 FunctionArea_drawLegendcxx . . $ FunctionArea_drawLegend(b4cb387346b51cd7). (ourcxx . . $ `melder/melder.h:42:9`! textGridAreacxx . . $ structFormantPathEditor#textGridArea(fd24f7f644037235).().getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(),
120 FunctionArea_legend_TEXTGRIDcxx . . $ `foned/FunctionArea.h:250:10`! U" %%non-modifiable copy of TextGrid",
121 DataGui_defaultForegroundColourcxx . . $ DataGui_defaultForegroundColour(7d058e310f398cfa). (ourcxx . . $ `melder/melder.h:42:9`! textGridAreacxx . . $ structFormantPathEditor#textGridArea(fd24f7f644037235).().getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), false)
122 );
123 }
124
125 #include "FormantPathEditor_prefs.h"cxx . . $ `<file>/LPC/FormantPathEditor_prefs.h`/
126 };
127
128 autoFormantPathEditorcxx . . $ autoFormantPathEditor# FormantPathEditor_createcxx . . $ FormantPathEditor_create(63cecf2aa6e9941d). (conststring32cxx . . $ conststring32# title, FormantPathcxx . . $ FormantPath# formantPath, Soundcxx . . $ Sound# sound, TextGridcxx . . $ TextGrid# textgrid);
129
130 /* End of file FormantPathEditor.h */
131 #endif