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