1 #ifndef __IPLUGEFFECT__
2 #define __IPLUGEFFECT__
4 #include "IPlug_include_in_plug_hdr.h"
5 #include "IPlugChunks_controls.h"
9 IPlugChunks - an example of storing data in chunks, and custom IControl classes
11 A step sequenced volume control / tarnce gate
13 Using chunks allows you to store arbitary data (e.g. a hidden, non-automatable parameter, a filepath etc) in the plugin's state,
14 i.e. when you save a preset to a file or when you save the project in your host
16 You need to override SerializeState / UnserializeState and set PLUG_DOES_STATE_CHUNKS 1 in resource.h
18 // WARNING - I'm not happy with how the multislider data is shared with the high priority thread
19 // need to rethink that
24 #define NUM_SLIDERS 16
25 #define BEAT_DIV 4 // semiquavers
27 class IPlugChunks
: public IPlug
31 IPlugChunks(IPlugInstanceInfo instanceInfo
);
35 void OnParamChange(int paramIdx
);
37 void ProcessDoubleReplacing(double** inputs
, double** outputs
, int nFrames
);
39 bool SerializeState(ByteChunk
* pChunk
);
40 int UnserializeState(ByteChunk
* pChunk
, int startPos
);
41 bool CompareState(const unsigned char* incomingState
, int startPos
);
43 void PresetsChangedByHost();
47 double mSteps
[NUM_SLIDERS
];
50 unsigned long mCount
, mPrevCount
;
52 MultiSliderControlV
*mMSlider
;