File: gab.h

package info (click to toggle)
csound 1%3A6.18.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 62,416 kB
  • sloc: ansic: 192,636; cpp: 14,151; javascript: 9,654; objc: 9,181; java: 3,337; python: 3,333; sh: 1,783; yacc: 1,255; xml: 985; perl: 635; lisp: 411; tcl: 341; lex: 217; makefile: 126
file content (143 lines) | stat: -rw-r--r-- 3,486 bytes parent folder | download | duplicates (5)
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
/*  Copyright (C) 2002-2004 Gabriel Maldonado

  The gab 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.

  The gab library 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 the gab library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  02110-1301 USA

  Ported to csound5 by:Andres Cabrera andres@geminiflux.com
*/

#ifndef GAB_H
#define GAB_H

#include "../stdopcod.h"
#include "H/ugrw1.h"    /* for zread function */
#include "ugens6.h"     /* for a_k_set function */

typedef struct {
    OPDS    h;
    MYFLT   *ar, *asig, *kcf, *kbw, *ord, *iscl, *istor;
    int32_t scale, loop;
    MYFLT   c1, c2, c3, *yt1, *yt2, cosf, prvcf, prvbw;
    AUXCH   aux;
} KRESONX;

typedef struct {
    OPDS    h;
    MYFLT   *rslt, *xndx, *xfn, *ixmode;
    MYFLT   *table;
    MYFLT   xbmul;
    int32_t xmode;
    int32_t tablen;
} FASTAB;

typedef struct {
    OPDS    h;
    MYFLT   *r, *ndx;
    MYFLT   **tb_ptr;
} FASTB;

typedef struct {
    OPDS    h;
    MYFLT   *ifn;
} TB_INIT;

/* ====================== */
/* opcodes from Jens Groh */
/* ====================== */
typedef struct {        /* for nlalp opcode */
    OPDS    h;          /* header */
    MYFLT   *aresult;   /* resulting signal */
    MYFLT   *ainsig;    /* input signal */
    MYFLT   *klfact;    /* linear factor */
    MYFLT   *knfact;    /* nonlinear factor */
    MYFLT   *istor;     /* initial storage disposition */
    double  m0;         /* energy storage */
    double  m1;         /* energy storage */
} NLALP;

/* end opcodes from Jens Groh */

typedef struct {
    OPDS    h;
    MYFLT   *sr, *kamp, *kcps, *ifn, *ifreqtbl, *iamptbl, *icnt, *iphs;
    FUNC    *ftp;
    FUNC    *freqtp;
    FUNC    *amptp;
    int32_t count;
    int32_t inerr;
    AUXCH   lphs;
    AUXCH   pamp;
} ADSYNT2;

typedef struct {
    OPDS    h;
    MYFLT   *retval;
} EXITNOW;

typedef struct {
    OPDS    h;
    MYFLT   *ktrig_start, *ktrig_stop, *numtics, *kfn, *inargs[VARGMAX];
    int32_t recording, numins;
    int64_t currtic, ndx, tablen;
    MYFLT   *table, old_fn;
} TABREC;

typedef struct {
    OPDS    h;
    MYFLT   *ktrig, *numtics, *kfn, *outargs[VARGMAX];
    int32_t playing, numouts;
    int64_t currtic, ndx, tablen;
    MYFLT   *table, old_fn;
} TABPLAY;

typedef struct {
    OPDS    h;
    MYFLT   *ktrig, *inargs[VARGMAX];
    int32_t numargs;            /* Reordered for caching */
    int32_t cnt;
    MYFLT   old_inargs[VARGMAX];
} ISCHANGED;

typedef struct {
    OPDS     h;
    MYFLT    *ktrig;
    ARRAYDAT *chk;
    int32_t  size;
    int32_t  cnt;
    AUXCH    old_chk;
} ISACHANGED;

typedef struct {
    OPDS    h;
    MYFLT   *commandLine;
} CSSYSTEM;

typedef struct {
    OPDS    h;
    MYFLT   *kout, *asig, *ktrig, *imaxflag;
    MYFLT   max;
    int32_t     counter;
} P_MAXIMUM;

/* From fractals.h */
typedef struct {
    OPDS    h;
    MYFLT   *kr, *koutrig,  *ktrig, *kx, *ky, *kmaxIter;
    MYFLT   oldx, oldy;
    int32_t oldCount;
} MANDEL;

#endif