Merge pull request #14 from yokemura/bugfix/InitialPitchBendAmount

Initial bend amount wasn't reflected to a starting note
This commit is contained in:
Takeshi Yokemura 2021-05-01 21:59:44 +09:00 committed by GitHub
commit 6067742d75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ void TonalVoice::startNote (int midiNoteNumber, float velocity, SynthesiserSound
{
BaseVoice::startNote (midiNoteNumber, velocity, 0, currentPitchBendPosition);
currentBendAmount = 0;
currentBendAmount = * (settingRefs->bendRange) * ((double) (currentPitchBendPosition - 8192)) / 8192.0;
currentPitchSequenceFrame = 0;
vibratoCount = 0;