/[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 2327 by persson, Sat Mar 10 16:16:14 2012 UTC revision 2396 by schoenebeck, Tue Jan 8 12:00:45 2013 UTC
# Line 474  namespace LinuxSampler { namespace gig { Line 474  namespace LinuxSampler { namespace gig {
474          // TODO: The SustainPedal condition could be wrong, maybe the          // TODO: The SustainPedal condition could be wrong, maybe the
475          // check should be if this Voice is in release stage or is a          // check should be if this Voice is in release stage or is a
476          // release sample instead. Need to test this in GSt.          // release sample instead. Need to test this in GSt.
477          if (itEvent->Param.Note.Key != MIDIKey ||          // -- Andreas
478              !GetGigEngineChannel()->SustainPedal) {          //
479            // Commented sustain pedal check out. I don't think voices of the same
480            // note should be stopped at all, because it doesn't sound naturally
481            // with a drumkit.
482            // -- Christian, 2013-01-08
483            if (itEvent->Param.Note.Key != MIDIKey /*||
484                !GetGigEngineChannel()->SustainPedal*/) {
485              dmsg(4,("Voice %x - kill", this));              dmsg(4,("Voice %x - kill", this));
486    
487              // kill the voice fast              // kill the voice fast
# Line 487  namespace LinuxSampler { namespace gig { Line 493  namespace LinuxSampler { namespace gig {
493          EG1.CalculateFadeOutCoeff(FadeOutTime, SampleRate);          EG1.CalculateFadeOutCoeff(FadeOutTime, SampleRate);
494      }      }
495    
496        int Voice::CalculatePan(uint8_t pan) {
497            int p;
498            // Gst behaviour: -64 and 63 are special cases
499            if (RgnInfo.Pan == -64)     p = pan * 2 - 127;
500            else if (RgnInfo.Pan == 63) p = pan * 2;
501            else                        p = pan + RgnInfo.Pan;
502    
503            if (p < 0) return 0;
504            if (p > 127) return 127;
505            return p;
506        }
507    
508  }} // namespace LinuxSampler::gig  }} // namespace LinuxSampler::gig

Legend:
Removed from v.2327  
changed lines
  Added in v.2396

  ViewVC Help
Powered by ViewVC