1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
|
/*
zak.h:
Copyright (C) 2018 John ffitch
This file is part of Csound.
The Csound Library is free software; you can redistribute it
and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
Csound is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with Csound; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
*/
/* ZAK.H */
typedef struct {
MYFLT *zkstart;
int64_t zklast;
MYFLT *zastart;
int64_t zalast;
} ZAK_GLOBALS;
/* Data structures for the zak family of ugens for patching data at i,
* k or a rates.
* See also four global variables declared in the C code. */
/* ZAKINIT data structure for zakinit(). */
typedef struct {
OPDS h;
MYFLT *isizea; /* Number of a locations, each an array of
* ksmps long, to to reserve for a rate
* patching */
MYFLT *isizek; /* Number of locations for i or k rate
* variables */
} ZAKINIT;
/* ZKR data structure for zir() and zkr(). */
typedef struct {
OPDS h;
MYFLT *rslt; /* Where to write the value read from zk */
MYFLT *ndx; /* Location in zk space to read */
MYFLT *dummy;
void *zz;
} ZKR;
/* ZKW data structure for ziw() and zkw(). */
typedef struct {
OPDS h;
MYFLT *sig; /* Value to write */
MYFLT *ndx; /* Locations to read */
MYFLT *dummy;
void *zz;
} ZKW;
/* ZKWM data structure for ziwm() and zkwm(). */
typedef struct {
OPDS h;
MYFLT *sig; /* Value to write */
MYFLT *ndx; /* Locations to read */
MYFLT *mix; /* 0 for write directly; !0 for mix - add in */
void *zz;
} ZKWM;
/* ZKMOD data structure for zkmod(). */
typedef struct {
OPDS h;
MYFLT *rslt; /* Points to where to write output */
MYFLT *sig; /* Value to modulate */
MYFLT *zkmod; /* Which zk variable to use to modulate sig */
void *zz;
} ZKMOD;
/* ZKCL data structure for zkcl(). */
typedef struct {
OPDS h;
MYFLT *first; /* First variable to clear */
MYFLT *last; /* Final variable to clear */
MYFLT *dummy;
void *zz;
} ZKCL;
/* ZAR data structure for zar(). */
typedef struct {
OPDS h;
MYFLT *rslt; /* Where to write the value */
MYFLT *ndx; /* Location in za space to read */
MYFLT *dummy;
void *zz;
} ZAR;
/* ZARG data structure for zarg(). */
typedef struct {
OPDS h;
MYFLT *rslt; /* Where to write the zk location */
MYFLT *ndx; /* Location in za space to read */
MYFLT *kgain; /* Gain to be given to signal read */
void *zz;
} ZARG;
/* ZAW data structure for zaw(). */
typedef struct {
OPDS h;
MYFLT *sig, *ndx;
MYFLT *dummy;
void *zz;
} ZAW;
/* ZAWM data structure for zawm(). */
typedef struct {
OPDS h;
MYFLT *sig;
MYFLT *ndx, *mix; /* Locations to read;
0 for write directly, or addd in */
void *zz;
} ZAWM;
/* ZAWOD data structure for zamod(). */
typedef struct {
OPDS h;
MYFLT *rslt;
MYFLT *sig, *zamod; /* Value to modulate; Which za variable to use */
void *zz;
} ZAMOD;
/* ZACL data structure for zacl(). */
typedef struct {
OPDS h;
MYFLT *first, *last;
MYFLT *dummy;
void *zz;
} ZACL;
int zacl(CSOUND*,ZACL *p);
int zakinit(CSOUND*,ZAKINIT *p);
int zamod(CSOUND*,ZAMOD *p);
int zar(CSOUND*,ZAR *p);
int zarg(CSOUND*,ZARG *p);
int zaset(CSOUND*,ZAR *p);
int zaw(CSOUND*,ZAW *p);
int zawm(CSOUND*,ZAWM *p);
int zir(CSOUND*,ZKR *p);
int ziw(CSOUND*,ZKW *p);
int ziwm(CSOUND*,ZKWM *p);
int zkcl(CSOUND*,ZKCL *p);
int zkmod(CSOUND*,ZKMOD *p);
int zkr(CSOUND*,ZKR *p);
int zkset(CSOUND*,ZKR *p);
int zkw(CSOUND*,ZKW *p);
int zkwm(CSOUND*,ZKWM *p);
|