| 1 | #cxx . . $ `<file>/dwtools/TextGrid_extensions.h`/ifndef _TextGrid_extensions_h_ |
| 2 | #define _TextGrid_extensions_h_cxx . . $ `dwtools/TextGrid_extensions.h:2:9`! |
| 3 | /* TextGrid_extensions.h |
| 4 | * |
| 5 | * Copyright (C) 1993-2018,2023 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 | /* |
| 22 | djmw 20020516 GPL header |
| 23 | djmw 20120418 Latest modification |
| 24 | */ |
| 25 | |
| 26 | #include "TextGrid.h"cxx . . $ `<file>/fon/TextGrid.h`/ |
| 27 | |
| 28 | void TextGrid_extendTimecxx . . $ TextGrid_extendTime(a9cb8fb74a18eb06). (TextGridcxx . . $ TextGrid# me, double delta_time, int position); |
| 29 | /* |
| 30 | Extend the begin-time (delta_time<0) or end-time (delta_time>0). |
| 31 | For Point-tiers only the domain will be extended. |
| 32 | Interval tiers will have a new (empty) interval at the start or the end. |
| 33 | */ |
| 34 | |
| 35 | void TextGrid_setTierNamecxx . . $ TextGrid_setTierName(e249637830d6a040). (TextGridcxx . . $ TextGrid# me, integercxx . . $ integer# itier, conststring32cxx . . $ conststring32# newName); |
| 36 | |
| 37 | void TextTier_changeLabelscxx . . $ TextTier_changeLabels(986c5cc42201dc1). (TextTiercxx . . $ TextTier# me, integercxx . . $ integer# from, integercxx . . $ integer# to, conststring32cxx . . $ conststring32# search, conststring32cxx . . $ conststring32# replace, bool use_regexp, integercxx . . $ integer# *nmatches, integercxx . . $ integer# *nstringmatches); |
| 38 | |
| 39 | void IntervalTier_changeLabelscxx . . $ IntervalTier_changeLabels(8be77c005a5d3504). (IntervalTiercxx . . $ IntervalTier# me, integercxx . . $ integer# from, integercxx . . $ integer# to, conststring32cxx . . $ conststring32# search, conststring32cxx . . $ conststring32# replace, bool use_regexp, integercxx . . $ integer# *nmatches, integercxx . . $ integer# *nstringmatches); |
| 40 | |
| 41 | void TextGrid_addInterval_forcecxx . . $ TextGrid_addInterval_force(d24aedbcce6a15af). (TextGridcxx . . $ TextGrid# me, double tmin, double tmax, integercxx . . $ integer# tierNumber, conststring32cxx . . $ conststring32# newLabel); |
| 42 | |
| 43 | void IntervalTier_removeBoundariesBetweenIdenticallyLabeledIntervalscxx . . $ IntervalTier_removeBoundariesBetweenIdenticallyLabeledIntervals(54c17b9c86bced16). (IntervalTiercxx . . $ IntervalTier# me, conststring32cxx . . $ conststring32# label); |
| 44 | |
| 45 | void IntervalTier_combineIntervalsOnLabelMatchcxx . . $ IntervalTier_combineIntervalsOnLabelMatch(54c17b9c86bced16). (IntervalTiercxx . . $ IntervalTier# me, conststring32cxx . . $ conststring32# label); |
| 46 | |
| 47 | void IntervalTier_cutIntervals_minimumDurationcxx . . $ IntervalTier_cutIntervals_minimumDuration(642a4cc6e0bea3b2). (IntervalTiercxx . . $ IntervalTier# me, conststring32cxx . . $ conststring32# label, double minimumDuration); |
| 48 | |
| 49 | void TextGrid_changeLabelscxx . . $ TextGrid_changeLabels(baae53c5a0707e45). (TextGridcxx . . $ TextGrid# me, integercxx . . $ integer# tier, integercxx . . $ integer# from, integercxx . . $ integer# to, conststring32cxx . . $ conststring32# search, conststring32cxx . . $ conststring32# replace, bool use_regexp, integercxx . . $ integer# *nmatches, integercxx . . $ integer# *nstringmatches); |
| 50 | |
| 51 | /* Set the start/end time to a smaller/larger value. |
| 52 | * If mark is null, only times are changed |
| 53 | * If mark != null, mark the previous start/end time |
| 54 | * For a TextTier this involves adding a point with the marker |
| 55 | * For an IntervalTier this involves adding a new interval |
| 56 | */ |
| 57 | void IntervalTier_setLaterEndTimecxx . . $ IntervalTier_setLaterEndTime(466a9cf5ac25c5d4). (IntervalTiercxx . . $ IntervalTier# me, double xmax, conststring32cxx . . $ conststring32# mark); |
| 58 | |
| 59 | void IntervalTier_setEarlierStartTimecxx . . $ IntervalTier_setEarlierStartTime(466a9cf5ac25c5d4). (IntervalTiercxx . . $ IntervalTier# me, double xmin, conststring32cxx . . $ conststring32# mark); |
| 60 | |
| 61 | void TextTier_setLaterEndTimecxx . . $ TextTier_setLaterEndTime(1dc2b2c5408ca811). (TextTiercxx . . $ TextTier# me, double xmax, conststring32cxx . . $ conststring32# mark); |
| 62 | |
| 63 | void TextTier_setEarlierStartTimecxx . . $ TextTier_setEarlierStartTime(1dc2b2c5408ca811). (TextTiercxx . . $ TextTier# me, double xmin, conststring32cxx . . $ conststring32# mark); |
| 64 | |
| 65 | void TextGrid_setEarlierStartTimecxx . . $ TextGrid_setEarlierStartTime(4c96f0945825e957). (TextGridcxx . . $ TextGrid# me, double xmin, conststring32cxx . . $ conststring32# intervalMark, conststring32cxx . . $ conststring32# pointMark); |
| 66 | |
| 67 | void TextGrid_setLaterEndTimecxx . . $ TextGrid_setLaterEndTime(4c96f0945825e957). (TextGridcxx . . $ TextGrid# me, double xmax, conststring32cxx . . $ conststring32# intervalMark, conststring32cxx . . $ conststring32# pointMark); |
| 68 | |
| 69 | |
| 70 | // Precondition: if (preserveTimes) { my xmax <= thy xmin } |
| 71 | // Postcondition: my xmin preserved |
| 72 | void IntervalTiers_append_inplacecxx . . $ IntervalTiers_append_inplace(8edb84b0dc3cebf3). (IntervalTiercxx . . $ IntervalTier# me, IntervalTiercxx . . $ IntervalTier# thee, bool preserveTimes); |
| 73 | |
| 74 | void TextTiers_append_inplacecxx . . $ TextTiers_append_inplace(cda2c7ecdfa6c94a). (TextTiercxx . . $ TextTier# me, TextTiercxx . . $ TextTier# thee, bool preserveTimes); |
| 75 | |
| 76 | void TextGrids_append_inplacecxx . . $ TextGrids_append_inplace(e289f5b2332e88da). (TextGridcxx . . $ TextGrid# me, TextGridcxx . . $ TextGrid# thee, bool preserveTimes); |
| 77 | |
| 78 | autoTextGridcxx . . $ autoTextGrid# TextGrids_to_TextGrid_appendContinuouscxx . . $ TextGrids_to_TextGrid_appendContinuous(b22acd202e9333c7). (OrderedOfcxx . . $ OrderedOf#<structTextGridcxx . . $ structTextGrid#>* me, bool preserveTimes); |
| 79 | |
| 80 | double TextGrid_getTotalDurationOfIntervalsWherecxx . . $ TextGrid_getTotalDurationOfIntervalsWhere(e329799d2b188658). (TextGridcxx . . $ TextGrid# me, integercxx . . $ integer# tierNumber, kMelder_stringcxx . . $ kMelder_string# which, conststring32cxx . . $ conststring32# criterion); |
| 81 | |
| 82 | #endif /* _TextGrid_extensions_h_ */ |