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 #define A_AR_MULTI			0x0001
23 
24 #define AKS_OSC1_TRACKING	0x0002
25 #define AKS_OSC2_TRACKING	0x0004
26 #define AKS_OSC3_TRACKING	0x0008
27 
28 #define A_AR_ON				0x0010
29 
30 /*
31  * These are the output indeces.
32  */
33 #define AKS_O_CH1		0
34 #define AKS_O_CH2		1
35 #define AKS_O_OSC1		2
36 #define AKS_O_OSC2		3
37 #define AKS_O_OSC3_SQR	4
38 #define AKS_O_OSC3_TRI	5
39 #define AKS_O_NOISE		6
40 #define AKS_O_INPUT_1	7
41 #define AKS_O_INPUT_2	8
42 #define AKS_O_VCF		9
43 #define AKS_O_ADSR		10
44 #define AKS_O_VCA		11
45 #define AKS_O_RM		12
46 #define AKS_O_REVERB	13
47 #define AKS_O_H			14
48 #define AKS_O_V			15
49 #define AKS_O_METER		16
50 #define AKS_O_LEFT		17
51 #define AKS_O_RIGHT		18
52 #define AKS_O_TRIGGER	19
53 #define AKS_OUTCOUNT	20 /* END OF OUTPUTS */
54 #define BRISTOL_AKS_BUFCNT 20
55 
56 #define AKS_I_CH1		0
57 #define AKS_I_METER		1
58 #define AKS_I_CH2		2
59 #define AKS_I_ENVELOPE	3
60 #define AKS_I_RM1		4
61 #define AKS_I_RM2		5
62 #define AKS_I_REVERB	6
63 #define AKS_I_FILTER	7
64 #define AKS_I_OSC1		8
65 #define AKS_I_OSC2		9
66 #define AKS_I_OSC3		10
67 #define AKS_I_DECAY		11
68 #define AKS_I_REVERBMIX	12
69 #define AKS_I_VCF		13
70 #define AKS_I_CH1_LVL	14
71 #define AKS_I_CH2_LVL	15
72 #define AKS_INCOUNT		16 /* END OF INPUTS */
73 
74 typedef struct aksMod {
75 	float *buf;   /* stuff with some buffer pointer by GUI requests */
76 	float gain;   /* active gain */
77 	float cgain;   /* configured gain from GUI */
78 } aksmod;
79 
80 typedef struct aksMods {
81 	unsigned int flags;
82 
83 	/*
84 	 * The above is for the axxe and most will disappear for the Odyssey.
85 	 *
86 	 * Most of this is mod routing, this will be a table of entries for each
87 	 * mod. These will need to be initialised such that the respective gains
88 	 * accord the levels of the given mod source when selected.
89 	 */
90 	float hrange, vrange;
91 	float lingain, ringain;
92 	float routfilt, loutfilt;
93 	/* Channel stuff */
94 	float chan1gain, chan1pan;
95 	float chan2gain, chan2pan;
96 	int chan1route, chan2route;
97 	float fs1, fs2;
98 	float signal, trapezoid;
99 } aksmods;
100 
101