/[svn]/linuxsampler/trunk/src/engines/sf2/Voice.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/sf2/Voice.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2206 by iliev, Mon Jul 11 17:52:01 2011 UTC revision 2207 by iliev, Fri Jul 15 15:43:49 2011 UTC
# Line 101  namespace LinuxSampler { namespace sf2 { Line 101  namespace LinuxSampler { namespace sf2 {
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    
# Line 411  namespace LinuxSampler { namespace sf2 { Line 411  namespace LinuxSampler { namespace sf2 {
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) {
# Line 434  namespace LinuxSampler { namespace sf2 { Line 436  namespace LinuxSampler { namespace sf2 {
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() {

Legend:
Removed from v.2206  
changed lines
  Added in v.2207

  ViewVC Help
Powered by ViewVC