| 1 | /* FormantModelerList.cpp |
| 2 | * |
| 3 | * Copyright (C) 2020 David Weenink |
| 4 | * |
| 5 | * This code is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or (at |
| 8 | * your option) any later version. |
| 9 | * |
| 10 | * This code is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #include "FormantModelerList.h"cxx . . $ `<file>/LPC/FormantModelerList.h`/ |
| 20 | |
| 21 | #include "oo_DESTROY.h"cxx . . $ `<file>/sys/oo_DESTROY.h`/ |
| 22 | #include "FormantModelerList_def.h"cxx . . $ `<file>/LPC/FormantModelerList_def.h`/ |
| 23 | #include "oo_COPY.h"cxx . . $ `<file>/sys/oo_COPY.h`/ |
| 24 | #include "FormantModelerList_def.h"cxx . . $ `<file>/LPC/FormantModelerList_def.h`/ |
| 25 | #include "oo_EQUAL.h"cxx . . $ `<file>/sys/oo_EQUAL.h`/ |
| 26 | #include "FormantModelerList_def.h"cxx . . $ `<file>/LPC/FormantModelerList_def.h`/ |
| 27 | #include "oo_CAN_WRITE_AS_ENCODING.h"cxx . . $ `<file>/sys/oo_CAN_WRITE_AS_ENCODING.h`/ |
| 28 | #include "FormantModelerList_def.h"cxx . . $ `<file>/LPC/FormantModelerList_def.h`/ |
| 29 | #include "oo_WRITE_BINARY.h"cxx . . $ `<file>/sys/oo_WRITE_BINARY.h`/ |
| 30 | #include "FormantModelerList_def.h"cxx . . $ `<file>/LPC/FormantModelerList_def.h`/ |
| 31 | #include "oo_READ_BINARY.h"cxx . . $ `<file>/sys/oo_READ_BINARY.h`/ |
| 32 | #include "FormantModelerList_def.h"cxx . . $ `<file>/LPC/FormantModelerList_def.h`/ |
| 33 | #include "oo_WRITE_TEXT.h"cxx . . $ `<file>/sys/oo_WRITE_TEXT.h`/ |
| 34 | #include "FormantModelerList_def.h"cxx . . $ `<file>/LPC/FormantModelerList_def.h`/ |
| 35 | #include "oo_READ_TEXT.h"cxx . . $ `<file>/sys/oo_READ_TEXT.h`/ |
| 36 | #include "FormantModelerList_def.h"cxx . . $ `<file>/LPC/FormantModelerList_def.h`/ |
| 37 | #include "oo_DESCRIPTION.h"cxx . . $ `<file>/sys/oo_DESCRIPTION.h`/ |
| 38 | #include "FormantModelerList_def.h"cxx . . $ `<file>/LPC/FormantModelerList_def.h`/ |
| 39 | /* |
| 40 | void structFormantModelerListDrawingSpecification :: v1_writeBinary (FILE *_filePointer_) {} |
| 41 | void structFormantModelerList :: v1_writeBinary (FILE *_filePointer_) {} |
| 42 | void structFormantModelerListDrawingSpecification :: v1_readBinary (FILE *_filePointer_, int _formatVersion_) {} |
| 43 | void structFormantModelerList :: v1_readBinary (FILE *_filePointer_, int _formatVersion_) {} |
| 44 | |
| 45 | */ |
| 46 | void structFormantModelerListcxx . . $ structFormantModelerList# :: v1_infocxx . . $ structFormantModelerList#v1_info(49f6e7a06ebc5aa8). () { |
| 47 | // do nothing |
| 48 | }; |
| 49 | |
| 50 | Thing_implementcxx . . $ `sys/Thing.h:65:9`! (FormantModelerList, Function, 0); |
| 51 | Thing_implementcxx . . $ `sys/Thing.h:65:9`! (FormantModelerListDrawingSpecification, Daata, 0); |
| 52 | |
| 53 | autoFormantModelerListcxx . . $ autoFormantModelerList# FormantPath_to_FormantModelerListcxx . . $ FormantPath_to_FormantModelerList(630c9d297f4260bc). (FormantPathcxx . . $ FormantPath# me, double startTime, double endTime, constINTVECcxx . . $ constINTVEC# const& numberOfParametersPerTrack) { |
| 54 | try { |
| 55 | autoFormantModelerListcxx . . $ autoFormantModelerList# thee = Thing_newcxx . . $ `sys/Thing.h:514:9`! (FormantModelerList); |
| 56 | thycxx . . $ `melder/melder.h:45:9`! xmincxx . . $ structFunction#xmin. = startTime; |
| 57 | thycxx . . $ `melder/melder.h:45:9`! xmaxcxx . . $ structFunction#xmax. = endTime; |
| 58 | Melder_requirecxx . . $ `melder/melder_require.h:21:9`! (numberOfParametersPerTrack.size > 0, |
| 59 | U"The number of items in the parameter list should be larger than zero."); |
| 60 | thycxx . . $ `melder/melder.h:45:9`! numberOfTracksPerModelcxx . . $ structFormantModelerList#numberOfTracksPerModel. = numberOfParametersPerTrack.sizecxx . . $ constvector#size.; |
| 61 | integercxx . . $ integer# numberOfZeros = 0; |
| 62 | for (integercxx . . $ integer# ipar = 1; ipar <= numberOfParametersPerTrack.sizecxx . . $ constvector#size.; ipar ++) { |
| 63 | const integercxx . . $ integer# value = numberOfParametersPerTrack [cxx . . $ constvector#`operator[]`(e616e229aa94bfcf).ipar]; |
| 64 | Melder_requirecxx . . $ `melder/melder_require.h:21:9`! (value >= 0, |
| 65 | U"Numbers in the 'Number of parameter list' should be positive."); |
| 66 | if (value == 0) |
| 67 | numberOfZeros += 1; |
| 68 | } |
| 69 | thycxx . . $ `melder/melder.h:45:9`! numberOfParametersPerTrackcxx . . $ structFormantModelerList#numberOfParametersPerTrack. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). copy_INTVECcxx . . $ copy_INTVEC(bcad8fc6381272ce). (numberOfParametersPerTrackcxx . . $ constvectorview#constvectorview(fc39adb4395e9baf).); |
| 70 | thycxx . . $ `melder/melder.h:45:9`! numberOfTracksPerModelcxx . . $ structFormantModelerList#numberOfTracksPerModel. = thycxx . . $ `melder/melder.h:45:9`! numberOfParametersPerTrackcxx . . $ structFormantModelerList#numberOfParametersPerTrack..sizecxx . . $ autovector#size.; |
| 71 | thycxx . . $ `melder/melder.h:45:9`! numberOfModelerscxx . . $ structFormantModelerList#numberOfModelers. = mycxx . . $ `melder/melder.h:44:9`! formantCandidatescxx . . $ structFormantPath#formantCandidates..sizecxx . . $ CollectionOf#size.; |
| 72 | for (integercxx . . $ integer# imodel = 1; imodel <= thycxx . . $ `melder/melder.h:45:9`! numberOfModelerscxx . . $ structFormantModelerList#numberOfModelers.; imodel ++) { |
| 73 | Formantcxx . . $ Formant# formanti = (Formantcxx . . $ Formant#) mycxx . . $ `melder/melder.h:44:9`! formantCandidatescxx . . $ structFormantPath#formantCandidates..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).imodel]; |
| 74 | autoFormantModelercxx . . $ autoFormantModeler# fm = Formant_to_FormantModelercxx . . $ Formant_to_FormantModeler(1823957b022b1ce1). (formanti, startTime, endTime, thycxx . . $ `melder/melder.h:45:9`! numberOfParametersPerTrackcxx . . $ structFormantModelerList#numberOfParametersPerTrack..getcxx . . $ autovector#get(e8d1da7fe68a6585).()); |
| 75 | Thing_setNamecxx . . $ Thing_setName(b5a42e5e01c267b5). (fm.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), Melder_fixedcxx . . $ Melder_fixed(5b9062840a6ade99). (mycxx . . $ `melder/melder.h:44:9`! ceilingscxx . . $ structFormantPath#ceilings. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).imodel], 0)); |
| 76 | thycxx . . $ `melder/melder.h:45:9`! formantModelerscxx . . $ structFormantModelerList#formantModelers.. addItem_movecxx . . $ CollectionOf#addItem_move(bcc0cff787be24fe). (fmcxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f)..movecxx . . $ autoSomeThing#move(25acc3554b7d1642).()); |
| 77 | } |
| 78 | thycxx . . $ `melder/melder.h:45:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. =cxx . . $ autoSomeThing#`operator=`(80cc59814f7161e8). FormantModelerList_to_FormantModelerListDrawingSpecificationcxx . . $ FormantModelerList_to_FormantModelerListDrawingSpecification(3d097f33d677d84f). (thee.getcxx . . $ autoSomeThing#get(34d6acfd341ba7ab).(), 0); |
| 79 | return theecxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f).; |
| 80 | } catch (MelderErrorcxx . . $ MelderError#) { |
| 81 | Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (me, U": FormantModelerList not created."); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | void FormantModelerList_showBest3cxx . . $ FormantModelerList_showBest3(e8a5cb3b026db669). (FormantModelerListcxx . . $ FormantModelerList# me) { |
| 86 | autoINTVECcxx . . $ autoINTVEC# best3 = FormantModelerList_getBest3cxx . . $ FormantModelerList_getBest3(72b1d347b0f415bf). (me); |
| 87 | INTVECcxx . . $ INTVEC# drawingOrder = mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). drawingOrdercxx . . $ structFormantModelerListDrawingSpecification#drawingOrder..getcxx . . $ autovector#get(e8d1da7fe68a6585).(); |
| 88 | drawingOrdercxx . . $ vectorview#vectorview(eac9d6ec4c4bfecd)..partcxx . . $ vector#part(ae267db9e2c04be7). (1, 3) <<=cxx . . $ `operator<<=`(2db3a4bfcf125477). best3cxx . . $ constvectorview#constvectorview(5c6f246bf1d99401)..allcxx . . $ autovector#all(a26726dad87555bb).(); |
| 89 | mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). numberOfModelersToDrawcxx . . $ structFormantModelerListDrawingSpecification#numberOfModelersToDraw. = 3; |
| 90 | } |
| 91 | |
| 92 | void FormantModelerList_markBest3cxx . . $ FormantModelerList_markBest3(e8a5cb3b026db669). (FormantModelerListcxx . . $ FormantModelerList# me) { |
| 93 | /* |
| 94 | 3 The smoothest F1 score |
| 95 | 2 The smoothest F1 & F2 score |
| 96 | 1 the smoothest F1 & F2 & F3 score |
| 97 | */ |
| 98 | autoINTVECcxx . . $ autoINTVEC# best3 = FormantModelerList_getBest3cxx . . $ FormantModelerList_getBest3(72b1d347b0f415bf). (me); |
| 99 | for (integercxx . . $ integer# imodel = 1; imodel <= mycxx . . $ `melder/melder.h:44:9`! numberOfModelerscxx . . $ structFormantModelerList#numberOfModelers.; imodel ++) { |
| 100 | autoMelderStringcxx . . $ autoMelderString# bestcxx . . $ autoMelderString#autoMelderString(49f6e7a06ebc5aa8).; |
| 101 | if (imodel == best3 [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).1]) { |
| 102 | MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& best, U"F123"); |
| 103 | } |
| 104 | if (imodel == best3 [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).2]) { |
| 105 | MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& best, ( best.stringcxx . . $ MelderString#string. && best.stringcxx . . $ MelderString#string. [0] ? U"&F12" : U"F12" )); |
| 106 | } |
| 107 | if (imodel == best3 [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).3]) { |
| 108 | MelderString_appendcxx . . $ MelderString_append(65be51a793e0ff96). (& best, ( best.stringcxx . . $ MelderString#string. && best.stringcxx . . $ MelderString#string. [0] ? U"&F1" : U"F1" )); |
| 109 | } |
| 110 | mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). midTopTextcxx . . $ structFormantModelerListDrawingSpecification#midTopText. [cxx . . $ _autostringautovector#`operator[]`(f191be2b65019068).imodel] =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (best.stringcxx . . $ MelderString#string.); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | integercxx . . $ integer# FormantModelerList_getBestModelIndexcxx . . $ FormantModelerList_getBestModelIndex(9ef8538d0a5d0e13). (FormantModelerListcxx . . $ FormantModelerList# me, integercxx . . $ integer# fromTrack, integercxx . . $ integer# toTrack) { |
| 115 | double wmin = stdcxx . . $ std/::numeric_limitscxx . . $ std/numeric_limits#<double>::maxcxx . . $ std/numeric_limits#max(e4aa362e81f92a46).(); |
| 116 | integercxx . . $ integer# best = 0; |
| 117 | for (integercxx . . $ integer# imodel = 1; imodel <= mycxx . . $ `melder/melder.h:44:9`! numberOfModelerscxx . . $ structFormantModelerList#numberOfModelers.; imodel ++) { |
| 118 | FormantModelercxx . . $ FormantModeler# fm = mycxx . . $ `melder/melder.h:44:9`! formantModelerscxx . . $ structFormantModelerList#formantModelers..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).imodel]; |
| 119 | const double w = FormantModeler_getStresscxx . . $ FormantModeler_getStress(ca00b7081cb84bed). (fm, fromTrack, toTrack, 0, mycxx . . $ `melder/melder.h:44:9`! varianceExponentcxx . . $ structFormantModelerList#varianceExponent.); |
| 120 | if (w < wmin) { |
| 121 | wmin = w; |
| 122 | best = imodel; |
| 123 | } |
| 124 | } |
| 125 | return best; |
| 126 | } |
| 127 | |
| 128 | autoINTVECcxx . . $ autoINTVEC# FormantModelerList_getBest3cxx . . $ FormantModelerList_getBest3(72b1d347b0f415bf). (FormantModelerListcxx . . $ FormantModelerList# me) { |
| 129 | /* |
| 130 | 3 The least stress F1 score |
| 131 | 2 The least (summed) stress F1 & F2 score |
| 132 | 1 the least (summed) stress F1 & F2 & F3 score |
| 133 | */ |
| 134 | autoINTVECcxx . . $ autoINTVEC# best = raw_INTVECcxx . . $ raw_INTVEC(dab5d3ef28d6a25). (3); |
| 135 | double stressF1, stressF1F2, stressF1F2F3; |
| 136 | stressF1 = stressF1F2 = stressF1F2F3 = stdcxx . . $ std/::numeric_limitscxx . . $ std/numeric_limits#<double>::maxcxx . . $ std/numeric_limits#max(e4aa362e81f92a46).(); |
| 137 | for (integercxx . . $ integer# imodel = 1; imodel <= mycxx . . $ `melder/melder.h:44:9`! numberOfModelerscxx . . $ structFormantModelerList#numberOfModelers.; imodel ++) { |
| 138 | FormantModelercxx . . $ FormantModeler# fm = mycxx . . $ `melder/melder.h:44:9`! formantModelerscxx . . $ structFormantModelerList#formantModelers..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).imodel]; |
| 139 | double stress = FormantModeler_getStresscxx . . $ FormantModeler_getStress(ca00b7081cb84bed). (fm, 1, 1, 0, mycxx . . $ `melder/melder.h:44:9`! varianceExponentcxx . . $ structFormantModelerList#varianceExponent.); |
| 140 | if (stress < stressF1) { |
| 141 | stressF1 = stress; |
| 142 | best [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).3] = imodel; |
| 143 | } |
| 144 | stress = FormantModeler_getStresscxx . . $ FormantModeler_getStress(ca00b7081cb84bed). (fm, 1, 2, 0, mycxx . . $ `melder/melder.h:44:9`! varianceExponentcxx . . $ structFormantModelerList#varianceExponent.); |
| 145 | if (stress < stressF1F2) { |
| 146 | stressF1F2 = stress; |
| 147 | best [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).2] = imodel; |
| 148 | } |
| 149 | stress = FormantModeler_getStresscxx . . $ FormantModeler_getStress(ca00b7081cb84bed). (fm, 1, 3, 0, mycxx . . $ `melder/melder.h:44:9`! varianceExponentcxx . . $ structFormantModelerList#varianceExponent.); |
| 150 | if (stress < stressF1F2F3) { |
| 151 | stressF1F2F3 = stress; |
| 152 | best [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).1] = imodel; |
| 153 | } |
| 154 | } |
| 155 | return bestcxx . . $ autovector#autovector(d33c649a3aceae2f).; |
| 156 | } |
| 157 | |
| 158 | static void getMatrixGridLayoutcxx . . $ getMatrixGridLayout(b76a3bd1263aa692). (integercxx . . $ integer# numberOfModels, integercxx . . $ integer# *out_numberOfRows, integercxx . . $ integer# *out_numberOfColums) { |
| 159 | integercxx . . $ integer# ncol = 1; |
| 160 | integercxx . . $ integer# nrow = 3; |
| 161 | if (numberOfModels > 3) { |
| 162 | nrow = 1 + Melder_ifloorcxx . . $ `melder/melder_ftoi.h:33:9`! (sqrtcxx . . $ sqrt(fee4f1d22bc8e617). (numberOfModels - 0.5)); |
| 163 | ncol = 1 + Melder_ifloorcxx . . $ `melder/melder_ftoi.h:33:9`! ((numberOfModels - 1) / nrow); |
| 164 | } |
| 165 | if (out_numberOfRows) |
| 166 | *out_numberOfRows = nrow; |
| 167 | if (out_numberOfColums) |
| 168 | *out_numberOfColums = ncol; |
| 169 | } |
| 170 | |
| 171 | void FormantModelerList_getMatrixGridLayoutcxx . . $ FormantModelerList_getMatrixGridLayout(7382ebf916454240). (FormantModelerListcxx . . $ FormantModelerList# me, integercxx . . $ integer# *out_numberOfRows, integercxx . . $ integer# *out_numberOfColums) { |
| 172 | getMatrixGridLayoutcxx . . $ getMatrixGridLayout(b76a3bd1263aa692). (mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). numberOfModelersToDrawcxx . . $ structFormantModelerListDrawingSpecification#numberOfModelersToDraw., out_numberOfRows, out_numberOfColums); |
| 173 | } |
| 174 | |
| 175 | void FormantModelerListDrawingSpecification_showAllcxx . . $ FormantModelerListDrawingSpecification_showAll(c0354a5ae321a01b). (FormantModelerListDrawingSpecificationcxx . . $ FormantModelerListDrawingSpecification# me) { |
| 176 | mycxx . . $ `melder/melder.h:44:9`! numberOfModelersToDrawcxx . . $ structFormantModelerListDrawingSpecification#numberOfModelersToDraw. = mycxx . . $ `melder/melder.h:44:9`! numberOfModelerscxx . . $ structFormantModelerListDrawingSpecification#numberOfModelers.; |
| 177 | to_INTVEC_outcxx . . $ to_INTVEC_out(6ad8d2059d77987c). (mycxx . . $ `melder/melder.h:44:9`! drawingOrdercxx . . $ structFormantModelerListDrawingSpecification#drawingOrder..getcxx . . $ autovector#get(e8d1da7fe68a6585).()); |
| 178 | } |
| 179 | |
| 180 | integercxx . . $ integer# FormantModelerListDrawingSpecification_getNumberOfShowncxx . . $ FormantModelerListDrawingSpecification_getNumberOfShown(1f30ffdd605cd094). (FormantModelerListDrawingSpecificationcxx . . $ FormantModelerListDrawingSpecification# me) { |
| 181 | return mycxx . . $ `melder/melder.h:44:9`! numberOfModelersToDrawcxx . . $ structFormantModelerListDrawingSpecification#numberOfModelersToDraw.; |
| 182 | } |
| 183 | |
| 184 | void FormantModelerListDrawingSpecification_setModelerColourscxx . . $ FormantModelerListDrawingSpecification_setModelerColours(4deb9a5a203be082). (FormantModelerListDrawingSpecificationcxx . . $ FormantModelerListDrawingSpecification# me, conststring32cxx . . $ conststring32# oddFormantColour_string, conststring32cxx . . $ conststring32# evenFormantColour_string, conststring32cxx . . $ conststring32# selectedCandidateColour_string) { |
| 185 | mycxx . . $ `melder/melder.h:44:9`! oddFormantColourcxx . . $ structFormantModelerListDrawingSpecification#oddFormantColour. =cxx . . $ MelderColour#`operator=`(c703a8332cdaf975). MelderColour_fromColourNameOrNumberStringOrRGBStringcxx . . $ MelderColour_fromColourNameOrNumberStringOrRGBString(ddf3ca81f5326095). (oddFormantColour_string); |
| 186 | mycxx . . $ `melder/melder.h:44:9`! evenFormantColourcxx . . $ structFormantModelerListDrawingSpecification#evenFormantColour. =cxx . . $ MelderColour#`operator=`(c703a8332cdaf975). MelderColour_fromColourNameOrNumberStringOrRGBStringcxx . . $ MelderColour_fromColourNameOrNumberStringOrRGBString(ddf3ca81f5326095). (evenFormantColour_string); |
| 187 | mycxx . . $ `melder/melder.h:44:9`! selectedCandidateColourcxx . . $ structFormantModelerListDrawingSpecification#selectedCandidateColour. =cxx . . $ MelderColour#`operator=`(c703a8332cdaf975). MelderColour_fromColourNameOrNumberStringOrRGBStringcxx . . $ MelderColour_fromColourNameOrNumberStringOrRGBString(ddf3ca81f5326095). (selectedCandidateColour_string); |
| 188 | } |
| 189 | |
| 190 | autoFormantModelerListDrawingSpecificationcxx . . $ autoFormantModelerListDrawingSpecification# FormantModelerList_to_FormantModelerListDrawingSpecificationcxx . . $ FormantModelerList_to_FormantModelerListDrawingSpecification(3d097f33d677d84f). (FormantModelerListcxx . . $ FormantModelerList# me, integercxx . . $ integer# defaultModeler) { |
| 191 | try { |
| 192 | autoFormantModelerListDrawingSpecificationcxx . . $ autoFormantModelerListDrawingSpecification# thee = Thing_newcxx . . $ `sys/Thing.h:514:9`! (FormantModelerListDrawingSpecification); |
| 193 | thycxx . . $ `melder/melder.h:45:9`! numberOfModelerscxx . . $ structFormantModelerListDrawingSpecification#numberOfModelers. = mycxx . . $ `melder/melder.h:44:9`! numberOfModelerscxx . . $ structFormantModelerList#numberOfModelers.; |
| 194 | thycxx . . $ `melder/melder.h:45:9`! drawingOrdercxx . . $ structFormantModelerListDrawingSpecification#drawingOrder. =cxx . . $ autovector#`operator=`(f4f0443dbfdd1e40). to_INTVECcxx . . $ to_INTVEC(dab5d3ef28d6a25). (mycxx . . $ `melder/melder.h:44:9`! numberOfModelerscxx . . $ structFormantModelerList#numberOfModelers.); |
| 195 | thycxx . . $ `melder/melder.h:45:9`! numberOfModelersToDrawcxx . . $ structFormantModelerListDrawingSpecification#numberOfModelersToDraw. = mycxx . . $ `melder/melder.h:44:9`! numberOfModelerscxx . . $ structFormantModelerList#numberOfModelers.; |
| 196 | thycxx . . $ `melder/melder.h:45:9`! boxLineWidthcxx . . $ structFormantModelerListDrawingSpecification#boxLineWidth. = 4.0; |
| 197 | thycxx . . $ `melder/melder.h:45:9`! oddFormantColourcxx . . $ structFormantModelerListDrawingSpecification#oddFormantColour. =cxx . . $ MelderColour#`operator=`(3ab3c3f6bc5cdda1). Melder_REDcxx . . $ Melder_RED.; |
| 198 | thycxx . . $ `melder/melder.h:45:9`! evenFormantColourcxx . . $ structFormantModelerListDrawingSpecification#evenFormantColour. =cxx . . $ MelderColour#`operator=`(3ab3c3f6bc5cdda1). Melder_MAROONcxx . . $ Melder_MAROON.; |
| 199 | thycxx . . $ `melder/melder.h:45:9`! selectedCandidateColourcxx . . $ structFormantModelerListDrawingSpecification#selectedCandidateColour. =cxx . . $ MelderColour#`operator=`(3ab3c3f6bc5cdda1). Melder_REDcxx . . $ Melder_RED.; |
| 200 | thycxx . . $ `melder/melder.h:45:9`! midTopText_colourcxx . . $ structFormantModelerListDrawingSpecification#midTopText_colour. =cxx . . $ MelderColour#`operator=`(3ab3c3f6bc5cdda1). Melder_PURPLEcxx . . $ Melder_PURPLE.; |
| 201 | autoSTRVECcxx . . $ autoSTRVEC# midTopTextcxx . . $ _autostringautovector#_autostringautovector(1624ee8275b10bda). (mycxx . . $ `melder/melder.h:44:9`! numberOfModelerscxx . . $ structFormantModelerList#numberOfModelers.); |
| 202 | for (integercxx . . $ integer# imodel = 1; imodel <= mycxx . . $ `melder/melder.h:44:9`! numberOfModelerscxx . . $ structFormantModelerList#numberOfModelers.; imodel ++) |
| 203 | midTopText [cxx . . $ _autostringautovector#`operator[]`(f191be2b65019068).imodel] =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (U""); |
| 204 | thycxx . . $ `melder/melder.h:45:9`! midTopTextcxx . . $ structFormantModelerListDrawingSpecification#midTopText. =cxx . . $ _autostringautovector#`operator=`(150f7ba7aac25b7e). copy_STRVECcxx . . $ copy_STRVEC(cfa8029879abedac). (midTopTextcxx . . $ _conststringvector#_conststringvector(93d9e701af42cb0d)..getcxx . . $ _autostringautovector#get(9d56076a9ef7dd02).()); |
| 205 | return theecxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f).; |
| 206 | } catch (MelderErrorcxx . . $ MelderError#) { |
| 207 | Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (U"No FormantModelerListDrawingSpecification created."); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | void FormantModelerList_drawInMatrixGridcxx . . $ FormantModelerList_drawInMatrixGrid(353f2bf567ce7e16). (FormantModelerListcxx . . $ FormantModelerList# me, Graphicscxx . . $ Graphics# g, integercxx . . $ integer# nrow, integercxx . . $ integer# ncol, kGraphicsMatrixOrigincxx . . $ kGraphicsMatrixOrigin# origin, double spaceBetweenFraction_x, double spaceBetweenFraction_y, integercxx . . $ integer# fromFormant, integercxx . . $ integer# toFormant, double fmax, double yGridLineEvery_Hz, double xCursor, double yCursor, integercxx . . $ integer# numberOfParameters, bool drawErrorBars, double barwidth_s, bool drawEstimated, bool garnish) { |
| 212 | if (nrow <= 0 || ncol <= 0) |
| 213 | FormantModelerList_getMatrixGridLayoutcxx . . $ FormantModelerList_getMatrixGridLayout(7382ebf916454240). (me, & nrow, & ncol); |
| 214 | const double fmin = 0.0; |
| 215 | double x1NDC, x2NDC, y1NDC, y2NDC; |
| 216 | Graphics_inqViewportcxx . . $ Graphics_inqViewport(962850f2031ce0d0). (g, & x1NDC, & x2NDC, & y1NDC, & y2NDC); |
| 217 | const double fontSize_old = Graphics_inqFontSizecxx . . $ Graphics_inqFontSize(f906975acce41a59). (g), newFontSize = 8.0; |
| 218 | auto getXtick = [] (Graphicscxx . . $ Graphics# gg, double fontSize) { |
| 219 | const double margin = 2.8 * fontSize * gg -> resolutioncxx . . $ structGraphics#resolution. / 72.0; |
| 220 | const double wDC = (gg -> d_x2DCcxx . . $ structGraphics#d_x2DC. - gg -> d_x1DCcxx . . $ structGraphics#d_x1DC.) / (gg -> d_x2wNDCcxx . . $ structGraphics#d_x2wNDC. - gg -> d_x1wNDCcxx . . $ structGraphics#d_x1wNDC.) * (gg -> d_x2NDCcxx . . $ structGraphics#d_x2NDC. - gg -> d_x1NDCcxx . . $ structGraphics#d_x1NDC.); |
| 221 | double dx = 1.5 * margin / wDC; |
| 222 | const double xTick = 0.06 * dx; |
| 223 | Melder_clipRightcxx . . $ Melder_clipRight(5b63ce711df1ade7). (& dx, 0.4); |
| 224 | return xTick / (1.0 - 2.0 * dx); |
| 225 | }; |
| 226 | auto getYtick = [] (Graphicscxx . . $ Graphics# gg, double fontSize) { |
| 227 | const double margin = 2.8 * fontSize * gg -> resolutioncxx . . $ structGraphics#resolution. / 72.0; |
| 228 | const double hDC = integer_abscxx . . $ integer_abs(8ce0d1b217db7fd1). (gg->d_y2DCcxx . . $ structGraphics#d_y2DC. - gg->d_y1DCcxx . . $ structGraphics#d_y1DC.) / (gg->d_y2wNDCcxx . . $ structGraphics#d_y2wNDC. - gg->d_y1wNDCcxx . . $ structGraphics#d_y1wNDC.) * (gg->d_y2NDCcxx . . $ structGraphics#d_y2NDC. - gg-> d_y1NDCcxx . . $ structGraphics#d_y1NDC.); |
| 229 | double dy = margin / hDC; |
| 230 | const double yTick = 0.09 * dy; |
| 231 | Melder_clipRightcxx . . $ Melder_clipRight(5b63ce711df1ade7). (& dy, 0.4); |
| 232 | return yTick / (1.0 - 2.0 * dy); |
| 233 | }; |
| 234 | const bool fillUp = ( origin == kGraphicsMatrixOrigincxx . . $ kGraphicsMatrixOrigin#::BOTTOM_LEFTcxx . . $ kGraphicsMatrixOrigin#BOTTOM_LEFT. || origin == kGraphicsMatrixOrigincxx . . $ kGraphicsMatrixOrigin#::BOTTOM_RIGHTcxx . . $ kGraphicsMatrixOrigin#BOTTOM_RIGHT. ); |
| 235 | const bool rightToLeft = ( origin == kGraphicsMatrixOrigincxx . . $ kGraphicsMatrixOrigin#::TOP_RIGHTcxx . . $ kGraphicsMatrixOrigin#TOP_RIGHT. || origin ==kGraphicsMatrixOrigincxx . . $ kGraphicsMatrixOrigin#:: BOTTOM_RIGHTcxx . . $ kGraphicsMatrixOrigin#BOTTOM_RIGHT. ); |
| 236 | const double vp_width = x2NDC - x1NDC, vp_height = y2NDC - y1NDC; |
| 237 | const double vpi_width = vp_width / (ncol + (ncol - 1) * spaceBetweenFraction_x); |
| 238 | const double vpi_height = vp_height / (nrow + (nrow - 1) * spaceBetweenFraction_y); |
| 239 | for (integercxx . . $ integer# index = 1; index <= mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification.->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab).numberOfModelersToDrawcxx . . $ structFormantModelerListDrawingSpecification#numberOfModelersToDraw.; index ++) { |
| 240 | const integercxx . . $ integer# irow1 = 1 + (index - 1) / ncol; // left-to-right + top-to-bottom |
| 241 | const integercxx . . $ integer# icol1 = 1 + (index - 1) % ncol; |
| 242 | const integercxx . . $ integer# icol = ( rightToLeft ? ncol - icol1 + 1 : icol1 ); |
| 243 | const integercxx . . $ integer# irow = ( fillUp ? nrow - irow1 + 1 : irow1 ); |
| 244 | const double vpi_x1 = x1NDC + (icol - 1) * vpi_width * (1.0 + spaceBetweenFraction_x); |
| 245 | const double vpi_x2 = vpi_x1 + vpi_width; |
| 246 | const double vpi_y2 = y2NDC - (irow - 1) * vpi_height * (1.0 + spaceBetweenFraction_y); |
| 247 | const double vpi_y1 = vpi_y2 - vpi_height; |
| 248 | const integercxx . . $ integer# imodel = mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). drawingOrdercxx . . $ structFormantModelerListDrawingSpecification#drawingOrder. [cxx . . $ autovector#`operator[]`(8a4599b8835d1ce1).index]; |
| 249 | FormantModelercxx . . $ FormantModeler# fm = mycxx . . $ `melder/melder.h:44:9`! formantModelerscxx . . $ structFormantModelerList#formantModelers..atcxx . . $ CollectionOf#at. [cxx . . $ ArrayOf#`operator[]`(a7f36fee1ae21897).imodel]; |
| 250 | Graphics_setViewportcxx . . $ Graphics_setViewport(72bdb7937dbb13da). (g, vpi_x1, vpi_x2, vpi_y1, vpi_y2); |
| 251 | Graphics_setWindowcxx . . $ Graphics_setWindow(72bdb7937dbb13da). (g, fm -> xmincxx . . $ structFunction#xmin., fm -> xmaxcxx . . $ structFunction#xmax., 0.0, fmax); |
| 252 | FormantModeler_speckle_insidecxx . . $ FormantModeler_speckle_inside(7e8023a0dd1611b4). (fm, g, fm -> xmincxx . . $ structFunction#xmin., fm -> xmaxcxx . . $ structFunction#xmax., fmax, fromFormant, toFormant, |
| 253 | drawEstimated, 0.0, drawErrorBars, mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). oddFormantColourcxx . . $ structFormantModelerListDrawingSpecification#oddFormantColour., mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). evenFormantColourcxx . . $ structFormantModelerListDrawingSpecification#evenFormantColour.); |
| 254 | |
| 255 | Graphics_setLineWidthcxx . . $ Graphics_setLineWidth(2514a1c07b6be5e2). (g, mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). boxLineWidthcxx . . $ structFormantModelerListDrawingSpecification#boxLineWidth.); |
| 256 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (g, (imodel == mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). selectedCandidatecxx . . $ structFormantModelerListDrawingSpecification#selectedCandidate. ? |
| 257 | mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). selectedCandidateColourcxx . . $ structFormantModelerListDrawingSpecification#selectedCandidateColour. : Melder_BLACKcxx . . $ Melder_BLACK. )); |
| 258 | Graphics_rectanglecxx . . $ Graphics_rectangle(72bdb7937dbb13da). (g, fm -> xmincxx . . $ structFunction#xmin., fm -> xmaxcxx . . $ structFunction#xmax., fmin, fmax); |
| 259 | Graphics_setLineTypecxx . . $ Graphics_setLineType(9abe41586e87648d). (g, Graphics_DRAWNcxx . . $ `sys/Graphics.h:287:9`!); |
| 260 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (g, Melder_BLACKcxx . . $ Melder_BLACK.); |
| 261 | Graphics_setLineWidthcxx . . $ Graphics_setLineWidth(2514a1c07b6be5e2). (g, 1.0); |
| 262 | /* |
| 263 | Mark name & roughness |
| 264 | */ |
| 265 | Graphics_setTextAlignmentcxx . . $ Graphics_setTextAlignment(a697afee548943ae). (g, kGraphics_horizontalAlignmentcxx . . $ kGraphics_horizontalAlignment#::RIGHTcxx . . $ kGraphics_horizontalAlignment#RIGHT., Graphics_HALFcxx . . $ `sys/Graphics.h:253:9`!); |
| 266 | Graphics_textcxx . . $ Graphics_text(bd267f534253e388). (g, fm -> xmaxcxx . . $ structFunction#xmax. - 0.05 * (fm -> xmaxcxx . . $ structFunction#xmax. - fm -> xmincxx . . $ structFunction#xmin.), |
| 267 | fmax - 0.05 * fmax, fm -> namecxx . . $ structThing#name..getcxx . . $ _autostring#get(5a2a78a048fb49a8).()); |
| 268 | double w = FormantModeler_getStresscxx . . $ FormantModeler_getStress(ca00b7081cb84bed). (fm, fromFormant, toFormant, 0, mycxx . . $ `melder/melder.h:44:9`! varianceExponentcxx . . $ structFormantModelerList#varianceExponent.); |
| 269 | Graphics_setTextAlignmentcxx . . $ Graphics_setTextAlignment(a697afee548943ae). (g, kGraphics_horizontalAlignmentcxx . . $ kGraphics_horizontalAlignment#::LEFTcxx . . $ kGraphics_horizontalAlignment#LEFT., Graphics_HALFcxx . . $ `sys/Graphics.h:253:9`!); |
| 270 | Graphics_textcxx . . $ Graphics_text(8e1820bb471fc8c8). (g, fm -> xmincxx . . $ structFunction#xmin. + 0.05 * (fm -> xmaxcxx . . $ structFunction#xmax. - fm -> xmincxx . . $ structFunction#xmin.), |
| 271 | fmax - 0.05 * fmax, Melder_fixedcxx . . $ Melder_fixed(5b9062840a6ade99). (w, 2)); |
| 272 | Graphics_setTextAlignmentcxx . . $ Graphics_setTextAlignment(a697afee548943ae). (g, kGraphics_horizontalAlignmentcxx . . $ kGraphics_horizontalAlignment#::CENTREcxx . . $ kGraphics_horizontalAlignment#CENTRE., Graphics_HALFcxx . . $ `sys/Graphics.h:253:9`!); |
| 273 | conststring32cxx . . $ conststring32# midTopText = mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). midTopTextcxx . . $ structFormantModelerListDrawingSpecification#midTopText. [cxx . . $ _autostringautovector#`operator[]`(f191be2b65019068).imodel].getcxx . . $ _autostring#get(5a2a78a048fb49a8).(); |
| 274 | if (midTopText && midTopText [0]) { |
| 275 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (g,mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). midTopText_colourcxx . . $ structFormantModelerListDrawingSpecification#midTopText_colour.); |
| 276 | Graphics_textcxx . . $ Graphics_text(bd267f534253e388). (g, fm -> xmincxx . . $ structFunction#xmin. + 0.5 * (fm -> xmaxcxx . . $ structFunction#xmax. - fm -> xmincxx . . $ structFunction#xmin.), |
| 277 | fmax - 0.05 * fmax, mycxx . . $ `melder/melder.h:44:9`! drawingSpecificationcxx . . $ structFormantModelerList#drawingSpecification. ->cxx . . $ autoSomeThing#`operator->`(34d6acfd341ba7ab). midTopTextcxx . . $ structFormantModelerListDrawingSpecification#midTopText. [cxx . . $ _autostringautovector#`operator[]`(f191be2b65019068).imodel].getcxx . . $ _autostring#get(5a2a78a048fb49a8).()); |
| 278 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (g, Melder_BLACKcxx . . $ Melder_BLACK.); |
| 279 | } |
| 280 | |
| 281 | if (garnish) { |
| 282 | const double xTick = (double) getXtick (cxx . . $ FormantModelerList_drawInMatrixGrid(353f2bf567ce7e16).$anonymous_type_0#`operator()`(fcca6b35155eb7d1).g, newFontSize) * (fm -> xmaxcxx . . $ structFunction#xmax. - fm -> xmincxx . . $ structFunction#xmin.); |
| 283 | const double yTick = (double) getYtick (cxx . . $ FormantModelerList_drawInMatrixGrid(353f2bf567ce7e16).$anonymous_type_1#`operator()`(fcca6b35155eb7d1).g, newFontSize) * (fmax - 0.0); |
| 284 | if (icol == 1 && irow % 2 == 1) { |
| 285 | Graphics_setTextAlignmentcxx . . $ Graphics_setTextAlignment(a697afee548943ae). (g, kGraphics_horizontalAlignmentcxx . . $ kGraphics_horizontalAlignment#::RIGHTcxx . . $ kGraphics_horizontalAlignment#RIGHT., Graphics_HALFcxx . . $ `sys/Graphics.h:253:9`!); |
| 286 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (g, fm -> xmincxx . . $ structFunction#xmin. - xTick, fmax, fm -> xmincxx . . $ structFunction#xmin., fmax); |
| 287 | Graphics_textcxx . . $ Graphics_text(bd267f534253e388). (g, fm -> xmincxx . . $ structFunction#xmin. - xTick, fmax, Melder_iroundcxx . . $ `melder/melder_ftoi.h:78:9`! (fmax)); |
| 288 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (g, fm -> xmincxx . . $ structFunction#xmin. - xTick, 0.0, fm -> xmincxx . . $ structFunction#xmin., 0.0); |
| 289 | Graphics_textcxx . . $ Graphics_text(8e1820bb471fc8c8). (g, fm -> xmincxx . . $ structFunction#xmin. - xTick, 0.0, U"0.0"); |
| 290 | } else if (icol == ncol && irow % 2 == 0) { |
| 291 | Graphics_setTextAlignmentcxx . . $ Graphics_setTextAlignment(a697afee548943ae). (g, kGraphics_horizontalAlignmentcxx . . $ kGraphics_horizontalAlignment#::LEFTcxx . . $ kGraphics_horizontalAlignment#LEFT., Graphics_HALFcxx . . $ `sys/Graphics.h:253:9`!); |
| 292 | Graphics_textcxx . . $ Graphics_text(bd267f534253e388). (g, fm -> xmaxcxx . . $ structFunction#xmax., fmax, Melder_iroundcxx . . $ `melder/melder_ftoi.h:78:9`! (fmax)); |
| 293 | Graphics_textcxx . . $ Graphics_text(8e1820bb471fc8c8). (g, fm -> xmaxcxx . . $ structFunction#xmax., 0.0, U"0.0"); |
| 294 | } |
| 295 | if (irow == 1 && icol % 2 == 0) { |
| 296 | Graphics_setTextAlignmentcxx . . $ Graphics_setTextAlignment(a697afee548943ae). (g, kGraphics_horizontalAlignmentcxx . . $ kGraphics_horizontalAlignment#::CENTREcxx . . $ kGraphics_horizontalAlignment#CENTRE., Graphics_BOTTOMcxx . . $ `sys/Graphics.h:252:9`!); |
| 297 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (g, fm -> xmincxx . . $ structFunction#xmin., fmax, fm -> xmincxx . . $ structFunction#xmin., fmax + yTick); |
| 298 | Graphics_textcxx . . $ Graphics_text(8e1820bb471fc8c8). (g, fm -> xmincxx . . $ structFunction#xmin., fmax + yTick, Melder_fixedcxx . . $ Melder_fixed(5b9062840a6ade99). (fm -> xmincxx . . $ structFunction#xmin., 3)); |
| 299 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (g, fm -> xmaxcxx . . $ structFunction#xmax., fmax, fm -> xmaxcxx . . $ structFunction#xmax., fmax + yTick); |
| 300 | Graphics_textcxx . . $ Graphics_text(8e1820bb471fc8c8). (g, fm -> xmaxcxx . . $ structFunction#xmax., fmax + yTick, Melder_fixedcxx . . $ Melder_fixed(5b9062840a6ade99). (fm -> xmaxcxx . . $ structFunction#xmax., 3)); |
| 301 | } else if (irow == nrow && icol % 2 == 1) { |
| 302 | Graphics_setTextAlignmentcxx . . $ Graphics_setTextAlignment(a697afee548943ae). (g, kGraphics_horizontalAlignmentcxx . . $ kGraphics_horizontalAlignment#::CENTREcxx . . $ kGraphics_horizontalAlignment#CENTRE., Graphics_TOPcxx . . $ `sys/Graphics.h:254:9`!); |
| 303 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (g, fm -> xmincxx . . $ structFunction#xmin., 0.0, fm -> xmincxx . . $ structFunction#xmin., 0.0 - yTick); |
| 304 | Graphics_textcxx . . $ Graphics_text(8e1820bb471fc8c8). (g, fm -> xmincxx . . $ structFunction#xmin., 0.0 - yTick, Melder_fixedcxx . . $ Melder_fixed(5b9062840a6ade99). (fm -> xmincxx . . $ structFunction#xmin., 3)); |
| 305 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (g, fm -> xmaxcxx . . $ structFunction#xmax., 0.0, fm -> xmaxcxx . . $ structFunction#xmax., 0.0 - yTick); |
| 306 | Graphics_textcxx . . $ Graphics_text(8e1820bb471fc8c8). (g, fm -> xmaxcxx . . $ structFunction#xmax., 0.0 - yTick, Melder_fixedcxx . . $ Melder_fixed(5b9062840a6ade99). (fm -> xmaxcxx . . $ structFunction#xmax., 3)); |
| 307 | } |
| 308 | double yGridLine_Hz = yGridLineEvery_Hz; |
| 309 | Graphics_setLineTypecxx . . $ Graphics_setLineType(9abe41586e87648d). (g, Graphics_DOTTEDcxx . . $ `sys/Graphics.h:288:9`!); |
| 310 | while (yGridLine_Hz < 0.95 * fmax) { |
| 311 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (g, fm -> xmincxx . . $ structFunction#xmin., yGridLine_Hz, fm -> xmaxcxx . . $ structFunction#xmax., yGridLine_Hz); |
| 312 | yGridLine_Hz += yGridLineEvery_Hz; |
| 313 | } |
| 314 | /* |
| 315 | Cursors |
| 316 | */ |
| 317 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (g, Melder_REDcxx . . $ Melder_RED.); |
| 318 | Graphics_setLineTypecxx . . $ Graphics_setLineType(9abe41586e87648d). (g, Graphics_DASHEDcxx . . $ `sys/Graphics.h:289:9`!); |
| 319 | if (xCursor > fm -> xmincxx . . $ structFunction#xmin. && xCursor <= fm -> xmaxcxx . . $ structFunction#xmax.) |
| 320 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (g, xCursor, 0.0, xCursor, fmax); |
| 321 | if (yCursor > 0.0 && yCursor < fmax) |
| 322 | Graphics_linecxx . . $ Graphics_line(72bdb7937dbb13da). (g, fm -> xmincxx . . $ structFunction#xmin., yCursor, fm -> xmaxcxx . . $ structFunction#xmax., yCursor); |
| 323 | Graphics_setColourcxx . . $ Graphics_setColour(eb47b9513d3f4721). (g, Melder_BLACKcxx . . $ Melder_BLACK.); |
| 324 | Graphics_setLineTypecxx . . $ Graphics_setLineType(9abe41586e87648d). (g, Graphics_DRAWNcxx . . $ `sys/Graphics.h:287:9`!); |
| 325 | } |
| 326 | } |
| 327 | Graphics_setFontSizecxx . . $ Graphics_setFontSize(2514a1c07b6be5e2). (g, fontSize_old); |
| 328 | Graphics_setViewportcxx . . $ Graphics_setViewport(72bdb7937dbb13da). (g, x1NDC, x2NDC, y1NDC, y2NDC); |
| 329 | } |
| 330 | |
| 331 | /* End of file FormantModelerList.cpp */ |