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 __mdaBeatBox_H
20 #define __mdaBeatBox_H
21 
22 #include "audioeffectx.h"
23 
24 #include <cstdint>
25 
26 class mdaBeatBox : public AudioEffectX
27 {
28 public:
29 	mdaBeatBox(audioMasterCallback audioMaster);
30 	~mdaBeatBox();
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   virtual void synth();
44 
45 	virtual bool getEffectName(char *name);
46 	virtual bool getVendorString(char *text);
47 	virtual bool getProductString(char *text);
getVendorVersion()48 	virtual int32_t getVendorVersion() { return 1000; }
49 
50 protected:
51 	float fParam1;
52   float fParam2;
53   float fParam3;
54   float fParam4;
55   float fParam5;
56   float fParam6;
57   float fParam7;
58 	float fParam8;
59   float fParam9;
60   float fParam10;
61   float fParam11;
62   float fParam12;
63   float hthr, hfil, sthr, kthr, mix;
64   float klev, hlev, slev;
65   float  ww,  wwx,  sb1,  sb2,  sf1,  sf2, sf3;
66   float kww, kwwx, ksb1, ksb2, ksf1, ksf2;
67   float dyne, dyna, dynr, dynm;
68 
69   float *hbuf;
70   float *kbuf;
71   float *sbuf, *sbuf2;
72 	int32_t hbuflen, hbufpos, hdel;
73 	int32_t sbuflen, sbufpos, sdel, sfx;
74   int32_t kbuflen, kbufpos, kdel, ksfx;
75   int32_t rec, recx, recpos;
76 
77 	char programName[32];
78 };
79 
80 #endif
81