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 #ifndef BRIGHTONMIXERMEMORY_H 22 #define BRIGHTONMIXERMEMORY_H 23 24 #include "brightonMini.h" 25 26 typedef float cOpaque[18]; 27 typedef struct cClear { 28 float gain; 29 float preSend; 30 float dynSens; 31 float dynAtt; 32 float dynDec; 33 float dynSus; 34 float dynRel; 35 float treble; 36 float tFreq; 37 float mid; 38 float bass; 39 float bFreq; 40 float postSend; 41 float fxVol; 42 float fxSpd; 43 float fxDpt; 44 float pan; 45 float vol; 46 } cClear; 47 typedef union CParams { 48 cOpaque opaque; 49 cClear clear; 50 } cparams; 51 52 typedef struct ChanMem { 53 char scratch[20]; 54 int inputSelect; 55 int preSend[4]; 56 int dynamics; 57 int filter; 58 int postSend[4]; 59 int fxAlgo; 60 cparams p; 61 int mute; 62 int solo; 63 int boost; 64 int outputSelect[16]; 65 int stereoBus; 66 float data[30]; 67 } chanMem; 68 69 typedef float bOpaque[FXP_COUNT]; 70 typedef struct BClear { 71 float igain; 72 float speed; 73 float depth; 74 float m; 75 float pan; 76 float gain; 77 int algorithm; 78 float outputSelect[16]; 79 float pad[FXP_COUNT - 7 - 16]; 80 } bClear; 81 typedef union BParams { 82 bClear clear; 83 bOpaque opaque; 84 } bparams; 85 typedef struct BusMem { 86 char name[32]; // For eventual FX attachments. 87 bparams b; 88 } busMem; 89 90 typedef float vbOpaque[3]; 91 typedef struct VBClear { 92 float vol; 93 float left; 94 float right; 95 } vbClear; 96 typedef union VBus { 97 vbClear clear; 98 vbOpaque opaque; 99 } vBus; 100 101 typedef struct MixerMemV1 { 102 char name[20]; 103 int version; 104 int chancount; 105 busMem bus[16]; 106 vBus vbus[8]; 107 chanMem chan[MAX_CHAN_COUNT]; 108 } mixerMem; 109 110 extern int saveMixerMemory(guiSynth *synth, char *name); 111 extern int loadMixerMemory(guiSynth *synth, char *name, int param); 112 extern void *initMixerMemory(int count); 113 extern int setMixerMemory(mixerMem *, int, int, float *, char *); 114 extern char* getMixerMemory(mixerMem *m, int op, int param); 115 116 117 #endif 118