1 /*
2     pvinterp.h:
3 
4     Copyright (C) 1996 Richard Karpen
5 
6     This file is part of Csound.
7 
8     The Csound Library is free software; you can redistribute it
9     and/or modify it under the terms of the GNU Lesser General Public
10     License as published by the Free Software Foundation; either
11     version 2.1 of the License, or (at your option) any later version.
12 
13     Csound is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16     GNU Lesser General Public License for more details.
17 
18     You should have received a copy of the GNU Lesser General Public
19     License along with Csound; if not, write to the Free Software
20     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21     02110-1301 USA
22 */
23 
24 /*                                                              PVINTERP.H  */
25 
26 typedef struct {
27     OPDS    h;
28     MYFLT   *ktimpnt, *ifilno;
29     int32   maxFr, frSiz, prFlg;
30     /* base Frame (in frameData0) and maximum frame on file, ptr to fr, size */
31     MYFLT   frPktim, frPrtim, asr, scale;
32     float   *frPtr;
33     AUXCH   auxch;
34     MYFLT   *lastPhase, *fftBuf;  /* [PVFFTSIZE] FFT works on Real & Imag */
35     MYFLT   *buf;
36 } PVBUFREAD;
37 
38 typedef struct {
39     OPDS    h;
40     MYFLT   *rslt, *ktimpnt, *kfmod, *ifilno,
41             *kfreqscale1, *kfreqscale2, *kampscale1, *kampscale2,
42             *kfreqinterp, *kampinterp;
43     int32   kcnt;
44     int32   baseFr, maxFr, frSiz, prFlg, opBpos;
45      /* base Frame (in frameData0) and maximum frame on file, ptr to fr, size */
46     MYFLT   frPktim, frPrtim, asr, scale, lastPex;
47     float   *frPtr;
48      /* asr is analysis sample rate */
49      /* fft frames per k-time (equals phase change expansion factor) */
50     AUXCH   auxch;      /* manage AUXDS for the following 5 buffer spaces */
51     MYFLT   *lastPhase; /* [PVDATASIZE] Keep track of cum. phase */
52     MYFLT   *fftBuf;    /* [PVFFTSIZE]  FFT works on Real & Imag */
53     MYFLT   *dsBuf;     /* [PVFFTSIZE]  Output of downsampling may be 2x */
54     MYFLT   *outBuf;    /* [PVFFTSIZE]  Output buffer over win length */
55     MYFLT   *window;    /* [PVWINLEN]   Store 1/2 window */
56     PVBUFREAD *pvbufread;
57     PVOC_GLOBALS  *pp;
58 
59 } PVINTERP;
60 
61 typedef struct {
62     OPDS    h;
63     MYFLT   *rslt, *ktimpnt, *kfmod, *ifilno,
64             *kampscale1, *kampscale2, *ispecwp;
65     int32   kcnt;
66     int32   baseFr, maxFr, frSiz, prFlg, opBpos;
67     /* base Frame (in frameData0) and maximum frame on file, ptr to fr, size */
68     MYFLT   frPktim, frPrtim, asr, scale, lastPex;
69     float   *frPtr;
70     /* asr is analysis sample rate */
71     /* fft frames per k-time (equals phase change expansion factor) */
72     AUXCH   auxch;      /* manage AUXDS for the following 5 buffer spaces */
73     MYFLT   *lastPhase; /* [PVDATASIZE] Keep track of cum. phase */
74     MYFLT   *fftBuf;    /* [PVFFTSIZE]  FFT works on Real & Imag */
75     MYFLT   *dsBuf;     /* [PVFFTSIZE]  Output of downsampling may be 2x */
76     MYFLT   *outBuf;    /* [PVFFTSIZE]  Output buffer over win length */
77     MYFLT   *window;    /* [PVWINLEN]   Store 1/2 window */
78     PVBUFREAD *pvbufread;
79     PVOC_GLOBALS  *pp;
80     AUXCH memenv;
81 } PVCROSS;
82 
83