1158979Snetchild#-
2166322Sjoel# Copyright (c) 2003 Mathew Kanner
3166322Sjoel# All rights reserved.
4158979Snetchild#
5158979Snetchild# Redistribution and use in source and binary forms, with or without
6166322Sjoel# modification, are permitted provided that the following conditions
7166322Sjoel# are met:
8166322Sjoel# 1. Redistributions of source code must retain the above copyright
9166322Sjoel#    notice, this list of conditions and the following disclaimer.
10166322Sjoel# 2. Redistributions in binary form must reproduce the above copyright
11166322Sjoel#    notice, this list of conditions and the following disclaimer in the
12166322Sjoel#    documentation and/or other materials provided with the distribution.
13158979Snetchild#
14166322Sjoel# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15166322Sjoel# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16166322Sjoel# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17166322Sjoel# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18166322Sjoel# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19166322Sjoel# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20166322Sjoel# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21166322Sjoel# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22158979Snetchild# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23158979Snetchild# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24158979Snetchild# SUCH DAMAGE.
25158979Snetchild#
26158979Snetchild# $FreeBSD$
27158979Snetchild#
28158979Snetchild
29158979SnetchildINTERFACE synth;
30158979Snetchild
31158979Snetchild#include <sys/systm.h>
32158979Snetchild
33158979SnetchildCODE {
34158979Snetchild
35158979Snetchildsynth_killnote_t nokillnote;
36158979Snetchildsynth_startnote_t nostartnote;
37158979Snetchildsynth_setinstr_t nosetinstr;
38158979Snetchildsynth_hwcontrol_t nohwcontrol;
39158979Snetchildsynth_aftertouch_t noaftertouch;
40158979Snetchildsynth_panning_t nopanning;
41158979Snetchildsynth_controller_t nocontroller;
42158979Snetchildsynth_volumemethod_t novolumemethod;
43158979Snetchildsynth_bender_t nobender;
44158979Snetchildsynth_setupvoice_t nosetupvoice;
45158979Snetchildsynth_sendsysex_t nosendsysex;
46158979Snetchildsynth_allocvoice_t noallocvoice;
47158979Snetchildsynth_writeraw_t nowriteraw;
48158979Snetchildsynth_reset_t noreset;
49158979Snetchildsynth_shortname_t noshortname;
50158979Snetchildsynth_open_t noopen;
51158979Snetchildsynth_close_t noclose;
52158979Snetchildsynth_query_t noquery;
53158979Snetchildsynth_insync_t noinsync;
54158979Snetchildsynth_alloc_t noalloc;
55158979Snetchild
56158979Snetchild    int
57158979Snetchild	nokillnote(void *_kobj, uint8_t _chn, uint8_t _note, uint8_t _vel)
58158979Snetchild	{
59158979Snetchild	    printf("nokillnote\n");
60158979Snetchild	    return 0;
61158979Snetchild	}
62158979Snetchild
63158979Snetchild    int
64158979Snetchild	noopen(void *_kobj, void *_arg, int mode)
65158979Snetchild	{
66158979Snetchild	    printf("noopen\n");
67158979Snetchild	    return 0;
68158979Snetchild	}
69158979Snetchild
70158979Snetchild    int
71158979Snetchild	noquery(void *_kboj)
72158979Snetchild	{
73158979Snetchild	    printf("noquery\n");
74158979Snetchild	    return 0;
75158979Snetchild	}
76158979Snetchild
77158979Snetchild    int
78158979Snetchild	nostartnote(void *_kb, uint8_t _voice, uint8_t _note, uint8_t _parm)
79158979Snetchild	{
80158979Snetchild	    printf("nostartnote\n");
81158979Snetchild	    return 0;
82158979Snetchild	}
83158979Snetchild
84158979Snetchild    int
85158979Snetchild	nosetinstr(void *_kb, uint8_t _chn, uint16_t _patchno)
86158979Snetchild	{
87158979Snetchild	    printf("nosetinstr\n");
88158979Snetchild	    return 0;
89158979Snetchild	}
90158979Snetchild
91158979Snetchild    int
92158979Snetchild	nohwcontrol(void *_kb, uint8_t *_event)
93158979Snetchild	{
94158979Snetchild	    printf("nohwcontrol\n");
95158979Snetchild	    return 0;
96158979Snetchild	}
97158979Snetchild
98158979Snetchild    int 
99158979Snetchild	noaftertouch ( void /* X */ * _kobj, uint8_t _x1, uint8_t _x2)
100158979Snetchild	{
101158979Snetchild	    printf("noaftertouch\n");
102158979Snetchild	    return 0;
103158979Snetchild	}
104158979Snetchild
105158979Snetchild    int
106158979Snetchild	nopanning ( void /* X */ * _kobj, uint8_t _x1, uint8_t _x2)
107158979Snetchild	{
108158979Snetchild	    printf("nopanning\n");
109158979Snetchild	    return 0;
110158979Snetchild	}
111158979Snetchild
112158979Snetchild    int 
113158979Snetchild	nocontroller ( void /* X */ * _kobj, uint8_t _x1, uint8_t _x2, uint16_t _x3)
114158979Snetchild	{
115158979Snetchild	    printf("nocontroller\n");
116158979Snetchild	    return 0;
117158979Snetchild	}
118158979Snetchild
119158979Snetchild    int 
120158979Snetchild	novolumemethod (
121158979Snetchild		void /* X */ * _kobj,
122158979Snetchild		uint8_t _x1)
123158979Snetchild	{
124158979Snetchild	    printf("novolumemethod\n");
125158979Snetchild	    return 0;
126158979Snetchild	}
127158979Snetchild
128158979Snetchild    int 
129158979Snetchild	nobender ( void /* X */ * _kobj, uint8_t _voice, uint16_t _bend)
130158979Snetchild	{
131158979Snetchild	    printf("nobender\n");
132158979Snetchild	    return 0;
133158979Snetchild	}
134158979Snetchild
135158979Snetchild    int 
136158979Snetchild	nosetupvoice ( void /* X */ * _kobj, uint8_t _voice, uint8_t _chn)
137158979Snetchild	{
138158979Snetchild
139158979Snetchild	    printf("nosetupvoice\n");
140158979Snetchild	    return 0;
141158979Snetchild	}
142158979Snetchild
143158979Snetchild    int 
144158979Snetchild	nosendsysex ( void /* X */ * _kobj, void * _buf, size_t _len)
145158979Snetchild	{
146158979Snetchild	    printf("nosendsysex\n");
147158979Snetchild	    return 0;
148158979Snetchild	}
149158979Snetchild
150158979Snetchild    int 
151158979Snetchild	noallocvoice ( void /* X */ * _kobj, uint8_t _chn, uint8_t _note, void *_x)
152158979Snetchild	{
153158979Snetchild	    printf("noallocvoice\n");
154158979Snetchild	    return 0;
155158979Snetchild	}
156158979Snetchild
157158979Snetchild    int 
158158979Snetchild	nowriteraw ( void /* X */ * _kobjt, uint8_t * _buf, size_t _len)
159158979Snetchild	{
160158979Snetchild	    printf("nowriteraw\n");
161158979Snetchild	    return 1;
162158979Snetchild	}
163158979Snetchild
164158979Snetchild    int 
165158979Snetchild	noreset ( void /* X */ * _kobjt)
166158979Snetchild	{
167158979Snetchild
168158979Snetchild	    printf("noreset\n");
169158979Snetchild	    return 0;
170158979Snetchild	}
171158979Snetchild
172158979Snetchild    char *
173158979Snetchild	noshortname (void /* X */ * _kobjt)
174158979Snetchild	{
175158979Snetchild	    printf("noshortname\n");
176158979Snetchild	    return "noshortname";
177158979Snetchild	}
178158979Snetchild
179158979Snetchild    int 
180158979Snetchild	noclose ( void /* X */ * _kobjt)
181158979Snetchild	{
182158979Snetchild
183158979Snetchild	    printf("noclose\n");
184158979Snetchild	    return 0;
185158979Snetchild	}
186158979Snetchild
187158979Snetchild    int
188158979Snetchild	noinsync (void /* X */ * _kobjt)
189158979Snetchild	{
190158979Snetchild
191158979Snetchild	    printf("noinsync\n");
192158979Snetchild	    return 0;
193158979Snetchild	}
194158979Snetchild
195158979Snetchild    int 
196158979Snetchild	noalloc ( void /* x */ * _kbojt, uint8_t _chn, uint8_t _note)
197158979Snetchild	{
198158979Snetchild	    printf("noalloc\n");
199158979Snetchild	    return 0;
200158979Snetchild	}
201158979Snetchild}
202158979Snetchild
203158979SnetchildMETHOD int killnote {
204166971Snetchild	void /* X */ *_kobj;
205166971Snetchild	uint8_t	_chan;
206166971Snetchild	uint8_t	_note;
207166971Snetchild	uint8_t	_vel;
208158979Snetchild} DEFAULT nokillnote;
209158979Snetchild
210158979SnetchildMETHOD int startnote {
211166971Snetchild	void /* X */ *_kobj;
212166971Snetchild	uint8_t	_voice;
213166971Snetchild	uint8_t	_note;
214166971Snetchild	uint8_t	_parm;
215158979Snetchild} DEFAULT nostartnote;
216158979Snetchild
217158979SnetchildMETHOD int setinstr {
218166971Snetchild	void /* X */ *_kobj;
219166971Snetchild	uint8_t	_chn;
220166971Snetchild	uint16_t _patchno;
221158979Snetchild} DEFAULT nosetinstr;
222158979Snetchild
223158979SnetchildMETHOD int hwcontrol {
224166971Snetchild	void /* X */ *_kobj;
225166971Snetchild	uint8_t *_event;
226158979Snetchild} DEFAULT nohwcontrol;
227158979Snetchild
228158979SnetchildMETHOD int aftertouch {
229166971Snetchild	void /* X */ *_kobj;
230166971Snetchild	uint8_t	_x1;
231166971Snetchild	uint8_t	_x2;
232158979Snetchild} DEFAULT noaftertouch;
233158979Snetchild
234158979SnetchildMETHOD int panning {
235166971Snetchild	void /* X */ *_kobj;
236166971Snetchild	uint8_t	_x1;
237166971Snetchild	uint8_t	_x2;
238158979Snetchild} DEFAULT nopanning;
239158979Snetchild
240158979SnetchildMETHOD int controller {
241166971Snetchild	void /* X */ *_kobj;
242166971Snetchild	uint8_t	_x1;
243166971Snetchild	uint8_t	_x2;
244166971Snetchild	uint16_t _x3;
245158979Snetchild} DEFAULT nocontroller;
246158979Snetchild
247158979SnetchildMETHOD int volumemethod {
248166971Snetchild	void /* X */ *_kobj;
249166971Snetchild	uint8_t	_x1;
250158979Snetchild} DEFAULT novolumemethod;
251158979Snetchild
252158979SnetchildMETHOD int bender {
253166971Snetchild	void /* X */ *_kobj;
254166971Snetchild	uint8_t	_voice;
255166971Snetchild	uint16_t _bend;
256158979Snetchild} DEFAULT nobender;
257158979Snetchild
258158979SnetchildMETHOD int setupvoice {
259166971Snetchild	void /* X */ *_kobj;
260166971Snetchild	uint8_t	_voice;
261166971Snetchild	uint8_t	_chn;
262158979Snetchild} DEFAULT nosetupvoice;
263158979Snetchild
264158979SnetchildMETHOD int sendsysex {
265166971Snetchild	void /* X */ *_kobj;
266166971Snetchild	void   *_buf;
267166971Snetchild	size_t	_len;
268158979Snetchild} DEFAULT nosendsysex;
269158979Snetchild
270158979SnetchildMETHOD int allocvoice {
271166971Snetchild	void /* X */ *_kobj;
272166971Snetchild	uint8_t	_chn;
273166971Snetchild	uint8_t	_note;
274166971Snetchild	void   *_x;
275158979Snetchild} DEFAULT noallocvoice;
276158979Snetchild
277158979SnetchildMETHOD int writeraw {
278166971Snetchild	void /* X */ *_kobjt;
279166971Snetchild	uint8_t *_buf;
280166971Snetchild	size_t	_len;
281158979Snetchild} DEFAULT nowriteraw;
282158979Snetchild
283158979SnetchildMETHOD int reset {
284166971Snetchild	void /* X */ *_kobjt;
285158979Snetchild} DEFAULT noreset;
286158979Snetchild
287158979SnetchildMETHOD char * shortname {
288166971Snetchild	void /* X */ *_kobjt;
289158979Snetchild} DEFAULT noshortname;
290158979Snetchild
291158979SnetchildMETHOD int open {
292166971Snetchild	void /* X */ *_kobjt;
293166971Snetchild	void   *_sythn;
294166971Snetchild	int	_mode;
295158979Snetchild} DEFAULT noopen;
296158979Snetchild
297158979SnetchildMETHOD int close {
298166971Snetchild	void /* X */ *_kobjt;
299158979Snetchild} DEFAULT noclose;
300158979Snetchild
301158979SnetchildMETHOD int query {
302166971Snetchild	void /* X */ *_kobjt;
303158979Snetchild} DEFAULT noquery;
304158979Snetchild
305158979SnetchildMETHOD int insync {
306166971Snetchild	void /* X */ *_kobjt;
307158979Snetchild} DEFAULT noinsync;
308158979Snetchild
309158979SnetchildMETHOD int alloc {
310166971Snetchild	void /* x */ *_kbojt;
311166971Snetchild	uint8_t	_chn;
312166971Snetchild	uint8_t	_note;
313158979Snetchild} DEFAULT noalloc;
314