1 #ifndef __IPLUGMULTITARGETS__
2 #define __IPLUGMULTITARGETS__
4 #include "IPlug_include_in_plug_hdr.h"
5 #include "IMidiQueue.h"
11 // http://www.musicdsp.org/archive.php?classid=3#257
16 CParamSmooth() { a
= 0.99; b
= 1. - a
; z
= 0.; };
18 inline double Process(double in
) { z
= (in
* b
) + (z
* a
); return z
; }
23 class IPlugMultiTargets
: public IPlug
27 IPlugMultiTargets(IPlugInstanceInfo instanceInfo
);
31 void OnParamChange(int paramIdx
);
34 void ProcessSingleReplacing(float** inputs
, float** outputs
, int nFrames
);
36 void ProcessDoubleReplacing(double** inputs
, double** outputs
, int nFrames
);
37 bool HostRequestingAboutBox();
41 bool GetKeyStatus(int key
);
42 void ProcessMidiMsg(IMidiMsg
* pMsg
);
46 IBitmapOverlayControl
* mAboutBox
;
48 int mMeterIdx_L
, mMeterIdx_R
;
51 IMidiQueue mMidiQueue
;
53 int mNumKeys
; // how many keys are being played (via midi)
54 bool mKeyStatus
[128]; // array of on/off for each key
60 double mGainL
, mGainR
;
64 double mPrevL
, mPrevR
;
68 CParamSmooth mGainLSmoother
, mGainRSmoother
;
74 kWidth
= GUI_WIDTH
, // width of plugin window
75 kHeight
= GUI_HEIGHT
, // height of plugin window
85 #endif //__IPLUGMULTITARGETS__