1 /* ========================================
2  *  ButterComp2 - ButterComp2.h
3  *  Created 8/12/11 by SPIAdmin
4  *  Copyright (c) 2011 __MyCompanyName__, All rights reserved
5  * ======================================== */
6 
7 #ifndef __ButterComp2_H
8 #define __ButterComp2_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 ButterComp2 {
19 
20 enum {
21 	kParamA = 0,
22 	kParamB = 1,
23 	kParamC = 2,
24   kNumParameters = 3
25 }; //
26 
27 const int kNumPrograms = 0;
28 const int kNumInputs = 2;
29 const int kNumOutputs = 2;
30 const unsigned long kUniqueId = 'btcq';    //Change this to what the AU identity is!
31 
32 class ButterComp2 :
33     public AudioEffectX
34 {
35 public:
36     ButterComp2(audioMasterCallback audioMaster);
37     ~ButterComp2();
38     virtual bool getEffectName(char* name);                       // The plug-in name
39     virtual VstPlugCategory getPlugCategory();                    // The general category for the plug-in
40     virtual bool getProductString(char* text);                    // This is a unique plug-in string provided by Steinberg
41     virtual bool getVendorString(char* text);                     // Vendor info
42     virtual VstInt32 getVendorVersion();                          // Version number
43     virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames);
44     virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames);
45     virtual void getProgramName(char *name);                      // read the name from the host
46     virtual void setProgramName(char *name);                      // changes the name of the preset displayed in the host
47 	virtual VstInt32 getChunk (void** data, bool isPreset);
48 	virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset);
49     virtual float getParameter(VstInt32 index);                   // get the parameter value at the specified index
50     virtual void setParameter(VstInt32 index, float value);       // set the parameter at index to value
51     virtual void getParameterLabel(VstInt32 index, char *text);  // label for the parameter (eg dB)
52     virtual void getParameterName(VstInt32 index, char *text);    // name of the parameter
53     virtual void getParameterDisplay(VstInt32 index, char *text, float extVal, bool isExternal); // text description of the current value
54     virtual VstInt32 canDo(char *text);
55     bool parseParameterValueFromString(VstInt32 index, const char* txt, float& f);
56 
57  private:
58     char _programName[kVstMaxProgNameLen + 1];
59     std::set< std::string > _canDo;
60 
61 	long double controlAposL;
62 	long double controlAnegL;
63 	long double controlBposL;
64 	long double controlBnegL;
65 	long double targetposL;
66 	long double targetnegL;
67 	long double lastOutputL;
68 	long double controlAposR;
69 	long double controlAnegR;
70 	long double controlBposR;
71 	long double controlBnegR;
72 	long double targetposR;
73 	long double targetnegR;
74 	long double lastOutputR;
75 	bool flip;
76 	long double fpNShapeL;
77 	long double fpNShapeR;
78 	//default stuff
79 
80     float A;
81     float B;
82     float C;
83 
84 };
85 
86 } // end namespace ButterComp2
87 
88 #endif
89