-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModularProcessor.h
43 lines (30 loc) · 964 Bytes
/
ModularProcessor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef __MODULAR_PROCESSOR__H__
#define __MODULAR_PROCESSOR__H__
#include "IPlug_include_in_plug_hdr.h"
#include <vector>
class ModularProcessor
{
public:
ModularProcessor(int nParams);
~ModularProcessor();
void NotifyParamChange(int paramIndex);
void SetSampleRate(double sampleRate);
void Reset();
void RegisterParameterList(std::vector<std::pair<int, int>> parameterList);
void RegisterParameter(int paramIndex, int paramType);
void SetParentPlugin(IPlugBase* pPlug);
double GetParamValue(int paramType);
int GetParamIntValue(int paramType);
double GetParamNormalized(int paramType);
protected:
virtual void HandleParamChange(int paramType, double newValue, int newIntValue);
virtual void HandleHostReset();
IParam* GetParamObject(int paramType);
double GetSampleRate();
private:
IPlugBase* mpPlug;
std::vector<int> mParamIndicies;
double mSampleRate;
int LookupParamType(int paramIndex);
};
#endif // !__MODULAR_PROCESSOR__H__