1 /* ========================================
2  *  Density - Density.h
3  *  Created 8/12/11 by SPIAdmin
4  *  Copyright (c) 2011 __MyCompanyName__, All rights reserved
5  * ======================================== */
6 
7 #ifndef __Density_H
8 #define __Density_H
9 
10 #ifndef __audioeffect__
11 #include "airwindows/AirWinBaseClass.h"
12 #endif
13 
14 #include <set>
15 #include <string>
16 #include <math.h>
17 
18 namespace Density {
19 
20 enum {
21 	kParamA = 0,
22 	kParamB = 1,
23 	kParamC = 2,
24 	kParamD = 3,
25   kNumParameters = 4
26 }; //
27 
28 const int kNumPrograms = 0;
29 const int kNumInputs = 2;
30 const int kNumOutputs = 2;
31 const unsigned long kUniqueId = 'dens';    //Change this to what the AU identity is!
32 
33 class Density :
34     public AudioEffectX
35 {
36 public:
37     Density(audioMasterCallback audioMaster);
38     ~Density();
39     virtual bool getEffectName(char* name);                       // The plug-in name
40     virtual VstPlugCategory getPlugCategory();                    // The general category for the plug-in
41     virtual bool getProductString(char* text);                    // This is a unique plug-in string provided by Steinberg
42     virtual bool getVendorString(char* text);                     // Vendor info
43     virtual VstInt32 getVendorVersion();                          // Version number
44     virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames);
45     virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames);
46     virtual void getProgramName(char *name);                      // read the name from the host
47     virtual void setProgramName(char *name);                      // changes the name of the preset displayed in the host
48 	virtual VstInt32 getChunk (void** data, bool isPreset);
49 	virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset);
50     virtual float getParameter(VstInt32 index);                   // get the parameter value at the specified index
51     virtual void setParameter(VstInt32 index, float value);       // set the parameter at index to value
52     virtual void getParameterLabel(VstInt32 index, char *text);  // label for the parameter (eg dB)
53     virtual void getParameterName(VstInt32 index, char *text);    // name of the parameter
54     virtual void getParameterDisplay(VstInt32 index, char *text, float extVal, bool isExternal); // text description of the current value
55     virtual VstInt32 canDo(char *text);
56     bool parseParameterValueFromString(VstInt32 index, const char* str, float& f);
57 
58  private:
59     char _programName[kVstMaxProgNameLen + 1];
60     std::set< std::string > _canDo;
61 
62 	long double fpNShapeL;
63 	long double fpNShapeR;
64 	//default stuff
65 	double iirSampleAL;
66 	double iirSampleBL;
67 	double iirSampleAR;
68 	double iirSampleBR;
69 	bool fpFlip;
70     float A;
71     float B;
72     float C;
73     float D; //parameters. Always 0-1, and we scale/alter them elsewhere.
74 
75 };
76 
77 } // end namespace Density
78 
79 #endif
80