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 ARP_OSC1_TRACKING 0x0002 25 #define ARP_OSC2_TRACKING 0x0004 26 #define ARP_OSC3_TRACKING 0x0008 27 28 #define A_AR_ON 0x0010 29 30 #define ARP_OSC1_LFO 0x0020 31 #define ARP_OSC2_LFO 0x0040 32 #define ARP_OSC3_LFO 0x0080 33 34 /* 35 * These are the output indeces. 36 */ 37 #define ARP_O_PREAMP 0 38 #define ARP_O_RINGMOD 1 39 #define ARP_O_ENVFOLLOW 2 40 #define ARP_O_VCO1_SAW 3 41 #define ARP_O_VCO1_SQR 4 42 #define ARP_O_VCO2_TRI 5 43 #define ARP_O_VCO2_SIN 6 44 #define ARP_O_VCO2_SAW 7 45 #define ARP_O_VCO2_SQR 8 46 #define ARP_O_VCO3_TRI 9 47 #define ARP_O_VCO3_SIN 10 48 #define ARP_O_VCO3_SAW 11 49 #define ARP_O_VCO3_SQR 12 50 #define ARP_O_VCF 13 51 #define ARP_O_ADSR 14 52 #define ARP_O_AR 15 53 #define ARP_O_VCA 16 54 #define ARP_O_MIXER 17 55 #define ARP_O_NOISE 18 56 #define ARP_O_CLOCK 19 57 #define ARP_O_SH 20 58 #define ARP_O_SWITCH 21 59 #define ARP_O_MIX_OUT1 22 60 #define ARP_O_MIX_OUT2 23 61 #define ARP_O_MIX_1 24 62 #define ARP_O_MIX_2 25 63 #define ARP_O_MIX_2_2 26 64 #define ARP_O_LAG 27 65 #define ARP_O_PAN 28 66 #define ARP_O_IN_1 29 /* These are input into the emulator, ie, outputs */ 67 #define ARP_O_IN_2 30 /* These are input into the emulator, ie, outputs */ 68 #define ARP_O_IN_3 31 /* These are input into the emulator, ie, outputs */ 69 #define ARP_O_IN_4 32 /* These are input into the emulator, ie, outputs */ 70 #define ARP_O_KBD_CV 33 /* Other outputs PRIOR to this one! */ 71 #define ARP_ZERO 34 /* Other outputs PRIOR to this one! */ 72 #define ARP_OUTCNT 35 /* END OF OUTPUTS */ 73 #define BRISTOL_ARP_BUFCNT 36 74 75 #define ARP_I_ENVFOLLOW 0 76 #define ARP_I_RM1 1 77 #define ARP_I_RM2 2 78 #define ARP_I_VCO1_KBD 3 79 #define ARP_I_VCO1_SH 4 80 #define ARP_I_VCO1_ADSR 5 81 #define ARP_I_VCO1_VCO2 6 82 #define ARP_I_VCO2_KBD 7 83 #define ARP_I_VCO2_SH 8 84 #define ARP_I_VCO2_ADSR 9 85 #define ARP_I_VCO2_VCO1 10 86 #define ARP_I_VCO2_NSE 11 87 #define ARP_I_VCO3_KBD 12 88 #define ARP_I_VCO3_NSE 13 89 #define ARP_I_VCO3_ADSR 14 90 #define ARP_I_VCO3_SIN 15 91 #define ARP_I_VCO3_TRI 16 92 #define ARP_I_FILT_RM 17 93 #define ARP_I_FILT_1SQR 18 94 #define ARP_I_FILT_2SQR 19 95 #define ARP_I_FILT_3TRI 20 96 #define ARP_I_FILT_NSE 21 97 #define ARP_I_FILT_KBD 22 98 #define ARP_I_FILT_ADSR 23 99 #define ARP_I_FILT_2SIN 24 100 #define ARP_I_ADSR_GATE 25 101 #define ARP_I_AR_GATE 26 102 #define ARP_I_VCA_GATE 27 103 #define ARP_I_VCA_TRIG 28 104 #define ARP_I_VCA_VCF 29 105 #define ARP_I_VCA_RM 30 106 #define ARP_I_VCA_AR 31 107 #define ARP_I_VCA_ADSR 32 108 #define ARP_I_MIX_VCF 33 109 #define ARP_I_MIX_VCA 34 110 #define ARP_I_MIX_FX 35 111 #define ARP_I_LEFT_IN 36 112 #define ARP_I_RIGHT_IN 37 113 #define ARP_I_SWITCH_1 38 114 #define ARP_I_SWITCH_2 39 115 #define ARP_I_SH_IN 40 116 #define ARP_I_CLOCK_IN 41 117 #define ARP_I_SWITCHCLK 42 118 #define ARP_I_PAN 43 119 #define ARP_I_MIX_1_1 44 120 #define ARP_I_MIX_1_2 45 121 #define ARP_I_MIX_2_1 46 122 #define ARP_I_LAG 47 123 #define ARP_I_MIX_1_3 48 124 #define ARP_I_MIX_1_4 49 125 #define ARP_I_MIX_2_2 50 126 #define ARP_I_OUT_1 51 127 #define ARP_I_OUT_2 52 128 #define ARP_I_OUT_3 53 129 #define ARP_I_OUT_4 54 130 #define ARP_INCOUNT 55 /* END OF INPUTS */ 131 132 typedef struct arp2600Mod { 133 float *buf; /* stuff with some buffer pointer by GUI requests */ 134 float gain; /* active gain */ 135 float cgain; /* configured gain from GUI */ 136 float o1gain; /* these are scalers to adjust the level depending on param */ 137 float o2gain; /* these are scalers to adjust the level depending on param */ 138 int oactive; 139 } arp2600mod; 140 141 typedef struct arp2600Mods { 142 unsigned int flags; 143 144 int adsrAuto; 145 int arAuto; 146 int arAutoCount; 147 float arAutoTransit; 148 149 /* 150 * The above is for the axxe and most will disappear for the Odyssey. 151 * 152 * Most of this is mod routing, this will be a table of entries for each 153 * mod. These will need to be initialised such that the respective gains 154 * accord the levels of the given mod source when selected. 155 */ 156 float preamp; 157 float pan; 158 float volume; 159 float initialvolume; 160 float fxLpan; 161 float fxRpan; 162 float lfogain; 163 arp2600mod mod[ARP_INCOUNT]; 164 float shkbd; 165 } arp2600mods; 166 167