Skip to content

Commit

Permalink
Fix #320949: Glissando playback (portamento) issue
Browse files Browse the repository at this point in the history
Duplicate of musescore#8074, resp. backport if musescore#8075
  • Loading branch information
Jojo-Schmitz committed Aug 19, 2021
1 parent 9d9f215 commit dabde9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmscore/rendermidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static void playNote(EventMap* events, const Note* note, int channel, int pitch,
Glissando *glissando = toGlissando(spanner);
if (glissando->glissandoStyle() == GlissandoStyle::PORTAMENTO) {
Note* nextNote = toNote(spanner->endElement());
double pitchDelta = (static_cast<double>(nextNote->pitch()) - pitch) * 50.0;
double pitchDelta = (static_cast<double>(nextNote->ppitch()) - pitch) * 50.0;
double timeDelta = static_cast<double>(offTime - onTime);
if (pitchDelta != 0.0 && timeDelta != 0.0) {
double timeStep = std::abs(timeDelta / pitchDelta * 20.0);
Expand Down

0 comments on commit dabde9c

Please sign in to comment.