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 |
|
inline int GetCurveCount(); |
72 |
|
inline ::sfz::Curve* GetCurve(int idx); |
73 |
|
}; |
74 |
|
|
75 |
|
class CurveCCUnit: public CCUnit { |
76 |
|
public: |
77 |
|
CurveCCUnit(SfzSignalUnitRack* rack, Listener* l = NULL): CCUnit(rack, l) { } |
78 |
|
|
79 |
|
virtual void Calculate() { |
80 |
|
Level = 0; |
81 |
|
for (int i = 0; i < Ctrls.size(); i++) { |
82 |
|
if (Ctrls[i].Value == 0) continue; |
83 |
|
if (Ctrls[i].Curve == -1) { |
84 |
|
Level += (Ctrls[i].Value / 127.0f) * Ctrls[i].Influence; |
85 |
|
} else { |
86 |
|
Level += GetCurve(Ctrls[i].Curve)->v[Ctrls[i].Value] * Ctrls[i].Influence; |
87 |
|
} |
88 |
|
} |
89 |
|
} |
90 |
}; |
}; |
91 |
|
|
92 |
|
|
297 |
}; |
}; |
298 |
|
|
299 |
|
|
|
|
|
300 |
class EndpointUnit: public EndpointSignalUnit { |
class EndpointUnit: public EndpointSignalUnit { |
301 |
public: |
public: |
302 |
Voice* pVoice; |
Voice* pVoice; |
333 |
PitchLFOUnit suPitchLFO; |
PitchLFOUnit suPitchLFO; |
334 |
FilLFOUnit suFilLFO; |
FilLFOUnit suFilLFO; |
335 |
|
|
336 |
|
// SFZ v2 |
337 |
|
|
338 |
|
CurveCCUnit suVolOnCC; |
339 |
|
|
340 |
FixedArray<EGv2Unit*> EGs; |
FixedArray<EGv2Unit*> EGs; |
341 |
|
|
342 |
// used for optimization - contains only the ones that are modulating volume |
// used for optimization - contains only the ones that are modulating volume |