101 |
// sample pitch |
// sample pitch |
102 |
ri.EG3Attack = 0; // TODO: |
ri.EG3Attack = 0; // TODO: |
103 |
ri.EG3Depth = 0; // TODO: |
ri.EG3Depth = 0; // TODO: |
104 |
ri.VCFEnabled = false; // TODO: |
ri.VCFEnabled = true; // TODO: |
105 |
ri.VCFType = Filter::vcf_type_2p_lowpass; // TODO: |
ri.VCFType = Filter::vcf_type_2p_lowpass; // TODO: |
106 |
ri.VCFResonance = 0; // TODO: |
ri.VCFResonance = 0; // TODO: |
107 |
|
|
411 |
} |
} |
412 |
|
|
413 |
float Voice::CalculateCutoffBase(uint8_t MIDIKeyVelocity) { |
float Voice::CalculateCutoffBase(uint8_t MIDIKeyVelocity) { |
414 |
/*float cutoff = pRegion->GetVelocityCutoff(MIDIKeyVelocity); |
float cutoff = pRegion->GetInitialFilterFc(pPresetRegion); |
415 |
if (pRegion->VCFKeyboardTracking) { |
if (MIDIKeyVelocity == 0) return cutoff; |
416 |
cutoff *= RTMath::CentsToFreqRatioUnlimited((MIDIKey - pRegion->VCFKeyboardTrackingBreakpoint) * 100); |
|
417 |
} |
cutoff *= RTMath::CentsToFreqRatioUnlimited ( |
418 |
return cutoff;*/ // TODO: ^^^ |
((127 - MIDIKeyVelocity) / 127.0) * -2400 // 8.4.2 MIDI Note-On Velocity to Filter Cutoff |
419 |
return 1.0f; |
); |
420 |
|
|
421 |
|
return cutoff; |
422 |
} |
} |
423 |
|
|
424 |
float Voice::CalculateFinalCutoff(float cutoffBase) { |
float Voice::CalculateFinalCutoff(float cutoffBase) { |
436 |
if (fco > 127.0f) fco = 127.0f; |
if (fco > 127.0f) fco = 127.0f; |
437 |
|
|
438 |
return fco;*/ // TODO: ^^^ |
return fco;*/ // TODO: ^^^ |
439 |
return 0.0f; |
return cutoffBase; |
440 |
} |
} |
441 |
|
|
442 |
uint8_t Voice::GetVCFCutoffCtrl() { |
uint8_t Voice::GetVCFCutoffCtrl() { |