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

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

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

revision 3655 by schoenebeck, Fri Dec 13 17:14:48 2019 UTC revision 3721 by schoenebeck, Mon Jan 20 15:10:05 2020 UTC
# Line 186  namespace LinuxSampler { namespace gig { Line 186  namespace LinuxSampler { namespace gig {
186          const bool isGStFilter = isGStFilterType(pRegion->VCFType);          const bool isGStFilter = isGStFilterType(pRegion->VCFType);
187    
188          if (pRegion->VCFCutoffControllerInvert) ccvalue = 127 - ccvalue;          if (pRegion->VCFCutoffControllerInvert) ccvalue = 127 - ccvalue;
189          if (isGStFilter) {          // interpret "minimum cutoff" not simply as hard limit, rather
190              // VCFVelocityScale in this case means "minimum cutoff" for GSt          // restrain it to min_cutoff..127 range, but spanned / remapped over
191              if (ccvalue < MinCutoff()) ccvalue = MinCutoff();          // the entire controller range (0..127) to avoid a "dead" lower
192          } else {          // controller zone (that is to avoid a certain CC value range where
193              // for our own filter types we interpret "minimum cutoff"          // the controller would not change the cutoff frequency)
194              // differently: GSt handles this as a simple hard limit with the          ccvalue = MinCutoff() + (ccvalue / 127.f) * float(127 - MinCutoff());
             // consequence that a certain range of the controller is simply  
             // dead; so for our filter types we rather remap that to  
             // restrain within the min_cutoff..127 range as well, but  
             // effectively spanned over the entire controller range (0..127)  
             // to avoid such a "dead" lower controller zone  
             ccvalue = MinCutoff() + (ccvalue / 127.f) * float(127 - MinCutoff());  
         }  
195    
196          float cutoff = CutoffBase * ccvalue;          float cutoff = CutoffBase * ccvalue;
197          if (cutoff > 127.0f) cutoff = 127.0f;          if (cutoff > 127.0f) cutoff = 127.0f;

Legend:
Removed from v.3655  
changed lines
  Added in v.3721

  ViewVC Help
Powered by ViewVC