/[svn]/linuxsampler/trunk/src/voice.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/voice.cpp

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

revision 27 by schoenebeck, Fri Dec 26 16:39:58 2003 UTC revision 28 by schoenebeck, Fri Jan 2 00:02:56 2004 UTC
# Line 101  int Voice::Trigger(int MIDIKey, uint8_t Line 101  int Voice::Trigger(int MIDIKey, uint8_t
101          dmsg(4,("RAM only voice launched (Looping: %s)\n", (RAMLoop) ? "yes" : "no"));          dmsg(4,("RAM only voice launched (Looping: %s)\n", (RAMLoop) ? "yes" : "no"));
102      }      }
103    
104      CurrentPitch = pow(2, (double) (MIDIKey - (int) pSample->MIDIUnityNote) / (double) 12);      // Pitch according to keyboard position (if keyrange > 1 key)
105        CurrentPitch = (pRegion->KeyRange.high != pRegion->KeyRange.low) ?
106                               pow(2, (double) (MIDIKey - (int) pSample->MIDIUnityNote) / (double) 12) : 1.0;
107      Volume       = pDimRgn->GetVelocityAttenuation(Velocity);      Volume       = pDimRgn->GetVelocityAttenuation(Velocity);
108    
109      // ************************************************      // ************************************************

Legend:
Removed from v.27  
changed lines
  Added in v.28

  ViewVC Help
Powered by ViewVC