| 1 | /* Manipulation_def.h |
| 2 | * |
| 3 | * Copyright (C) 1992-2006,2008,2011,2015-2018,2022,2023 Paul Boersma |
| 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. |
| 13 | * See the GNU 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 | |
| 20 | #define ooSTRUCT Manipulation |
| 21 | oo_DEFINE_CLASS (Manipulation, Function) |
| 22 | |
| 23 | #if oo_READING |
| 24 | oo_VERSION_UNTIL (4) |
| 25 | oo_OBJECT (Sound, 0, sound) |
| 26 | oo_VERSION_ELSE_UNTIL (5) |
| 27 | oo_OBJECT (Sound, Melder_debug == 25 ? 2 : 0, sound) |
| 28 | oo_VERSION_ELSE |
| 29 | oo_OBJECT (Sound, 2, sound) |
| 30 | oo_VERSION_END |
| 31 | #else |
| 32 | oo_OBJECT (Sound, 2, sound) |
| 33 | #endif |
| 34 | oo_OBJECT (PointProcess, 0, pulses) |
| 35 | oo_OBJECT (PitchTier, 0, pitch) |
| 36 | |
| 37 | oo_FROM (1) |
| 38 | oo_OBJECT (IntensityTier, 0, dummyIntensity) |
| 39 | oo_ENDFROM |
| 40 | |
| 41 | oo_FROM (2) |
| 42 | oo_OBJECT (DurationTier, 0, duration) |
| 43 | oo_ENDFROM |
| 44 | |
| 45 | oo_FROM (3) |
| 46 | /* |
| 47 | * Make sure that the spectrogram is not written, |
| 48 | * but allow it to be read (a legacy of writing but not reading the version 3 stuff). |
| 49 | */ |
| 50 | #if oo_WRITING |
| 51 | { autoImage save = dummySpectrogram.move(); |
| 52 | #endif |
| 53 | oo_OBJECT (Image, 0, dummySpectrogram) |
| 54 | #if oo_WRITING |
| 55 | dummySpectrogram = save.move(); } |
| 56 | #endif |
| 57 | oo_OBJECT (FormantTier, 0, dummyFormantTier) |
| 58 | oo_OBJECT (Daata, 0, dummy1) |
| 59 | oo_OBJECT (Daata, 0, dummy2) |
| 60 | oo_OBJECT (Daata, 0, dummy3) |
| 61 | oo_ENDFROM |
| 62 | |
| 63 | oo_FROM (4) |
| 64 | oo_DOUBLE (dummy10) |
| 65 | oo_OBJECT (Pitch, 0, dummyPitchAnalysis) |
| 66 | oo_DOUBLE (dummy11) |
| 67 | oo_DOUBLE (dummy12) |
| 68 | oo_OBJECT (Intensity, 0, dummyIntensityAnalysis) |
| 69 | oo_OBJECT (Formant, 1, dummyFormantAnalysis) |
| 70 | oo_INT16 (dummy4) |
| 71 | oo_DOUBLE (dummy5) |
| 72 | oo_DOUBLE (dummy6) |
| 73 | oo_DOUBLE (dummy7) |
| 74 | oo_DOUBLE (dummy8) |
| 75 | oo_DOUBLE (dummy9) |
| 76 | oo_ENDFROM |
| 77 | |
| 78 | #if ! oo_READING && ! oo_WRITING && ! oo_COMPARING |
| 79 | oo_OBJECT (LPC, 0, lpc) |
| 80 | #endif |
| 81 | |
| 82 | #if oo_DECLARING |
| 83 | int v_domainQuantity () const |
| 84 | override { return MelderQuantity_TIME_SECONDS; } |
| 85 | void v_shiftX (double xfrom, double xto) |
| 86 | override; |
| 87 | void v_scaleX (double xminfrom, double xmaxfrom, double xminto, double xmaxto) |
| 88 | override; |
| 89 | #endif |
| 90 | |
| 91 | oo_END_CLASS (Manipulation) |
| 92 | #undef ooSTRUCT |
| 93 | |
| 94 | |
| 95 | /* End of file Manipulation_def.h */ |