67 |
|
|
68 |
void SetCCs(::sfz::Array<int>& pCC); |
void SetCCs(::sfz::Array<int>& pCC); |
69 |
void SetCCs(ArrayList< ::sfz::CC>& cc); |
void SetCCs(ArrayList< ::sfz::CC>& cc); |
70 |
|
|
71 |
|
virtual void AddSmoothCC(uint8_t Controller, float Influence, short int Curve, float Smooth); |
72 |
|
|
73 |
|
inline int GetCurveCount(); |
74 |
|
inline ::sfz::Curve* GetCurve(int idx); |
75 |
|
|
76 |
|
double GetSampleRate(); |
77 |
|
}; |
78 |
|
|
79 |
|
class CurveCCUnit: public CCUnit { |
80 |
|
public: |
81 |
|
CurveCCUnit(SfzSignalUnitRack* rack, Listener* l = NULL): CCUnit(rack, l) { } |
82 |
|
|
83 |
|
virtual float Normalize(uint8_t val, short int curve = -1) { |
84 |
|
if (curve == -1) return val / 127.0f; |
85 |
|
return GetCurve(curve)->v[val]; |
86 |
|
} |
87 |
|
}; |
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
class SmoothCCUnit: public CurveCCUnit { |
92 |
|
protected: |
93 |
|
Smoother Smoothers[128]; |
94 |
|
public: |
95 |
|
SmoothCCUnit(SfzSignalUnitRack* rack, Listener* l = NULL): CurveCCUnit(rack, l) { } |
96 |
|
|
97 |
|
virtual void AddSmoothCC(uint8_t Controller, float Influence, short int Curve, float Smooth); |
98 |
}; |
}; |
99 |
|
|
100 |
|
|
305 |
}; |
}; |
306 |
|
|
307 |
|
|
|
|
|
308 |
class EndpointUnit: public EndpointSignalUnit { |
class EndpointUnit: public EndpointSignalUnit { |
309 |
public: |
public: |
310 |
Voice* pVoice; |
Voice* pVoice; |
341 |
PitchLFOUnit suPitchLFO; |
PitchLFOUnit suPitchLFO; |
342 |
FilLFOUnit suFilLFO; |
FilLFOUnit suFilLFO; |
343 |
|
|
344 |
|
// SFZ v2 |
345 |
|
|
346 |
|
SmoothCCUnit suVolOnCC; |
347 |
|
|
348 |
FixedArray<EGv2Unit*> EGs; |
FixedArray<EGv2Unit*> EGs; |
349 |
|
|
350 |
// used for optimization - contains only the ones that are modulating volume |
// used for optimization - contains only the ones that are modulating volume |