104 |
}; |
}; |
105 |
|
|
106 |
|
|
107 |
|
class EqUnitSupport { |
108 |
|
public: |
109 |
|
EqUnitSupport(SfzSignalUnitRack* pRack, Voice* pVoice = NULL); |
110 |
|
|
111 |
|
SmoothCCUnit suEq1GainOnCC; |
112 |
|
SmoothCCUnit suEq2GainOnCC; |
113 |
|
SmoothCCUnit suEq3GainOnCC; |
114 |
|
|
115 |
|
SmoothCCUnit suEq1FreqOnCC; |
116 |
|
SmoothCCUnit suEq2FreqOnCC; |
117 |
|
SmoothCCUnit suEq3FreqOnCC; |
118 |
|
|
119 |
|
SmoothCCUnit suEq1BwOnCC; |
120 |
|
SmoothCCUnit suEq2BwOnCC; |
121 |
|
SmoothCCUnit suEq3BwOnCC; |
122 |
|
|
123 |
|
void SetVoice(Voice* pVoice); |
124 |
|
void ImportUnits(SfzSignalUnitRack* pRack); |
125 |
|
void ResetUnits(); |
126 |
|
void InitCCLists(Pool<CCSignalUnit::CC>* pCCPool, Pool<Smoother>* pSmootherPool); |
127 |
|
}; |
128 |
|
|
129 |
|
|
130 |
class XFInCCUnit: public CCUnit { |
class XFInCCUnit: public CCUnit { |
131 |
public: |
public: |
132 |
XFInCCUnit(SfzSignalUnitRack* rack, Listener* l = NULL): CCUnit(rack, l) { } |
XFInCCUnit(SfzSignalUnitRack* rack, Listener* l = NULL): CCUnit(rack, l) { } |
201 |
EGv1Unit(SfzSignalUnitRack* rack): EGUnit<EGADSR>(rack), depth(0) { } |
EGv1Unit(SfzSignalUnitRack* rack): EGUnit<EGADSR>(rack), depth(0) { } |
202 |
}; |
}; |
203 |
|
|
204 |
class EGv2Unit: public EGUnit< ::LinuxSampler::sfz::EG> { |
class EGv2Unit: public EGUnit< ::LinuxSampler::sfz::EG>, public EqUnitSupport { |
205 |
protected: |
protected: |
206 |
::sfz::EG egInfo; |
::sfz::EG egInfo; |
207 |
public: |
public: |
316 |
virtual void Trigger(); |
virtual void Trigger(); |
317 |
}; |
}; |
318 |
|
|
319 |
class LFOv2Unit: public LFOUnit { |
class LFOv2Unit: public LFOUnit, public EqUnitSupport { |
320 |
protected: |
protected: |
321 |
FixedArray<AbstractLfo*> lfos; |
FixedArray<AbstractLfo*> lfos; |
322 |
LfoBase<LFOSigned> lfo0; // triangle |
LfoBase<LFOSigned> lfo0; // triangle |
404 |
}; |
}; |
405 |
|
|
406 |
|
|
407 |
class SfzSignalUnitRack : public SignalUnitRack { |
class SfzSignalUnitRack : public SignalUnitRack, public EqUnitSupport { |
408 |
private: |
private: |
409 |
EndpointUnit suEndpoint; |
EndpointUnit suEndpoint; |
410 |
AmpEGUnit suVolEG; |
AmpEGUnit suVolEG; |
415 |
PitchLFOUnit suPitchLFO; |
PitchLFOUnit suPitchLFO; |
416 |
FilLFOUnit suFilLFO; |
FilLFOUnit suFilLFO; |
417 |
|
|
|
CCUnit suEq1GainOnCC; |
|
|
CCUnit suEq2GainOnCC; |
|
|
CCUnit suEq3GainOnCC; |
|
|
|
|
|
CCUnit suEq1FreqOnCC; |
|
|
CCUnit suEq2FreqOnCC; |
|
|
CCUnit suEq3FreqOnCC; |
|
|
|
|
|
CCUnit suEq1BwOnCC; |
|
|
CCUnit suEq2BwOnCC; |
|
|
CCUnit suEq3BwOnCC; |
|
|
|
|
418 |
// SFZ v2 |
// SFZ v2 |
419 |
|
|
420 |
SmoothCCUnit suVolOnCC; |
SmoothCCUnit suVolOnCC; |
436 |
// used for optimization - contains only the ones that are modulating resonance |
// used for optimization - contains only the ones that are modulating resonance |
437 |
FixedArray<EGv2Unit*> resEGs; |
FixedArray<EGv2Unit*> resEGs; |
438 |
|
|
439 |
// used for optimization - contains only the ones that are modulating pitch |
// used for optimization - contains only the ones that are modulating pan |
440 |
FixedArray<EGv2Unit*> panEGs; |
FixedArray<EGv2Unit*> panEGs; |
441 |
|
|
442 |
|
// used for optimization - contains only the ones that are modulating EQ |
443 |
|
FixedArray<EGv2Unit*> eqEGs; |
444 |
|
|
445 |
|
|
446 |
FixedArray<LFOv2Unit*> LFOs; |
FixedArray<LFOv2Unit*> LFOs; |
447 |
|
|
460 |
// used for optimization - contains only the ones that are modulating pan |
// used for optimization - contains only the ones that are modulating pan |
461 |
FixedArray<LFOv2Unit*> panLFOs; |
FixedArray<LFOv2Unit*> panLFOs; |
462 |
|
|
463 |
|
// used for optimization - contains only the ones that are modulating EQ |
464 |
|
FixedArray<LFOv2Unit*> eqLFOs; |
465 |
|
|
466 |
|
|
467 |
public: |
public: |
468 |
Voice* const pVoice; |
Voice* const pVoice; |