1#-
2# Copyright (c) 2003 Mathew Kanner
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8# 1. Redistributions of source code must retain the above copyright
9#    notice, this list of conditions and the following disclaimer.
10# 2. Redistributions in binary form must reproduce the above copyright
11#    notice, this list of conditions and the following disclaimer in the
12#    documentation and/or other materials provided with the distribution.
13#
14# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24# SUCH DAMAGE.
25#
26# $FreeBSD$
27#
28
29INTERFACE synth;
30
31#include <sys/systm.h>
32
33CODE {
34
35synth_killnote_t nokillnote;
36synth_startnote_t nostartnote;
37synth_setinstr_t nosetinstr;
38synth_hwcontrol_t nohwcontrol;
39synth_aftertouch_t noaftertouch;
40synth_panning_t nopanning;
41synth_controller_t nocontroller;
42synth_volumemethod_t novolumemethod;
43synth_bender_t nobender;
44synth_setupvoice_t nosetupvoice;
45synth_sendsysex_t nosendsysex;
46synth_allocvoice_t noallocvoice;
47synth_writeraw_t nowriteraw;
48synth_reset_t noreset;
49synth_shortname_t noshortname;
50synth_open_t noopen;
51synth_close_t noclose;
52synth_query_t noquery;
53synth_insync_t noinsync;
54synth_alloc_t noalloc;
55
56    int
57	nokillnote(void *_kobj, uint8_t _chn, uint8_t _note, uint8_t _vel)
58	{
59	    printf("nokillnote\n");
60	    return 0;
61	}
62
63    int
64	noopen(void *_kobj, void *_arg, int mode)
65	{
66	    printf("noopen\n");
67	    return 0;
68	}
69
70    int
71	noquery(void *_kboj)
72	{
73	    printf("noquery\n");
74	    return 0;
75	}
76
77    int
78	nostartnote(void *_kb, uint8_t _voice, uint8_t _note, uint8_t _parm)
79	{
80	    printf("nostartnote\n");
81	    return 0;
82	}
83
84    int
85	nosetinstr(void *_kb, uint8_t _chn, uint16_t _patchno)
86	{
87	    printf("nosetinstr\n");
88	    return 0;
89	}
90
91    int
92	nohwcontrol(void *_kb, uint8_t *_event)
93	{
94	    printf("nohwcontrol\n");
95	    return 0;
96	}
97
98    int 
99	noaftertouch ( void /* X */ * _kobj, uint8_t _x1, uint8_t _x2)
100	{
101	    printf("noaftertouch\n");
102	    return 0;
103	}
104
105    int
106	nopanning ( void /* X */ * _kobj, uint8_t _x1, uint8_t _x2)
107	{
108	    printf("nopanning\n");
109	    return 0;
110	}
111
112    int 
113	nocontroller ( void /* X */ * _kobj, uint8_t _x1, uint8_t _x2, uint16_t _x3)
114	{
115	    printf("nocontroller\n");
116	    return 0;
117	}
118
119    int 
120	novolumemethod (
121		void /* X */ * _kobj,
122		uint8_t _x1)
123	{
124	    printf("novolumemethod\n");
125	    return 0;
126	}
127
128    int 
129	nobender ( void /* X */ * _kobj, uint8_t _voice, uint16_t _bend)
130	{
131	    printf("nobender\n");
132	    return 0;
133	}
134
135    int 
136	nosetupvoice ( void /* X */ * _kobj, uint8_t _voice, uint8_t _chn)
137	{
138
139	    printf("nosetupvoice\n");
140	    return 0;
141	}
142
143    int 
144	nosendsysex ( void /* X */ * _kobj, void * _buf, size_t _len)
145	{
146	    printf("nosendsysex\n");
147	    return 0;
148	}
149
150    int 
151	noallocvoice ( void /* X */ * _kobj, uint8_t _chn, uint8_t _note, void *_x)
152	{
153	    printf("noallocvoice\n");
154	    return 0;
155	}
156
157    int 
158	nowriteraw ( void /* X */ * _kobjt, uint8_t * _buf, size_t _len)
159	{
160	    printf("nowriteraw\n");
161	    return 1;
162	}
163
164    int 
165	noreset ( void /* X */ * _kobjt)
166	{
167
168	    printf("noreset\n");
169	    return 0;
170	}
171
172    char *
173	noshortname (void /* X */ * _kobjt)
174	{
175	    printf("noshortname\n");
176	    return "noshortname";
177	}
178
179    int 
180	noclose ( void /* X */ * _kobjt)
181	{
182
183	    printf("noclose\n");
184	    return 0;
185	}
186
187    int
188	noinsync (void /* X */ * _kobjt)
189	{
190
191	    printf("noinsync\n");
192	    return 0;
193	}
194
195    int 
196	noalloc ( void /* x */ * _kbojt, uint8_t _chn, uint8_t _note)
197	{
198	    printf("noalloc\n");
199	    return 0;
200	}
201}
202
203METHOD int killnote {
204	void /* X */ *_kobj;
205	uint8_t	_chan;
206	uint8_t	_note;
207	uint8_t	_vel;
208} DEFAULT nokillnote;
209
210METHOD int startnote {
211	void /* X */ *_kobj;
212	uint8_t	_voice;
213	uint8_t	_note;
214	uint8_t	_parm;
215} DEFAULT nostartnote;
216
217METHOD int setinstr {
218	void /* X */ *_kobj;
219	uint8_t	_chn;
220	uint16_t _patchno;
221} DEFAULT nosetinstr;
222
223METHOD int hwcontrol {
224	void /* X */ *_kobj;
225	uint8_t *_event;
226} DEFAULT nohwcontrol;
227
228METHOD int aftertouch {
229	void /* X */ *_kobj;
230	uint8_t	_x1;
231	uint8_t	_x2;
232} DEFAULT noaftertouch;
233
234METHOD int panning {
235	void /* X */ *_kobj;
236	uint8_t	_x1;
237	uint8_t	_x2;
238} DEFAULT nopanning;
239
240METHOD int controller {
241	void /* X */ *_kobj;
242	uint8_t	_x1;
243	uint8_t	_x2;
244	uint16_t _x3;
245} DEFAULT nocontroller;
246
247METHOD int volumemethod {
248	void /* X */ *_kobj;
249	uint8_t	_x1;
250} DEFAULT novolumemethod;
251
252METHOD int bender {
253	void /* X */ *_kobj;
254	uint8_t	_voice;
255	uint16_t _bend;
256} DEFAULT nobender;
257
258METHOD int setupvoice {
259	void /* X */ *_kobj;
260	uint8_t	_voice;
261	uint8_t	_chn;
262} DEFAULT nosetupvoice;
263
264METHOD int sendsysex {
265	void /* X */ *_kobj;
266	void   *_buf;
267	size_t	_len;
268} DEFAULT nosendsysex;
269
270METHOD int allocvoice {
271	void /* X */ *_kobj;
272	uint8_t	_chn;
273	uint8_t	_note;
274	void   *_x;
275} DEFAULT noallocvoice;
276
277METHOD int writeraw {
278	void /* X */ *_kobjt;
279	uint8_t *_buf;
280	size_t	_len;
281} DEFAULT nowriteraw;
282
283METHOD int reset {
284	void /* X */ *_kobjt;
285} DEFAULT noreset;
286
287METHOD char * shortname {
288	void /* X */ *_kobjt;
289} DEFAULT noshortname;
290
291METHOD int open {
292	void /* X */ *_kobjt;
293	void   *_sythn;
294	int	_mode;
295} DEFAULT noopen;
296
297METHOD int close {
298	void /* X */ *_kobjt;
299} DEFAULT noclose;
300
301METHOD int query {
302	void /* X */ *_kobjt;
303} DEFAULT noquery;
304
305METHOD int insync {
306	void /* X */ *_kobjt;
307} DEFAULT noinsync;
308
309METHOD int alloc {
310	void /* x */ *_kbojt;
311	uint8_t	_chn;
312	uint8_t	_note;
313} DEFAULT noalloc;
314