1206b17d7SAlexander Leidinger#- 248351eafSJoel Dahl# Copyright (c) 2003 Mathew Kanner 348351eafSJoel Dahl# All rights reserved. 4206b17d7SAlexander Leidinger# 5206b17d7SAlexander Leidinger# Redistribution and use in source and binary forms, with or without 648351eafSJoel Dahl# modification, are permitted provided that the following conditions 748351eafSJoel Dahl# are met: 848351eafSJoel Dahl# 1. Redistributions of source code must retain the above copyright 948351eafSJoel Dahl# notice, this list of conditions and the following disclaimer. 1048351eafSJoel Dahl# 2. Redistributions in binary form must reproduce the above copyright 1148351eafSJoel Dahl# notice, this list of conditions and the following disclaimer in the 1248351eafSJoel Dahl# documentation and/or other materials provided with the distribution. 13206b17d7SAlexander Leidinger# 1448351eafSJoel Dahl# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1548351eafSJoel Dahl# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1648351eafSJoel Dahl# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1748351eafSJoel Dahl# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1848351eafSJoel Dahl# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1948351eafSJoel Dahl# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2048351eafSJoel Dahl# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2148351eafSJoel Dahl# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22206b17d7SAlexander Leidinger# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23206b17d7SAlexander Leidinger# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24206b17d7SAlexander Leidinger# SUCH DAMAGE. 25206b17d7SAlexander Leidinger# 26206b17d7SAlexander Leidinger# 27206b17d7SAlexander Leidinger 28206b17d7SAlexander LeidingerINTERFACE synth; 29206b17d7SAlexander Leidinger 30206b17d7SAlexander Leidinger#include <sys/systm.h> 31206b17d7SAlexander Leidinger 32206b17d7SAlexander LeidingerCODE { 33206b17d7SAlexander Leidinger 34206b17d7SAlexander Leidingersynth_killnote_t nokillnote; 35206b17d7SAlexander Leidingersynth_startnote_t nostartnote; 36206b17d7SAlexander Leidingersynth_setinstr_t nosetinstr; 37206b17d7SAlexander Leidingersynth_hwcontrol_t nohwcontrol; 38206b17d7SAlexander Leidingersynth_aftertouch_t noaftertouch; 39206b17d7SAlexander Leidingersynth_panning_t nopanning; 40206b17d7SAlexander Leidingersynth_controller_t nocontroller; 41206b17d7SAlexander Leidingersynth_volumemethod_t novolumemethod; 42206b17d7SAlexander Leidingersynth_bender_t nobender; 43206b17d7SAlexander Leidingersynth_setupvoice_t nosetupvoice; 44206b17d7SAlexander Leidingersynth_sendsysex_t nosendsysex; 45206b17d7SAlexander Leidingersynth_allocvoice_t noallocvoice; 46206b17d7SAlexander Leidingersynth_writeraw_t nowriteraw; 47206b17d7SAlexander Leidingersynth_reset_t noreset; 48206b17d7SAlexander Leidingersynth_shortname_t noshortname; 49206b17d7SAlexander Leidingersynth_open_t noopen; 50206b17d7SAlexander Leidingersynth_close_t noclose; 51206b17d7SAlexander Leidingersynth_query_t noquery; 52206b17d7SAlexander Leidingersynth_insync_t noinsync; 53206b17d7SAlexander Leidingersynth_alloc_t noalloc; 54206b17d7SAlexander Leidinger 55206b17d7SAlexander Leidinger int 56206b17d7SAlexander Leidinger nokillnote(void *_kobj, uint8_t _chn, uint8_t _note, uint8_t _vel) 57206b17d7SAlexander Leidinger { 58206b17d7SAlexander Leidinger printf("nokillnote\n"); 59206b17d7SAlexander Leidinger return 0; 60206b17d7SAlexander Leidinger } 61206b17d7SAlexander Leidinger 62206b17d7SAlexander Leidinger int 63206b17d7SAlexander Leidinger noopen(void *_kobj, void *_arg, int mode) 64206b17d7SAlexander Leidinger { 65206b17d7SAlexander Leidinger printf("noopen\n"); 66206b17d7SAlexander Leidinger return 0; 67206b17d7SAlexander Leidinger } 68206b17d7SAlexander Leidinger 69206b17d7SAlexander Leidinger int 70206b17d7SAlexander Leidinger noquery(void *_kboj) 71206b17d7SAlexander Leidinger { 72206b17d7SAlexander Leidinger printf("noquery\n"); 73206b17d7SAlexander Leidinger return 0; 74206b17d7SAlexander Leidinger } 75206b17d7SAlexander Leidinger 76206b17d7SAlexander Leidinger int 77206b17d7SAlexander Leidinger nostartnote(void *_kb, uint8_t _voice, uint8_t _note, uint8_t _parm) 78206b17d7SAlexander Leidinger { 79206b17d7SAlexander Leidinger printf("nostartnote\n"); 80206b17d7SAlexander Leidinger return 0; 81206b17d7SAlexander Leidinger } 82206b17d7SAlexander Leidinger 83206b17d7SAlexander Leidinger int 84206b17d7SAlexander Leidinger nosetinstr(void *_kb, uint8_t _chn, uint16_t _patchno) 85206b17d7SAlexander Leidinger { 86206b17d7SAlexander Leidinger printf("nosetinstr\n"); 87206b17d7SAlexander Leidinger return 0; 88206b17d7SAlexander Leidinger } 89206b17d7SAlexander Leidinger 90206b17d7SAlexander Leidinger int 91206b17d7SAlexander Leidinger nohwcontrol(void *_kb, uint8_t *_event) 92206b17d7SAlexander Leidinger { 93206b17d7SAlexander Leidinger printf("nohwcontrol\n"); 94206b17d7SAlexander Leidinger return 0; 95206b17d7SAlexander Leidinger } 96206b17d7SAlexander Leidinger 97206b17d7SAlexander Leidinger int 98206b17d7SAlexander Leidinger noaftertouch ( void /* X */ * _kobj, uint8_t _x1, uint8_t _x2) 99206b17d7SAlexander Leidinger { 100206b17d7SAlexander Leidinger printf("noaftertouch\n"); 101206b17d7SAlexander Leidinger return 0; 102206b17d7SAlexander Leidinger } 103206b17d7SAlexander Leidinger 104206b17d7SAlexander Leidinger int 105206b17d7SAlexander Leidinger nopanning ( void /* X */ * _kobj, uint8_t _x1, uint8_t _x2) 106206b17d7SAlexander Leidinger { 107206b17d7SAlexander Leidinger printf("nopanning\n"); 108206b17d7SAlexander Leidinger return 0; 109206b17d7SAlexander Leidinger } 110206b17d7SAlexander Leidinger 111206b17d7SAlexander Leidinger int 112206b17d7SAlexander Leidinger nocontroller ( void /* X */ * _kobj, uint8_t _x1, uint8_t _x2, uint16_t _x3) 113206b17d7SAlexander Leidinger { 114206b17d7SAlexander Leidinger printf("nocontroller\n"); 115206b17d7SAlexander Leidinger return 0; 116206b17d7SAlexander Leidinger } 117206b17d7SAlexander Leidinger 118206b17d7SAlexander Leidinger int 119206b17d7SAlexander Leidinger novolumemethod ( 120206b17d7SAlexander Leidinger void /* X */ * _kobj, 121206b17d7SAlexander Leidinger uint8_t _x1) 122206b17d7SAlexander Leidinger { 123206b17d7SAlexander Leidinger printf("novolumemethod\n"); 124206b17d7SAlexander Leidinger return 0; 125206b17d7SAlexander Leidinger } 126206b17d7SAlexander Leidinger 127206b17d7SAlexander Leidinger int 128206b17d7SAlexander Leidinger nobender ( void /* X */ * _kobj, uint8_t _voice, uint16_t _bend) 129206b17d7SAlexander Leidinger { 130206b17d7SAlexander Leidinger printf("nobender\n"); 131206b17d7SAlexander Leidinger return 0; 132206b17d7SAlexander Leidinger } 133206b17d7SAlexander Leidinger 134206b17d7SAlexander Leidinger int 135206b17d7SAlexander Leidinger nosetupvoice ( void /* X */ * _kobj, uint8_t _voice, uint8_t _chn) 136206b17d7SAlexander Leidinger { 137206b17d7SAlexander Leidinger 138206b17d7SAlexander Leidinger printf("nosetupvoice\n"); 139206b17d7SAlexander Leidinger return 0; 140206b17d7SAlexander Leidinger } 141206b17d7SAlexander Leidinger 142206b17d7SAlexander Leidinger int 143206b17d7SAlexander Leidinger nosendsysex ( void /* X */ * _kobj, void * _buf, size_t _len) 144206b17d7SAlexander Leidinger { 145206b17d7SAlexander Leidinger printf("nosendsysex\n"); 146206b17d7SAlexander Leidinger return 0; 147206b17d7SAlexander Leidinger } 148206b17d7SAlexander Leidinger 149206b17d7SAlexander Leidinger int 150206b17d7SAlexander Leidinger noallocvoice ( void /* X */ * _kobj, uint8_t _chn, uint8_t _note, void *_x) 151206b17d7SAlexander Leidinger { 152206b17d7SAlexander Leidinger printf("noallocvoice\n"); 153206b17d7SAlexander Leidinger return 0; 154206b17d7SAlexander Leidinger } 155206b17d7SAlexander Leidinger 156206b17d7SAlexander Leidinger int 157206b17d7SAlexander Leidinger nowriteraw ( void /* X */ * _kobjt, uint8_t * _buf, size_t _len) 158206b17d7SAlexander Leidinger { 159206b17d7SAlexander Leidinger printf("nowriteraw\n"); 160206b17d7SAlexander Leidinger return 1; 161206b17d7SAlexander Leidinger } 162206b17d7SAlexander Leidinger 163206b17d7SAlexander Leidinger int 164206b17d7SAlexander Leidinger noreset ( void /* X */ * _kobjt) 165206b17d7SAlexander Leidinger { 166206b17d7SAlexander Leidinger 167206b17d7SAlexander Leidinger printf("noreset\n"); 168206b17d7SAlexander Leidinger return 0; 169206b17d7SAlexander Leidinger } 170206b17d7SAlexander Leidinger 171206b17d7SAlexander Leidinger char * 172206b17d7SAlexander Leidinger noshortname (void /* X */ * _kobjt) 173206b17d7SAlexander Leidinger { 174206b17d7SAlexander Leidinger printf("noshortname\n"); 175206b17d7SAlexander Leidinger return "noshortname"; 176206b17d7SAlexander Leidinger } 177206b17d7SAlexander Leidinger 178206b17d7SAlexander Leidinger int 179206b17d7SAlexander Leidinger noclose ( void /* X */ * _kobjt) 180206b17d7SAlexander Leidinger { 181206b17d7SAlexander Leidinger 182206b17d7SAlexander Leidinger printf("noclose\n"); 183206b17d7SAlexander Leidinger return 0; 184206b17d7SAlexander Leidinger } 185206b17d7SAlexander Leidinger 186206b17d7SAlexander Leidinger int 187206b17d7SAlexander Leidinger noinsync (void /* X */ * _kobjt) 188206b17d7SAlexander Leidinger { 189206b17d7SAlexander Leidinger 190206b17d7SAlexander Leidinger printf("noinsync\n"); 191206b17d7SAlexander Leidinger return 0; 192206b17d7SAlexander Leidinger } 193206b17d7SAlexander Leidinger 194206b17d7SAlexander Leidinger int 195206b17d7SAlexander Leidinger noalloc ( void /* x */ * _kbojt, uint8_t _chn, uint8_t _note) 196206b17d7SAlexander Leidinger { 197206b17d7SAlexander Leidinger printf("noalloc\n"); 198206b17d7SAlexander Leidinger return 0; 199206b17d7SAlexander Leidinger } 200206b17d7SAlexander Leidinger} 201206b17d7SAlexander Leidinger 202206b17d7SAlexander LeidingerMETHOD int killnote { 203206b17d7SAlexander Leidinger void /* X */ *_kobj; 204206b17d7SAlexander Leidinger uint8_t _chan; 205206b17d7SAlexander Leidinger uint8_t _note; 206206b17d7SAlexander Leidinger uint8_t _vel; 207206b17d7SAlexander Leidinger} DEFAULT nokillnote; 208206b17d7SAlexander Leidinger 209206b17d7SAlexander LeidingerMETHOD int startnote { 210206b17d7SAlexander Leidinger void /* X */ *_kobj; 211206b17d7SAlexander Leidinger uint8_t _voice; 212206b17d7SAlexander Leidinger uint8_t _note; 213206b17d7SAlexander Leidinger uint8_t _parm; 214206b17d7SAlexander Leidinger} DEFAULT nostartnote; 215206b17d7SAlexander Leidinger 216206b17d7SAlexander LeidingerMETHOD int setinstr { 217206b17d7SAlexander Leidinger void /* X */ *_kobj; 218206b17d7SAlexander Leidinger uint8_t _chn; 219206b17d7SAlexander Leidinger uint16_t _patchno; 220206b17d7SAlexander Leidinger} DEFAULT nosetinstr; 221206b17d7SAlexander Leidinger 222206b17d7SAlexander LeidingerMETHOD int hwcontrol { 223206b17d7SAlexander Leidinger void /* X */ *_kobj; 224206b17d7SAlexander Leidinger uint8_t *_event; 225206b17d7SAlexander Leidinger} DEFAULT nohwcontrol; 226206b17d7SAlexander Leidinger 227206b17d7SAlexander LeidingerMETHOD int aftertouch { 228206b17d7SAlexander Leidinger void /* X */ *_kobj; 229206b17d7SAlexander Leidinger uint8_t _x1; 230206b17d7SAlexander Leidinger uint8_t _x2; 231206b17d7SAlexander Leidinger} DEFAULT noaftertouch; 232206b17d7SAlexander Leidinger 233206b17d7SAlexander LeidingerMETHOD int panning { 234206b17d7SAlexander Leidinger void /* X */ *_kobj; 235206b17d7SAlexander Leidinger uint8_t _x1; 236206b17d7SAlexander Leidinger uint8_t _x2; 237206b17d7SAlexander Leidinger} DEFAULT nopanning; 238206b17d7SAlexander Leidinger 239206b17d7SAlexander LeidingerMETHOD int controller { 240206b17d7SAlexander Leidinger void /* X */ *_kobj; 241206b17d7SAlexander Leidinger uint8_t _x1; 242206b17d7SAlexander Leidinger uint8_t _x2; 243206b17d7SAlexander Leidinger uint16_t _x3; 244206b17d7SAlexander Leidinger} DEFAULT nocontroller; 245206b17d7SAlexander Leidinger 246206b17d7SAlexander LeidingerMETHOD int volumemethod { 247206b17d7SAlexander Leidinger void /* X */ *_kobj; 248206b17d7SAlexander Leidinger uint8_t _x1; 249206b17d7SAlexander Leidinger} DEFAULT novolumemethod; 250206b17d7SAlexander Leidinger 251206b17d7SAlexander LeidingerMETHOD int bender { 252206b17d7SAlexander Leidinger void /* X */ *_kobj; 253206b17d7SAlexander Leidinger uint8_t _voice; 254206b17d7SAlexander Leidinger uint16_t _bend; 255206b17d7SAlexander Leidinger} DEFAULT nobender; 256206b17d7SAlexander Leidinger 257206b17d7SAlexander LeidingerMETHOD int setupvoice { 258206b17d7SAlexander Leidinger void /* X */ *_kobj; 259206b17d7SAlexander Leidinger uint8_t _voice; 260206b17d7SAlexander Leidinger uint8_t _chn; 261206b17d7SAlexander Leidinger} DEFAULT nosetupvoice; 262206b17d7SAlexander Leidinger 263206b17d7SAlexander LeidingerMETHOD int sendsysex { 264206b17d7SAlexander Leidinger void /* X */ *_kobj; 265206b17d7SAlexander Leidinger void *_buf; 266206b17d7SAlexander Leidinger size_t _len; 267206b17d7SAlexander Leidinger} DEFAULT nosendsysex; 268206b17d7SAlexander Leidinger 269206b17d7SAlexander LeidingerMETHOD int allocvoice { 270206b17d7SAlexander Leidinger void /* X */ *_kobj; 271206b17d7SAlexander Leidinger uint8_t _chn; 272206b17d7SAlexander Leidinger uint8_t _note; 273206b17d7SAlexander Leidinger void *_x; 274206b17d7SAlexander Leidinger} DEFAULT noallocvoice; 275206b17d7SAlexander Leidinger 276206b17d7SAlexander LeidingerMETHOD int writeraw { 277206b17d7SAlexander Leidinger void /* X */ *_kobjt; 278206b17d7SAlexander Leidinger uint8_t *_buf; 279206b17d7SAlexander Leidinger size_t _len; 280206b17d7SAlexander Leidinger} DEFAULT nowriteraw; 281206b17d7SAlexander Leidinger 282206b17d7SAlexander LeidingerMETHOD int reset { 283206b17d7SAlexander Leidinger void /* X */ *_kobjt; 284206b17d7SAlexander Leidinger} DEFAULT noreset; 285206b17d7SAlexander Leidinger 286206b17d7SAlexander LeidingerMETHOD char * shortname { 287206b17d7SAlexander Leidinger void /* X */ *_kobjt; 288206b17d7SAlexander Leidinger} DEFAULT noshortname; 289206b17d7SAlexander Leidinger 290206b17d7SAlexander LeidingerMETHOD int open { 291206b17d7SAlexander Leidinger void /* X */ *_kobjt; 292206b17d7SAlexander Leidinger void *_sythn; 293206b17d7SAlexander Leidinger int _mode; 294206b17d7SAlexander Leidinger} DEFAULT noopen; 295206b17d7SAlexander Leidinger 296206b17d7SAlexander LeidingerMETHOD int close { 297206b17d7SAlexander Leidinger void /* X */ *_kobjt; 298206b17d7SAlexander Leidinger} DEFAULT noclose; 299206b17d7SAlexander Leidinger 300206b17d7SAlexander LeidingerMETHOD int query { 301206b17d7SAlexander Leidinger void /* X */ *_kobjt; 302206b17d7SAlexander Leidinger} DEFAULT noquery; 303206b17d7SAlexander Leidinger 304206b17d7SAlexander LeidingerMETHOD int insync { 305206b17d7SAlexander Leidinger void /* X */ *_kobjt; 306206b17d7SAlexander Leidinger} DEFAULT noinsync; 307206b17d7SAlexander Leidinger 308206b17d7SAlexander LeidingerMETHOD int alloc { 309206b17d7SAlexander Leidinger void /* x */ *_kbojt; 310206b17d7SAlexander Leidinger uint8_t _chn; 311206b17d7SAlexander Leidinger uint8_t _note; 312206b17d7SAlexander Leidinger} DEFAULT noalloc; 313