Glissando playback (portamento) issue

• May 7, 2021 - 15:34
Reported version
S3 - Major

Someone may want to take a look at rendermidi.cpp : playnote() at around line 270.

I think this:
double pitchDelta = (static_cast(nextNote->pitch()) - pitch) * 50.0;

should be:
double pitchDelta = (static_cast(nextNote->ppitch()) - pitch) * 50.0;

Otherwise you get a ppitch()/pitch() mismatch and strange things can happen to portamento glissando.


In reply to by Jojo-Schmitz

The code above is setting the midi pitch wheel for a slide between 2 notes. One pitch comes from note->pitch() and the other comes from note->ppitch(). If there is a CAPO set (or octava), ppitch will take that into account and pitch will ignore it. In other words, a portamento gliss will set the midi pitch wheel incorrectly when a capo (or octava) is set.

It is really hard to hear but really easy to fix (just add a 'p').

I see, I though it were 'just' about transposing instruments, but can't spot a difference in sound between e.g. a Bb- and a C-Clarinet (attached, and yes, I know it doesn't really make sense for these instruments, and there's also a strange 'woodblock' noise at the end of the gliss.)
I'd still like a sample score that demonstrates this

Attachment Size
Unbenannt.mscz 4.48 KB

In reply to by Jojo-Schmitz

That woodblock sound is heard (like plop sound) as the ending pitch drops momentarily after glissando to the starting pitch.

In the attached score, the playback setting of the target note has been disabled and the tempo setting has been reduced so that the Issue is more noticeable.

Note: If the target note is being played normally, this transition must be ensured to be smooth.

Attachment Size
Unbenannt-test-z01.mscz 5.21 KB

I think the only way to get a smooth sound is to run the midi pitch wheel up to the second note and leave it there for the entire duration of the second note (and don't sound the second note as a separate thing). This would be great for guitar music (i.e. legato slide).