1 /* WhySynth DSSI software synthesizer plugin 2 * 3 * Copyright (C) 2004-2010, 2012 Sean Bolton and others. 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License as 7 * published by the Free Software Foundation; either version 2 of 8 * the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be 11 * useful, but WITHOUT ANY WARRANTY; without even the implied 12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 * PURPOSE. See the GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public 16 * License along with this program; if not, write to the Free 17 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301 USA. 19 */ 20 21 #ifndef _WHYSYNTH_PORTS_H 22 #define _WHYSYNTH_PORTS_H 23 24 #ifdef HAVE_CONFIG_H 25 # include <config.h> 26 #endif 27 28 #include <ladspa.h> 29 30 /* -PORTS- */ 31 #define Y_PORT_OUTPUT_LEFT 0 32 #define Y_PORT_OUTPUT_RIGHT 1 33 34 #define Y_PORT_OSC1_MODE 2 35 #define Y_PORT_OSC1_WAVEFORM 3 36 #define Y_PORT_OSC1_PITCH 4 37 #define Y_PORT_OSC1_DETUNE 5 38 #define Y_PORT_OSC1_PITCH_MOD_SRC 6 39 #define Y_PORT_OSC1_PITCH_MOD_AMT 7 40 #define Y_PORT_OSC1_MPARAM1 8 /* sync / grain lz / mod freq ratio / ws phase offset / slave freq / noise cutoff freq */ 41 #define Y_PORT_OSC1_MPARAM2 9 /* pulsewidth / wave sel bias / grain spread / mod freq detune / mod amount bias */ 42 #define Y_PORT_OSC1_MMOD_SRC 10 /* (pw | mod index | slave freq ) mod source / grain envelope */ 43 #define Y_PORT_OSC1_MMOD_AMT 11 /* (pw | mod index | slave freq ) mod amount / grain pitch distribution */ 44 #define Y_PORT_OSC1_AMP_MOD_SRC 12 45 #define Y_PORT_OSC1_AMP_MOD_AMT 13 46 #define Y_PORT_OSC1_LEVEL_A 14 47 #define Y_PORT_OSC1_LEVEL_B 15 48 49 #define Y_PORT_OSC2_MODE 16 50 #define Y_PORT_OSC2_WAVEFORM 17 51 #define Y_PORT_OSC2_PITCH 18 52 #define Y_PORT_OSC2_DETUNE 19 53 #define Y_PORT_OSC2_PITCH_MOD_SRC 20 54 #define Y_PORT_OSC2_PITCH_MOD_AMT 21 55 #define Y_PORT_OSC2_MPARAM1 22 56 #define Y_PORT_OSC2_MPARAM2 23 57 #define Y_PORT_OSC2_MMOD_SRC 24 58 #define Y_PORT_OSC2_MMOD_AMT 25 59 #define Y_PORT_OSC2_AMP_MOD_SRC 26 60 #define Y_PORT_OSC2_AMP_MOD_AMT 27 61 #define Y_PORT_OSC2_LEVEL_A 28 62 #define Y_PORT_OSC2_LEVEL_B 29 63 64 #define Y_PORT_OSC3_MODE 30 65 #define Y_PORT_OSC3_WAVEFORM 31 66 #define Y_PORT_OSC3_PITCH 32 67 #define Y_PORT_OSC3_DETUNE 33 68 #define Y_PORT_OSC3_PITCH_MOD_SRC 34 69 #define Y_PORT_OSC3_PITCH_MOD_AMT 35 70 #define Y_PORT_OSC3_MPARAM1 36 71 #define Y_PORT_OSC3_MPARAM2 37 72 #define Y_PORT_OSC3_MMOD_SRC 38 73 #define Y_PORT_OSC3_MMOD_AMT 39 74 #define Y_PORT_OSC3_AMP_MOD_SRC 40 75 #define Y_PORT_OSC3_AMP_MOD_AMT 41 76 #define Y_PORT_OSC3_LEVEL_A 42 77 #define Y_PORT_OSC3_LEVEL_B 43 78 79 #define Y_PORT_OSC4_MODE 44 80 #define Y_PORT_OSC4_WAVEFORM 45 81 #define Y_PORT_OSC4_PITCH 46 82 #define Y_PORT_OSC4_DETUNE 47 83 #define Y_PORT_OSC4_PITCH_MOD_SRC 48 84 #define Y_PORT_OSC4_PITCH_MOD_AMT 49 85 #define Y_PORT_OSC4_MPARAM1 50 86 #define Y_PORT_OSC4_MPARAM2 51 87 #define Y_PORT_OSC4_MMOD_SRC 52 88 #define Y_PORT_OSC4_MMOD_AMT 53 89 #define Y_PORT_OSC4_AMP_MOD_SRC 54 90 #define Y_PORT_OSC4_AMP_MOD_AMT 55 91 #define Y_PORT_OSC4_LEVEL_A 56 92 #define Y_PORT_OSC4_LEVEL_B 57 93 94 #define Y_PORT_VCF1_MODE 58 95 #define Y_PORT_VCF1_SOURCE 59 96 #define Y_PORT_VCF1_FREQUENCY 60 97 /* -FIX- add kbd tracking? */ 98 #define Y_PORT_VCF1_FREQ_MOD_SRC 61 99 #define Y_PORT_VCF1_FREQ_MOD_AMT 62 100 #define Y_PORT_VCF1_QRES 63 101 #define Y_PORT_VCF1_MPARAM 64 102 103 #define Y_PORT_VCF2_MODE 65 104 #define Y_PORT_VCF2_SOURCE 66 105 #define Y_PORT_VCF2_FREQUENCY 67 106 #define Y_PORT_VCF2_FREQ_MOD_SRC 68 107 #define Y_PORT_VCF2_FREQ_MOD_AMT 69 108 #define Y_PORT_VCF2_QRES 70 109 #define Y_PORT_VCF2_MPARAM 71 110 111 #define Y_PORT_BUSA_LEVEL 72 112 #define Y_PORT_BUSA_PAN 73 113 #define Y_PORT_BUSB_LEVEL 74 114 #define Y_PORT_BUSB_PAN 75 115 #define Y_PORT_VCF1_LEVEL 76 116 #define Y_PORT_VCF1_PAN 77 117 #define Y_PORT_VCF2_LEVEL 78 118 #define Y_PORT_VCF2_PAN 79 119 #define Y_PORT_VOLUME 80 120 121 /* how many effects parameters? gverb needs 6 (5 with 'reflections/tail mix') */ 122 #define Y_PORT_EFFECT_MODE 81 123 #define Y_PORT_EFFECT_PARAM1 82 124 #define Y_PORT_EFFECT_PARAM2 83 125 #define Y_PORT_EFFECT_PARAM3 84 126 #define Y_PORT_EFFECT_PARAM4 85 127 #define Y_PORT_EFFECT_PARAM5 86 128 #define Y_PORT_EFFECT_PARAM6 87 129 #define Y_PORT_EFFECT_MIX 88 130 131 #define Y_PORT_GLIDE_TIME 89 132 #define Y_PORT_BEND_RANGE 90 133 134 #define Y_PORT_GLFO_FREQUENCY 91 135 #define Y_PORT_GLFO_WAVEFORM 92 136 #define Y_PORT_GLFO_AMP_MOD_SRC 93 137 #define Y_PORT_GLFO_AMP_MOD_AMT 94 138 139 #define Y_PORT_VLFO_FREQUENCY 95 140 #define Y_PORT_VLFO_WAVEFORM 96 141 #define Y_PORT_VLFO_DELAY 97 142 #define Y_PORT_VLFO_AMP_MOD_SRC 98 143 #define Y_PORT_VLFO_AMP_MOD_AMT 99 144 145 #define Y_PORT_MLFO_FREQUENCY 100 146 #define Y_PORT_MLFO_WAVEFORM 101 147 #define Y_PORT_MLFO_DELAY 102 148 #define Y_PORT_MLFO_AMP_MOD_SRC 103 149 #define Y_PORT_MLFO_AMP_MOD_AMT 104 150 #define Y_PORT_MLFO_PHASE_SPREAD 105 151 #define Y_PORT_MLFO_RANDOM_FREQ 106 152 153 #define Y_PORT_EGO_MODE 107 154 #define Y_PORT_EGO_SHAPE1 108 155 #define Y_PORT_EGO_TIME1 109 156 #define Y_PORT_EGO_LEVEL1 110 157 #define Y_PORT_EGO_SHAPE2 111 158 #define Y_PORT_EGO_TIME2 112 159 #define Y_PORT_EGO_LEVEL2 113 160 #define Y_PORT_EGO_SHAPE3 114 161 #define Y_PORT_EGO_TIME3 115 162 #define Y_PORT_EGO_LEVEL3 116 163 #define Y_PORT_EGO_SHAPE4 117 164 #define Y_PORT_EGO_TIME4 118 165 #define Y_PORT_EGO_VEL_LEVEL_SENS 119 166 #define Y_PORT_EGO_VEL_TIME_SCALE 120 167 #define Y_PORT_EGO_KBD_TIME_SCALE 121 168 #define Y_PORT_EGO_AMP_MOD_SRC 122 169 #define Y_PORT_EGO_AMP_MOD_AMT 123 170 171 #define Y_PORT_EG1_MODE 124 172 #define Y_PORT_EG1_SHAPE1 125 173 #define Y_PORT_EG1_TIME1 126 174 #define Y_PORT_EG1_LEVEL1 127 175 #define Y_PORT_EG1_SHAPE2 128 176 #define Y_PORT_EG1_TIME2 129 177 #define Y_PORT_EG1_LEVEL2 130 178 #define Y_PORT_EG1_SHAPE3 131 179 #define Y_PORT_EG1_TIME3 132 180 #define Y_PORT_EG1_LEVEL3 133 181 #define Y_PORT_EG1_SHAPE4 134 182 #define Y_PORT_EG1_TIME4 135 183 #define Y_PORT_EG1_VEL_LEVEL_SENS 136 184 #define Y_PORT_EG1_VEL_TIME_SCALE 137 185 #define Y_PORT_EG1_KBD_TIME_SCALE 138 186 #define Y_PORT_EG1_AMP_MOD_SRC 139 187 #define Y_PORT_EG1_AMP_MOD_AMT 140 188 189 #define Y_PORT_EG2_MODE 141 190 #define Y_PORT_EG2_SHAPE1 142 191 #define Y_PORT_EG2_TIME1 143 192 #define Y_PORT_EG2_LEVEL1 144 193 #define Y_PORT_EG2_SHAPE2 145 194 #define Y_PORT_EG2_TIME2 146 195 #define Y_PORT_EG2_LEVEL2 147 196 #define Y_PORT_EG2_SHAPE3 148 197 #define Y_PORT_EG2_TIME3 149 198 #define Y_PORT_EG2_LEVEL3 150 199 #define Y_PORT_EG2_SHAPE4 151 200 #define Y_PORT_EG2_TIME4 152 201 #define Y_PORT_EG2_VEL_LEVEL_SENS 153 202 #define Y_PORT_EG2_VEL_TIME_SCALE 154 203 #define Y_PORT_EG2_KBD_TIME_SCALE 155 204 #define Y_PORT_EG2_AMP_MOD_SRC 156 205 #define Y_PORT_EG2_AMP_MOD_AMT 157 206 207 #define Y_PORT_EG3_MODE 158 208 #define Y_PORT_EG3_SHAPE1 159 209 #define Y_PORT_EG3_TIME1 160 210 #define Y_PORT_EG3_LEVEL1 161 211 #define Y_PORT_EG3_SHAPE2 162 212 #define Y_PORT_EG3_TIME2 163 213 #define Y_PORT_EG3_LEVEL2 164 214 #define Y_PORT_EG3_SHAPE3 165 215 #define Y_PORT_EG3_TIME3 166 216 #define Y_PORT_EG3_LEVEL3 167 217 #define Y_PORT_EG3_SHAPE4 168 218 #define Y_PORT_EG3_TIME4 169 219 #define Y_PORT_EG3_VEL_LEVEL_SENS 170 220 #define Y_PORT_EG3_VEL_TIME_SCALE 171 221 #define Y_PORT_EG3_KBD_TIME_SCALE 172 222 #define Y_PORT_EG3_AMP_MOD_SRC 173 223 #define Y_PORT_EG3_AMP_MOD_AMT 174 224 225 #define Y_PORT_EG4_MODE 175 226 #define Y_PORT_EG4_SHAPE1 176 227 #define Y_PORT_EG4_TIME1 177 228 #define Y_PORT_EG4_LEVEL1 178 229 #define Y_PORT_EG4_SHAPE2 179 230 #define Y_PORT_EG4_TIME2 180 231 #define Y_PORT_EG4_LEVEL2 181 232 #define Y_PORT_EG4_SHAPE3 182 233 #define Y_PORT_EG4_TIME3 183 234 #define Y_PORT_EG4_LEVEL3 184 235 #define Y_PORT_EG4_SHAPE4 185 236 #define Y_PORT_EG4_TIME4 186 237 #define Y_PORT_EG4_VEL_LEVEL_SENS 187 238 #define Y_PORT_EG4_VEL_TIME_SCALE 188 239 #define Y_PORT_EG4_KBD_TIME_SCALE 189 240 #define Y_PORT_EG4_AMP_MOD_SRC 190 241 #define Y_PORT_EG4_AMP_MOD_AMT 191 242 243 #define Y_PORT_MODMIX_BIAS 192 244 #define Y_PORT_MODMIX_MOD1_SRC 193 245 #define Y_PORT_MODMIX_MOD1_AMT 194 246 #define Y_PORT_MODMIX_MOD2_SRC 195 247 #define Y_PORT_MODMIX_MOD2_AMT 196 248 249 #define Y_PORT_TUNING 197 250 251 #define Y_PORTS_COUNT 198 252 253 #define Y_PORT_TYPE_OUTPUT 0 /* control output */ 254 #define Y_PORT_TYPE_BOOLEAN 1 255 #define Y_PORT_TYPE_INTEGER 2 /* integer using spinbutton */ 256 #define Y_PORT_TYPE_LINEAR 3 257 #define Y_PORT_TYPE_LOGARITHMIC 4 258 #define Y_PORT_TYPE_LOGSCALED 5 /* logarithmic scaling, but may include zero */ 259 #define Y_PORT_TYPE_BPLOGSCALED 6 /* dual logarithmic scaling, must be symmetric around zero */ 260 #define Y_PORT_TYPE_COMBO 7 /* integer using combobox */ 261 262 #define Y_COMBO_TYPE_OSC_MODE 0 263 #define Y_COMBO_TYPE_OSC_WAVEFORM 1 264 #define Y_COMBO_TYPE_WT_WAVEFORM 2 265 #define Y_COMBO_TYPE_MOD_SRC 3 266 #define Y_COMBO_TYPE_MMOD_SRC 4 267 #define Y_COMBO_TYPE_FILTER_MODE 5 268 #define Y_COMBO_TYPE_FILTER_SRC 6 269 #define Y_COMBO_TYPE_EFFECT_MODE 7 270 #define Y_COMBO_TYPE_EG_MODE 8 271 #define Y_COMBO_TYPE_EG_SHAPE 9 272 #define Y_COMBO_TYPE_COUNT 10 273 274 #define Y_COMBOMODEL_TYPE_OSC_MODE 0 275 #define Y_COMBOMODEL_TYPE_WAVETABLE 1 276 #define Y_COMBOMODEL_TYPE_MINBLEP_WAVEFORM 2 277 #define Y_COMBOMODEL_TYPE_NOISE_WAVEFORM 3 278 #define Y_COMBOMODEL_TYPE_MOD_SRC 4 279 #define Y_COMBOMODEL_TYPE_GLFO_MOD_SRC 5 280 #define Y_COMBOMODEL_TYPE_GRAIN_ENV 6 281 #define Y_COMBOMODEL_TYPE_PADSYNTH_MODE 7 282 #define Y_COMBOMODEL_TYPE_FILTER_MODE 8 283 #define Y_COMBOMODEL_TYPE_FILTER1_SRC 9 284 #define Y_COMBOMODEL_TYPE_FILTER2_SRC 10 285 #define Y_COMBOMODEL_TYPE_EFFECT_MODE 11 286 #define Y_COMBOMODEL_TYPE_EG_MODE 12 287 #define Y_COMBOMODEL_TYPE_EG_SHAPE 13 288 #define Y_COMBOMODEL_TYPE_PD_WAVEFORM 14 289 #define Y_COMBOMODEL_TYPE_COUNT 15 290 291 /* -FIX- enumerate them all: */ 292 #define Y_OSCILLATOR_MODE_MINBLEP 1 293 #define Y_OSCILLATOR_MODE_AGRAN 3 294 #define Y_OSCILLATOR_MODE_NOISE 7 295 #define Y_OSCILLATOR_MODE_PADSYNTH 8 296 #define Y_OSCILLATOR_MODE_PD 9 297 298 #define Y_OSCILLATOR_MODE_COUNT 11 299 #define Y_FILTER_MODE_COUNT 10 300 #define Y_EFFECT_MODE_COUNT 3 301 302 #define Y_MOD_ONE 0 303 #define Y_MOD_MODWHEEL 1 304 #define Y_MOD_PRESSURE 2 /* channel for GLFO, channel+key for others */ 305 306 #define Y_GLOBAL_MOD_GLFO 3 307 #define Y_GLOBAL_MOD_GLFO_UP 4 308 #define Y_GLOBAL_MODS_COUNT 5 309 310 #define Y_MOD_KEY 3 311 #define Y_MOD_VELOCITY 4 312 /* -FIX- add key gate, release velocity, ... */ 313 #define Y_MOD_GLFO 5 314 #define Y_MOD_GLFO_UP 6 315 #define Y_MOD_VLFO 7 316 #define Y_MOD_VLFO_UP 8 317 #define Y_MOD_MLFO0 9 318 #define Y_MOD_MLFO0_UP 10 319 #define Y_MOD_MLFO1 11 320 #define Y_MOD_MLFO1_UP 12 321 #define Y_MOD_MLFO2 13 322 #define Y_MOD_MLFO2_UP 14 323 #define Y_MOD_MLFO3 15 324 #define Y_MOD_MLFO3_UP 16 325 #define Y_MOD_EGO 17 326 #define Y_MOD_EG1 18 327 #define Y_MOD_EG2 19 328 #define Y_MOD_EG3 20 329 #define Y_MOD_EG4 21 330 #define Y_MOD_MIX 22 331 /* -FIX- add custom MIDI or LADSPA mods? */ 332 333 #define Y_MODS_COUNT 23 334 335 struct y_port_descriptor { 336 337 LADSPA_PortDescriptor port_descriptor; 338 char * name; 339 LADSPA_PortRangeHintDescriptor hint_descriptor; 340 LADSPA_Data lower_bound; 341 LADSPA_Data upper_bound; 342 int type; 343 float scale; /* steepness of logarithmic scaling for '0LOG' and 'BPLOG' knob types */ 344 int subtype; 345 346 }; 347 348 extern struct y_port_descriptor y_port_description[]; 349 350 #endif /* _WHYSYNTH_PORTS_H */ 351 352