1 /* ======================================== 2 * Cojones - Cojones.h 3 * Created 8/12/11 by SPIAdmin 4 * Copyright (c) 2011 __MyCompanyName__, All rights reserved 5 * ======================================== */ 6 7 #ifndef __Cojones_H 8 #define __Cojones_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 Cojones { 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 = 'Cojo'; //Change this to what the AU identity is! 33 34 class Cojones : 35 public AudioEffectX 36 { 37 public: 38 Cojones(audioMasterCallback audioMaster); 39 ~Cojones(); 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* txt, 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 long double storedL[2]; 68 long double diffL[6]; 69 70 long double storedR[2]; 71 long double diffR[6]; 72 73 float A; 74 float B; 75 float C; 76 float D; 77 float E; //parameters. Always 0-1, and we scale/alter them elsewhere. 78 79 }; 80 81 } // end namespace Cojones 82 83 #endif 84