1 
2 /*
3  *  Diverse Bristol audio routines.
4  *  Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2012
5  *
6  *
7  *   This program is free software; you can redistribute it and/or modify
8  *   it under the terms of the GNU General Public License as published by
9  *   the Free Software Foundation; either version 3 of the License, or
10  *   (at your option) any later version.
11  *
12  *   This program is distributed in the hope that it will be useful,
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *   GNU General Public License for more details.
16  *
17  *   You should have received a copy of the GNU General Public License
18  *   along with this program; if not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef BRISTOL_MESSAGES_H
23 #define BRISTOL_MESSAGES_H
24 
25 #include <sys/types.h>
26 
27 #define BRISTOL_M_TYPE2_LEN
28 
29 #define MSG_TYPE_CONTROL 1
30 #define MSG_TYPE_SYSTEM 2
31 #define MSG_TYPE_PARAM 4
32 #define MSG_TYPE_SESSION 8 // Type-2 messages
33 
34 /*
35  * These will be wrapped in s MIDI sysex, and sent down the control link.
36  * We will either require ALL codes are 7 bits only, or will put in an
37  * encoder.
38  */
39 typedef struct BristolMsg {
40 	u_char SysID; /* How about "83"? hex 'S' - or find a free one from net */
41 	u_char L; /* hex 76 - some more bytes of ID! */
42 	u_char a; /* hex 97 */
43 	u_char b; /* hex 98 */
44 	u_char msgLen;
45 	u_char msgType;
46 	u_char channel; /* Multitimbral, or SLab track */
47 	u_char from; /* Source channel for return messages */
48 	u_char operator; /* Operator on voice */
49 	u_char controller; /* Controller on operator */
50 	u_char valueLSB;
51 	u_char valueMSB;
52 } bristolMsg;
53 
54 /*
55  * These are the type 2 message operations
56  */
57 #define BRISTOL_MT2_WRITE	1
58 #define BRISTOL_MT2_READ	2
59 
60 typedef struct BristolMsgType2 {
61 	u_char SysID; /* How about "83"? hex 'S' - or find a free one from net */
62 	u_char L; /* hex 76 - some more bytes of ID! */
63 	u_char a; /* hex 97 */
64 	u_char b; /* hex 98 */
65 	u_char msgLen;
66 	u_char msgType;
67 	u_char channel; /* Multitimbral, or SLab track */
68 	u_char from; /* Source channel for return messages */
69 	int operation;
70 	char *data;
71 } bristolMsgType2;
72 
73 #endif /* BRISTOL_MESSAGES_H */
74 
75