1 /* 2 ugens6.h: 3 4 Copyright (C) 1991-2000 Barry Vercoe, John ffitch, Jens Groh, 5 Hans Mikelson, Istvan Varga 6 7 This file is part of Csound. 8 9 The Csound Library is free software; you can redistribute it 10 and/or modify it under the terms of the GNU Lesser General Public 11 License as published by the Free Software Foundation; either 12 version 2.1 of the License, or (at your option) any later version. 13 14 Csound is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 GNU Lesser General Public License for more details. 18 19 You should have received a copy of the GNU Lesser General Public 20 License along with Csound; if not, write to the Free Software 21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 22 02110-1301 USA 23 */ 24 25 /* UGENS6.H */ 26 27 typedef struct { 28 OPDS h; 29 MYFLT *kr, *asig, *ilen; 30 unsigned int len; 31 } DOWNSAMP; 32 33 typedef struct { 34 OPDS h; 35 MYFLT *ar, *ksig; 36 } UPSAMP; 37 38 typedef struct { 39 OPDS h; 40 MYFLT *rslt, *xsig, *istor; 41 MYFLT prev; 42 } INDIFF; 43 44 typedef struct { 45 OPDS h; /* JPff Nov 2015 */ 46 MYFLT *rslt, *xsig, *istor, *imode, *istart; /* IV - Sep 5 2002 */ 47 int init_k; 48 MYFLT prev; 49 } INTERP; 50 51 typedef struct { 52 OPDS h; 53 MYFLT *xr, *xsig, *xgate, *ival, *istor; 54 MYFLT state; 55 int audiogate; 56 } SAMPHOLD; 57 58 typedef struct { 59 OPDS h; 60 MYFLT *ar, *asig, *idlt, *istor; 61 MYFLT *curp; 62 int32 npts; 63 AUXCH auxch; 64 } DELAY; 65 66 typedef struct DELAYR { 67 OPDS h; 68 MYFLT *ar, *indx, *idlt, *istor; 69 MYFLT *curp; 70 uint32_t npts; 71 AUXCH auxch; 72 struct DELAYR *next_delayr; /* fifo for delayr pointers by Jens Groh */ 73 } DELAYR; 74 75 typedef struct { 76 OPDS h; 77 MYFLT *ar, *xdlt, *indx; 78 DELAYR *delayr; 79 } DELTAP; 80 81 typedef struct { 82 OPDS h; 83 MYFLT *ar, *adlt, *iwsize, *indx; 84 int wsize; 85 double d2x; 86 DELAYR *delayr; 87 } DELTAPX; 88 89 typedef struct { 90 OPDS h; 91 MYFLT *asig; 92 DELAYR *delayr; 93 } DELAYW; 94 95 typedef struct { 96 OPDS h; 97 MYFLT *ar, *asig, *istor; 98 MYFLT sav1; 99 } DELAY1; 100 101 typedef struct { 102 OPDS h; 103 MYFLT *ar, *asig, *krvt, *ilpt, *istor, *insmps; 104 MYFLT coef, prvt, *pntr; 105 AUXCH auxch; 106 } COMB; 107 108 typedef struct { 109 OPDS h; 110 MYFLT *ar, *asig, *krvt, *istor; 111 MYFLT c1, c2, c3, c4, c5, c6, prvt; 112 MYFLT *p1, *p2, *p3, *p4, *p5, *p6; 113 MYFLT *adr1, *adr2, *adr3, *adr4, *adr5, *adr6; 114 AUXCH auxch; 115 int32 revlpsum; 116 AUXCH revlpsiz; 117 } REVERB; 118 119 typedef struct { 120 OPDS h; 121 MYFLT *r1, *r2, *r3, *r4, *asig, *kx, *ky, *ifn, *imode, *ioffset; 122 MYFLT xmul, xoff; 123 FUNC *ftp; 124 } PAN; 125 126 int downset(CSOUND *, DOWNSAMP *p); 127 int downsamp(CSOUND *, DOWNSAMP *p); 128 int upsamp(CSOUND *, UPSAMP *p); 129 int a_k_set(CSOUND *, INTERP *p); 130 int interpset(CSOUND *, INTERP *p); 131 int interp(CSOUND *, INTERP *p); 132 int indfset(CSOUND *, INDIFF *p); 133 int kntegrate(CSOUND *, INDIFF *p); 134 int integrate(CSOUND *, INDIFF *p); 135 int kdiff(CSOUND *, INDIFF *p); 136 int diff(CSOUND *, INDIFF *p); 137 int samphset(CSOUND *, SAMPHOLD *p); 138 int ksmphold(CSOUND *, SAMPHOLD *p); 139 int samphold(CSOUND *, SAMPHOLD *p); 140 int delset(CSOUND *, DELAY *p); 141 int delrset(CSOUND *, DELAYR *p); 142 int delwset(CSOUND *, DELAYW *p); 143 int tapset(CSOUND *, DELTAP *p); 144 int delay(CSOUND *, DELAY *p); 145 int delayr(CSOUND *, DELAYR *p); 146 int delayw(CSOUND *, DELAYW *p); 147 int deltap(CSOUND *, DELTAP *p); 148 int deltapi(CSOUND *, DELTAP *p); 149 int deltapn(CSOUND *, DELTAP *p); 150 int deltap3(CSOUND *, DELTAP *p); 151 int tapxset(CSOUND *, DELTAPX *p); 152 int deltapx(CSOUND *, DELTAPX *p); 153 int deltapxw(CSOUND *, DELTAPX *p); 154 int del1set(CSOUND *, DELAY1 *p); 155 int delay1(CSOUND *, DELAY1 *p); 156 int cmbset(CSOUND *, COMB *p); 157 int comb(CSOUND *, COMB *p); 158 int invcomb(CSOUND *, COMB *p); 159 int alpass(CSOUND *, COMB *p); 160 void reverbinit(CSOUND *); 161 int rvbset(CSOUND *, REVERB *p); 162 int reverb(CSOUND *, REVERB *p); 163 int panset(CSOUND *, PAN *p); 164 int pan(CSOUND *, PAN *p); 165 166