| 1 | /* Cochleagram_and_Excitation.cpp |
| 2 | * |
| 3 | * Copyright (C) 1992-2011,2015,2017 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 | * pb 1993/12/20 |
| 21 | * pb 2002/07/16 GPL |
| 22 | * pb 2011/05/05 type |
| 23 | * pb 2011/05/09 C++ |
| 24 | */ |
| 25 | |
| 26 | #include "Cochleagram_and_Excitation.h"cxx . . $ `<file>/fon/Cochleagram_and_Excitation.h`/ |
| 27 | |
| 28 | autoExcitationcxx . . $ autoExcitation# Cochleagram_to_Excitationcxx . . $ Cochleagram_to_Excitation(84ebc5551000f10c). (Cochleagramcxx . . $ Cochleagram# me, double t) { |
| 29 | try { |
| 30 | integercxx . . $ integer# column = Matrix_xToNearestColumncxx . . $ Matrix_xToNearestColumn(abc7fd41e68a8362). (me, t); |
| 31 | if (column < 1) column = 1; |
| 32 | if (column > mycxx . . $ `melder/melder.h:44:9`! nxcxx . . $ structSampled#nx.) column = mycxx . . $ `melder/melder.h:44:9`! nxcxx . . $ structSampled#nx.; |
| 33 | autoExcitationcxx . . $ autoExcitation# thee = Excitation_createcxx . . $ Excitation_create(f4e2e4701e37a6f3). (mycxx . . $ `melder/melder.h:44:9`! dycxx . . $ structSampledXY#dy., mycxx . . $ `melder/melder.h:44:9`! nycxx . . $ structSampledXY#ny.); |
| 34 | for (integercxx . . $ integer# ifreq = 1; ifreq <= mycxx . . $ `melder/melder.h:44:9`! nycxx . . $ structSampledXY#ny.; ifreq ++) |
| 35 | thycxx . . $ `melder/melder.h:45:9`! zcxx . . $ structMatrix#z. [cxx . . $ automatrix#`operator[]`(2d545b3cb3f8e666).1] [cxx . . $ vector#`operator[]`(8a4599b8835d1ce1).ifreq] = mycxx . . $ `melder/melder.h:44:9`! zcxx . . $ structMatrix#z. [cxx . . $ automatrix#`operator[]`(2d545b3cb3f8e666).ifreq] [cxx . . $ vector#`operator[]`(8a4599b8835d1ce1).column]; |
| 36 | return theecxx . . $ autoSomeThing#autoSomeThing(b79141a71f7bc86f).; |
| 37 | } catch (MelderErrorcxx . . $ MelderError#) { |
| 38 | Melder_throwcxx . . $ `melder/melder_error.h:77:9`! (me, U": slice at time ", t, U" seconds not extracted to Excitation."); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | /* End of file Cochleagram_and_Excitation.cpp */ |