1 /* 2 vpvoc.h: 3 4 Copyright (C) 1992 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 typedef struct { 25 FUNC *function, *nxtfunction; 26 MYFLT d; 27 int32 cnt; 28 } TSEG; 29 30 typedef struct { 31 OPDS h; 32 MYFLT *argums[VARGMAX]; 33 TSEG *cursegp; 34 FUNC *outfunc; 35 int32 nsegs; 36 AUXCH auxch; 37 } TABLESEG; 38 39 typedef struct { 40 OPDS h; 41 MYFLT *rslt, *ktimpnt, *kfmod, *ifilno, *ispecwp, *isegtab; 42 char *strarg; 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 TABLESEG *tableseg; 57 AUXCH auxtab; /* For table is all else fails */ 58 PVOC_GLOBALS *pp; 59 AUXCH memenv; 60 } VPVOC; 61 62