1 /* ========================================
2  *  Mojo - Mojo.h
3  *  Created 8/12/11 by SPIAdmin
4  *  Copyright (c) 2011 __MyCompanyName__, All rights reserved
5  * ======================================== */
6 
7 #ifndef __Mojo_H
8 #define __Mojo_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 Mojo {
19 
20 enum {
21 	kParamA = 0,
22   kNumParameters = 1
23 }; //
24 
25 const int kNumPrograms = 0;
26 const int kNumInputs = 2;
27 const int kNumOutputs = 2;
28 const unsigned long kUniqueId = 'mojo';    //Change this to what the AU identity is!
29 
30 class Mojo :
31     public AudioEffectX
32 {
33 public:
34     Mojo(audioMasterCallback audioMaster);
35     ~Mojo();
36     virtual bool getEffectName(char* name);                       // The plug-in name
37     virtual VstPlugCategory getPlugCategory();                    // The general category for the plug-in
38     virtual bool getProductString(char* text);                    // This is a unique plug-in string provided by Steinberg
39     virtual bool getVendorString(char* text);                     // Vendor info
40     virtual VstInt32 getVendorVersion();                          // Version number
41     virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames);
42     virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames);
43     virtual void getProgramName(char *name);                      // read the name from the host
44     virtual void setProgramName(char *name);                      // changes the name of the preset displayed in the host
45 	virtual VstInt32 getChunk (void** data, bool isPreset);
46 	virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset);
47     virtual float getParameter(VstInt32 index);                   // get the parameter value at the specified index
48     virtual void setParameter(VstInt32 index, float value);       // set the parameter at index to value
49     virtual void getParameterLabel(VstInt32 index, char *text);  // label for the parameter (eg dB)
50     virtual void getParameterName(VstInt32 index, char *text);    // name of the parameter
51     virtual void getParameterDisplay(VstInt32 index, char *text, float extVal, bool isExternal); // text description of the current value
52     virtual VstInt32 canDo(char *text);
53     bool parseParameterValueFromString(VstInt32 index, const char* str, float& f);
54     bool isParameterBipolar(VstInt32 index);
55 
56  private:
57     char _programName[kVstMaxProgNameLen + 1];
58     std::set< std::string > _canDo;
59 
60 	uint32_t fpd;
61 	//default stuff
62 
63     float A;
64 };
65 
66 } // end namespace Mojo
67 
68 #endif
69