--- linuxsampler/trunk/src/voice.cpp 2003/12/26 16:39:58 26 +++ linuxsampler/trunk/src/voice.cpp 2004/01/02 00:02:56 28 @@ -101,7 +101,9 @@ dmsg(4,("RAM only voice launched (Looping: %s)\n", (RAMLoop) ? "yes" : "no")); } - CurrentPitch = pow(2, (double) (MIDIKey - (int) pSample->MIDIUnityNote) / (double) 12); + // Pitch according to keyboard position (if keyrange > 1 key) + CurrentPitch = (pRegion->KeyRange.high != pRegion->KeyRange.low) ? + pow(2, (double) (MIDIKey - (int) pSample->MIDIUnityNote) / (double) 12) : 1.0; Volume = pDimRgn->GetVelocityAttenuation(Velocity); // ************************************************