1 #ifndef __IPLUGMONOSYNTH__
2 #define __IPLUGMONOSYNTH__
4 #include "IPlug_include_in_plug_hdr.h"
5 #include "IMidiQueue.h"
7 // http://www.musicdsp.org/archive.php?classid=3#257
12 CParamSmooth() { a
= 0.99; b
= 1. - a
; z
= 0.; };
14 inline double Process(double in
) { z
= (in
* b
) + (z
* a
); return z
; }
19 class IPlugMonoSynth
: public IPlug
23 IPlugMonoSynth(IPlugInstanceInfo instanceInfo
);
27 void OnParamChange(int paramIdx
);
29 void ProcessDoubleReplacing(double** inputs
, double** outputs
, int nFrames
);
30 bool HostRequestingAboutBox();
33 bool GetKeyStatus(int key
);
34 void ProcessMidiMsg(IMidiMsg
* pMsg
);
37 IBitmapOverlayControl
* mAboutBox
;
39 int mMeterIdx_L
, mMeterIdx_R
;
41 IMidiQueue mMidiQueue
;
43 int mNumKeys
; // how many keys are being played (via midi)
44 bool mKeyStatus
[128]; // array of on/off for each key
50 double mGainL
, mGainR
;
54 double mPrevL
, mPrevR
;
58 CParamSmooth mGainLSmoother
, mGainRSmoother
;
63 kWidth
= GUI_WIDTH
, // width of plugin window
64 kHeight
= GUI_HEIGHT
, // height of plugin window
74 #endif //__IPLUGMONOSYNTH__