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