1 /* 2 Copyright 2008-2011 David Robillard <http://drobilla.net> 3 Copyright 1999-2000 Paul Kellett (Maxim Digital Audio) 4 5 This is free software: you can redistribute it and/or modify it 6 under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, 8 or (at your option) any later version. 9 10 This software is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 See the GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this software. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef __mdaDubDelay_H 20 #define __mdaDubDelay_H 21 22 #include "audioeffectx.h" 23 24 #include <cstdint> 25 26 class mdaDubDelay : public AudioEffectX 27 { 28 public: 29 mdaDubDelay(audioMasterCallback audioMaster); 30 ~mdaDubDelay(); 31 32 virtual void process(float **inputs, float **outputs, int32_t sampleFrames); 33 virtual void processReplacing(float **inputs, float **outputs, int32_t sampleFrames); 34 virtual void setProgramName(char *name); 35 virtual void getProgramName(char *name); 36 virtual bool getProgramNameIndexed (int32_t category, int32_t index, char* name); 37 virtual void setParameter(int32_t index, float value); 38 virtual float getParameter(int32_t index); 39 virtual void getParameterLabel(int32_t index, char *label); 40 virtual void getParameterDisplay(int32_t index, char *text); 41 virtual void getParameterName(int32_t index, char *text); 42 virtual void suspend(); 43 44 virtual bool getEffectName(char *name); 45 virtual bool getVendorString(char *text); 46 virtual bool getProductString(char *text); getVendorVersion()47 virtual int32_t getVendorVersion() { return 1000; } 48 49 protected: 50 float fParam0; 51 float fParam1; 52 float fParam2; 53 float fParam3; 54 float fParam4; 55 float fParam5; 56 float fParam6; 57 58 float *buffer; //delay 59 int32_t size, ipos; //delay max time, pointer, left time, right time 60 float wet, dry, fbk; //wet & dry mix 61 float lmix, hmix, fil, fil0; //low & high mix, crossover filter coeff & buffer 62 float env, rel; //limiter (clipper when release is instant) 63 float del, mod, phi, dphi; //lfo 64 float dlbuf; //smoothed modulated delay 65 66 char programName[32]; 67 }; 68 69 #endif 70