vdelay.h

Go to the documentation of this file.
00001 /*
00002     vdelay.h:
00003 
00004     Copyright (C) 1994 Paris Smaragdis, John ffitch
00005 
00006     This file is part of Csound.
00007 
00008     The Csound Library is free software; you can redistribute it
00009     and/or modify it under the terms of the GNU Lesser General Public
00010     License as published by the Free Software Foundation; either
00011     version 2.1 of the License, or (at your option) any later version.
00012 
00013     Csound is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU Lesser General Public License for more details.
00017 
00018     You should have received a copy of the GNU Lesser General Public
00019     License along with Csound; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00021     02111-1307 USA
00022 */
00023 
00024 /*      vdelay, multitap, reverb2 coded by Paris Smaragdis              */
00025 /*      Berklee College of Music Csound development team                */
00026 /*      Copyright (c) December 1994.  All rights reserved               */
00027 
00028 typedef struct {
00029         OPDS    h;
00030         MYFLT   *sr, *ain, *adel, *imaxd, *istod;
00031         AUXCH   aux;
00032         long    left;
00033 } VDEL;
00034 
00035 typedef struct {
00036         OPDS    h;
00037         MYFLT   *sr1, *sr2, *sr3, *sr4;
00038         MYFLT   *ain1, *ain2, *ain3, *ain4, *adel, *imaxd, *iquality, *istod;
00039         AUXCH   aux1, aux2, aux3, aux4;
00040         int     interp_size;
00041         long    left;
00042 } VDELXQ;
00043 
00044 typedef struct {
00045         OPDS    h;
00046         MYFLT   *sr1, *sr2, *ain1, *ain2, *adel, *imaxd, *iquality, *istod;
00047         AUXCH   aux1, aux2;
00048         int     interp_size;
00049         long    left;
00050 } VDELXS;
00051 
00052 typedef struct {
00053         OPDS    h;
00054         MYFLT   *sr1, *ain1, *adel, *imaxd, *iquality, *istod;
00055         AUXCH   aux1;
00056         int     interp_size;
00057         long    left;
00058 } VDELX;
00059 
00060 typedef struct {
00061         OPDS    h;
00062         MYFLT   *sr, *ain, *ndel[VARGMAX];
00063         AUXCH   aux;
00064         long    left, max;
00065 } MDEL;
00066 
00067 #if 0
00068 
00069 #define Combs   6
00070 #define Alpas   5
00071 
00072 typedef struct {
00073         OPDS    h;
00074         MYFLT   *out, *in, *time, *hdif, *istor;
00075         MYFLT   *cbuf_cur[Combs], *abuf_cur[Alpas];
00076         MYFLT   c_time[Combs], c_gain[Combs], a_time[Alpas], a_gain[Alpas];
00077         MYFLT   z[Combs], g[Combs];
00078         AUXCH   temp;
00079         AUXCH   caux[Combs], aaux[Alpas];
00080         MYFLT   prev_time, prev_hdif;
00081 } STVB;
00082 
00083 /*      nreverb coded by Paris Smaragdis 1994 and Richard Karpen 1998 */
00084 
00085 typedef struct {
00086         OPDS    h;
00087         MYFLT   *out, *in, *time, *hdif, *istor;
00088         MYFLT   *cbuf_cur[Combs], *abuf_cur[Alpas];
00089         MYFLT   c_time[Combs], c_gain[Combs], a_time[Alpas], a_gain[Alpas];
00090         MYFLT   z[Combs], g[Combs];
00091         AUXCH   temp;
00092         AUXCH   caux[Combs], aaux[Alpas];
00093         MYFLT   prev_time, prev_hdif;
00094 } NREV;
00095 
00096 #endif
00097 
00098 /*
00099  * Based on nreverb coded by Paris Smaragdis 1994 and Richard Karpen 1998.
00100  * Changes made to allow user-defined comb and alpas constant in a ftable.
00101  * Sept 2000, by rasmus ekman.
00102  * Memory allocation fixed April 2001 by JPff
00103  */
00104 typedef struct {
00105         OPDS    h;
00106         MYFLT   *out, *in, *time, *hdif, *istor;
00107         MYFLT   *inumCombs, *ifnCombs, *inumAlpas, *ifnAlpas;
00108         /* Used to be [Combs]- and [Alpas]-sized arrays */
00109         int     numCombs, numAlpas;
00110         MYFLT   **cbuf_cur, **abuf_cur;
00111         MYFLT   **pcbuf_cur, **pabuf_cur;
00112         MYFLT   *c_time, *c_gain, *a_time, *a_gain;
00113         const MYFLT *c_orggains, *a_orggains;
00114         MYFLT   *z, *g;        /* [Combs] */
00115         AUXCH   temp;
00116         AUXCH   caux, aaux;
00117         AUXCH   caux2, aaux2;  /* Used to hold space for all dynamized arrays */
00118         MYFLT   prev_time, prev_hdif;
00119 } NREV2;
00120 
00121 int vdelset(CSOUND *, VDEL *p);
00122 int vdelay(CSOUND *, VDEL *p);
00123 int vdelay3(CSOUND *, VDEL *p);
00124 int vdelxset(CSOUND *, VDELX *p);
00125 int vdelxsset(CSOUND *, VDELXS *p);
00126 int vdelxqset(CSOUND *, VDELXQ *p);
00127 int vdelayx(CSOUND *, VDELX *p);
00128 int vdelayxw(CSOUND *, VDELX *p);
00129 int vdelayxs(CSOUND *, VDELXS *p);
00130 int vdelayxws(CSOUND *, VDELXS *p);
00131 int vdelayxq(CSOUND *, VDELXQ *p);
00132 int vdelayxwq(CSOUND *, VDELXQ *p);
00133 int multitap_set(CSOUND *, MDEL *p);
00134 int multitap_play(CSOUND *, MDEL *p);
00135 #if 0
00136 int nreverb_set(CSOUND *, NREV *p);
00137 int nreverb(CSOUND *, NREV *p);
00138 #endif
00139 int reverbx_set(CSOUND *, NREV2 *p);
00140 int reverbx(CSOUND *, NREV2 *p);
00141 

Generated on Sun Nov 9 00:04:52 2008 for Csound and CsoundAC by  doxygen 1.5.6