/[svn]/linuxsampler/trunk/src/engines/common/AbstractVoice.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/AbstractVoice.cpp

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

revision 3301 by schoenebeck, Mon May 29 22:19:19 2017 UTC revision 3302 by schoenebeck, Sun Jul 9 19:35:18 2017 UTC
# Line 860  namespace LinuxSampler { Line 860  namespace LinuxSampler {
860          // GSt behaviour: maximum transpose up is 40 semitones. If          // GSt behaviour: maximum transpose up is 40 semitones. If
861          // MIDI key is more than 40 semitones above unity note,          // MIDI key is more than 40 semitones above unity note,
862          // the transpose is not done.          // the transpose is not done.
863          if (!SmplInfo.Unpitched && (MIDIKey() - (int) RgnInfo.UnityNote) < 40) pitchbasecents += (MIDIKey() - (int) RgnInfo.UnityNote) * 100;          //
864            // Update: Removed this GSt misbehavior. I don't think that any stock
865            // gig sound requires it to resemble its original sound.
866            // -- Christian, 2017-07-09
867            if (!SmplInfo.Unpitched /* && (MIDIKey() - (int) RgnInfo.UnityNote) < 40*/)
868                pitchbasecents += (MIDIKey() - (int) RgnInfo.UnityNote) * 100;
869    
870          pitch.PitchBase = RTMath::CentsToFreqRatioUnlimited(pitchbasecents) * (double(SmplInfo.SampleRate) / double(GetEngine()->SampleRate));          pitch.PitchBase = RTMath::CentsToFreqRatioUnlimited(pitchbasecents) * (double(SmplInfo.SampleRate) / double(GetEngine()->SampleRate));
871          pitch.PitchBendRange = 1.0 / 8192.0 * 100.0 * InstrInfo.PitchbendRange;          pitch.PitchBendRange = 1.0 / 8192.0 * 100.0 * InstrInfo.PitchbendRange;
# Line 876  namespace LinuxSampler { Line 881  namespace LinuxSampler {
881          // GSt behaviour: maximum transpose up is 40 semitones. If          // GSt behaviour: maximum transpose up is 40 semitones. If
882          // MIDI key is more than 40 semitones above unity note,          // MIDI key is more than 40 semitones above unity note,
883          // the transpose is not done.          // the transpose is not done.
884          if (!SmplInfo.Unpitched && (MIDIKey() - (int) RgnInfo.UnityNote) < 40) pitchbasecents += (MIDIKey() - (int) RgnInfo.UnityNote) * 100;          //
885            // Update: Removed this GSt misbehavior. I don't think that any stock
886            // gig sound requires it to resemble its original sound.
887            // -- Christian, 2017-07-09
888            if (!SmplInfo.Unpitched /* && (MIDIKey() - (int) RgnInfo.UnityNote) < 40*/)
889                pitchbasecents += (MIDIKey() - (int) RgnInfo.UnityNote) * 100;
890                    
891          pitch.PitchBase = RTMath::CentsToFreqRatioUnlimited(pitchbasecents) * (double(SmplInfo.SampleRate) / double(GetEngine()->SampleRate));          pitch.PitchBase = RTMath::CentsToFreqRatioUnlimited(pitchbasecents) * (double(SmplInfo.SampleRate) / double(GetEngine()->SampleRate));
892          this->Pitch = pitch;          this->Pitch = pitch;

Legend:
Removed from v.3301  
changed lines
  Added in v.3302

  ViewVC Help
Powered by ViewVC