1 
2 /*
3     sfont.h:
4 
5     Copyright (C) 2000 Gabriel Maldonado
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 #include "sftype.h"
26 #include "sf.h"
27 
28 typedef struct {
29         OPDS    h;
30         MYFLT   *ihandle, *fname;
31 } SFLOAD;
32 
33 typedef struct {
34         OPDS    h;
35         MYFLT   *ihandle;
36 } SFPLIST;
37 
38 typedef struct {
39         OPDS    h;
40   MYFLT   *startNum,*ihandle, *msgs;
41 } SFPASSIGN;
42 
43 typedef struct {
44         OPDS    h;
45         MYFLT   *ipresethandle, *iprog, *ibank, *isfhandle, *iPresetHandle;
46 } SFPRESET;
47 
48 #define MAXSPLT 10
49 
50 typedef struct {
51         OPDS    h;
52         MYFLT   *out1, *out2, *ivel, *inotnum,*xamp, *xfreq;
53         MYFLT   *ipresethandle, *iflag, *ioffset, *ienv;
54         int32_t     spltNum;
55         SHORT   *base[MAXSPLT], mode[MAXSPLT];
56         DWORD   end[MAXSPLT], startloop[MAXSPLT], endloop[MAXSPLT], ti[MAXSPLT];
57         double  si[MAXSPLT],phs[MAXSPLT];
58         MYFLT   leftlevel[MAXSPLT], rightlevel[MAXSPLT], attack[MAXSPLT],
59                 decay[MAXSPLT], sustain[MAXSPLT], release[MAXSPLT];
60         MYFLT   attr[MAXSPLT], decr[MAXSPLT];
61         MYFLT   env[MAXSPLT];
62 } SFPLAY;
63 
64 typedef struct {
65         OPDS    h;
66         MYFLT   *out1, *ivel, *inotnum,*xamp, *xfreq, *ipresethandle,
67                 *iflag, *ioffset, *ienv;
68         int32_t     spltNum;
69         SHORT   *base[MAXSPLT], mode[MAXSPLT];
70         DWORD   end[MAXSPLT], startloop[MAXSPLT], endloop[MAXSPLT], ti[MAXSPLT];
71         double  si[MAXSPLT],phs[MAXSPLT];
72         MYFLT   attenuation[MAXSPLT],attack[MAXSPLT], decay[MAXSPLT],
73                 sustain[MAXSPLT], release[MAXSPLT];
74         MYFLT   attr[MAXSPLT], decr[MAXSPLT];
75         MYFLT   env[MAXSPLT];
76 } SFPLAYMONO;
77 
78 typedef struct {
79         OPDS    h;
80         MYFLT   *out1, *ivel, *inotnum, *xamp, *xfreq, *instrNum;
81         MYFLT   *sfBank, *iflag, *ioffset, *ienv;
82         int32_t     spltNum;
83         SHORT   *base[MAXSPLT], mode[MAXSPLT];
84         DWORD   end[MAXSPLT], startloop[MAXSPLT], endloop[MAXSPLT], ti[MAXSPLT];
85         double  si[MAXSPLT],phs[MAXSPLT];
86         MYFLT   attenuation[MAXSPLT],attack[MAXSPLT], decay[MAXSPLT],
87                 sustain[MAXSPLT], release[MAXSPLT];
88         MYFLT   attr[MAXSPLT], decr[MAXSPLT];
89         MYFLT   env[MAXSPLT];
90 } SFIPLAYMONO;
91 
92 typedef struct {
93         OPDS    h;
94         MYFLT   *out1, *out2, *ivel, *inotnum, *xamp, *xfreq;
95         MYFLT   *instrNum, *sfBank, *iflag, *ioffset, *ienv;
96         int32_t
97         spltNum;
98         SHORT   *base[MAXSPLT], mode[MAXSPLT];
99         DWORD   end[MAXSPLT], startloop[MAXSPLT], endloop[MAXSPLT], ti[MAXSPLT];
100         double  si[MAXSPLT],phs[MAXSPLT];
101         MYFLT   leftlevel[MAXSPLT], rightlevel[MAXSPLT],attack[MAXSPLT],
102                 decay[MAXSPLT], sustain[MAXSPLT], release[MAXSPLT];
103         MYFLT   attr[MAXSPLT], decr[MAXSPLT];
104         MYFLT   env[MAXSPLT];
105 } SFIPLAY;
106