| 1 | #ifndef _Cepstrum_h_ |
| 2 | #define _Cepstrum_h_ |
| 3 | /* Cepstrum.h |
| 4 | * |
| 5 | * Copyright (C) 1994-2020 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 20010111 |
| 23 | djmw 20020812 GPL header |
| 24 | djmw 20121117 Latest modification. |
| 25 | */ |
| 26 | |
| 27 | /* |
| 28 | The Cepstrum is a sequence of real numbers. |
| 29 | It is the spectrum of the power spectrum of a (sound) signal. |
| 30 | */ |
| 31 | |
| 32 | #include "Matrix.h" |
| 33 | |
| 34 | Thing_define (Cepstrum, Matrix) { |
| 35 | double v_getValueAtSample (integer isamp, integer which, int units) const |
| 36 | override; |
| 37 | }; |
| 38 | |
| 39 | #include "Cepstrum_enums.h" |
| 40 | |
| 41 | /* |
| 42 | xmin // Lowest quefrency. |
| 43 | xmax // Highest quefrency. |
| 44 | nx // Number of quefrencies. |
| 45 | dx // Quefrency step. |
| 46 | x1 // First quefrency. |
| 47 | |
| 48 | ymin = ymax = dy = y1 = 1 |
| 49 | ny = 1 |
| 50 | */ |
| 51 | |
| 52 | autoCepstrum Cepstrum_create (double qmax, integer nq); |
| 53 | |
| 54 | void Cepstrum_draw (constCepstrum me, Graphics g, double qmin, double qmax, double minimum, double maximum, bool power, bool garnish); |
| 55 | |
| 56 | void Cepstrum_drawLinear (constCepstrum me, Graphics g, double qmin, double qmax, double minimum, double maximum, bool garnish); |
| 57 | |
| 58 | #endif /* _Cepstrum_h_ */ |