1 #ifndef WaveShape_H 2 #define WaveShape_H 3 4 #include "ExprArray.h" 5 #include "ExpressionDict.h" 6 7 8 class ArgList; 9 class PixPort; 10 11 class WaveShape { 12 13 public: 14 15 16 WaveShape( float* inTPtr ); 17 18 void SetMagFcn( ExprUserFcn** inMagFcn ); 19 20 void SetFFTFcn( ExprUserFcn** InFFTFcn ); 21 22 void Load( ArgList& inArgs, long inDefaultNumSteps ); 23 24 25 void SetupTransition( WaveShape* inDest ); 26 27 #define SHAPE_MORPH_ALPHA 1.7 28 29 30 void Draw( long inNumSteps, PixPort& inDest, float inFader, WaveShape* inWave2, float inMorphPct ); 31 32 protected: 33 34 // Holds a copy of the ptr to the external time index 35 float* mTPtr; 36 37 38 // Dict vars 39 float mPI, mNumSampleBins, mNumFFTBins; 40 float mMouseX, mMouseY; 41 42 ExpressionDict mDict; 43 float mShapeTrans; 44 long mNumWaves; 45 bool mAspect1to1; 46 bool mConnectBins, mConnectBinsOrig; 47 bool mConnectFirstLast, mConnectFirstLastOrig; 48 ExprArray mA, mB, mC; 49 ExprArray mWaveY; 50 ExprArray mWaveX; 51 Expression mLineWidth; 52 Expression mNum_S_Steps; 53 Expression mIntensity; 54 bool mPen_Dep_S; 55 bool mLineWidth_Dep_S; 56 57 58 void SetupFrame( WaveShape* inDest, float inW ); 59 60 static float sS; 61 static long sXY[ 2 * MAX_WAVES_PER_SHAPE ]; 62 static long sStartXY[ 2 * MAX_WAVES_PER_SHAPE ]; 63 64 void CalcNumS_Steps( WaveShape* inWave2, long inDefaultNumBins ); 65 }; 66 67 #endif 68