| 1 | /* Spectrum_and_Spectrogram.h |
| 2 | * |
| 3 | * Copyright (C) 1992-2011,2015 David Weenink & 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 | #include "Spectrum.h"cxx . . $ `<file>/fon/Spectrum.h`/ |
| 20 | #include "Spectrogram.h"cxx . . $ `<file>/fon/Spectrogram.h`/ |
| 21 | |
| 22 | autoSpectrumcxx . . $ autoSpectrum# Spectrogram_to_Spectrumcxx . . $ Spectrogram_to_Spectrum(d0c0706ff5d3b1ac). (Spectrogramcxx . . $ Spectrogram# me, double time); |
| 23 | /* |
| 24 | Function: |
| 25 | Create a time slice from the Spectrogram at the time nearest to 'time'. |
| 26 | Postconditions: |
| 27 | result -> xmin == my ymin; // Lowest frequency; often 0. |
| 28 | result -> xmax == my ymax; // Highest frequency. |
| 29 | result -> nx == my ny; // Number of frequency bands. |
| 30 | result -> dx == my dy; // Frequency step. |
| 31 | result -> x1 == my y1; // Centre of first frequency band. |
| 32 | for (iy = 1; iy <= my ny; iy ++) { |
| 33 | result -> z [1] [i] == sqrt (my z [i] ['time']); |
| 34 | result -> z [2] [i] == 0.0; |
| 35 | } |
| 36 | */ |
| 37 | |
| 38 | autoSpectrogramcxx . . $ autoSpectrogram# Spectrum_to_Spectrogramcxx . . $ Spectrum_to_Spectrogram(5977912459a5db57). (Spectrumcxx . . $ Spectrum# me); |
| 39 | /* |
| 40 | Function: |
| 41 | Create a Spectrogram with one time slice from the Spectrum. |
| 42 | Postconditions: |
| 43 | thy xmin = 0.0; thy ymin == my xmin; |
| 44 | thy xmax = 1.0; thy ymax == my xmax; |
| 45 | thy nx == 1; thy ny == my nx; |
| 46 | thy dx == 1.0; thy dy == my dx; |
| 47 | thy x1 == 0.5; thy y1 == my x1; |
| 48 | for (i = 1; i <= my nx; i ++) |
| 49 | thy z [i] [1] == (my z [1] [i]) ^ 2 + (my z [2] [i]) ^ 2; |
| 50 | */ |
| 51 | |
| 52 | /* End of file Spectrum_and_Spectrogram.h */ |