It appears that aftertouch doesn't trigger an amplitude interpolation (or an insufficient one).
In the case that this doesn't appear to be the issue, the root problem being addressed is aftertouch can introduce 'clicks', with instruments like "Fantasy Organ" creating rather noticable ones.
I can't attach/upload the files directly here.
The .mid is a C4 (48) Note On, followed by hundred+something PolyKeyPressure events and a Note Off. Played through zyn.lv2 (3.0.0 2016-nov-22) using the "Fantasy Organ" preset.
http://robin.linuxaudio.org/tmp/poly_key_pressure.mid
http://robin.linuxaudio.org/tmp/poly_key_pressure_zyn_fantasy_organ.wav.xz
All three synths had the same logic error preventing amplitude interpolation on aftertouch. In addition I found several problems in each of the three synths.
ADnote had a logic problem wherein panning to the far left value would cause the use of a random panning instead. Not sure why, but the change to the random panning seems to cause a pop. I need some advice on whether the thing the logic was trying to do is still something we need. I fixed it by commenting out some code causing the randomness at various places in the code.
ADnote also had a problem of randomizing its phase in legatonote where it should not have been. I eliminated calls to newrandseed() and get() on a legato notes voices. Think this is right, but not sure it doesn't have side effects I'm unaware of.
SUBnote had the additional problem of calling setupFilters() for legato case whereas it should have only been called for new notes not legato notes. Calling setupFilters() in the legato case changes the phase amongst other things that causes a pop.
PADnote contained an error wherein a firsttime variable was set to true for legato case which would trigger a fade-in and cause a pop.
I'm attaching a before and after wav files using "ugly bells" preset.
Also attaching patch.
Last edit: Daniel Sheeler 2018-09-02
On 09-02, Daniel Sheeler wrote:
I do know a number of patches intentionally use this feature, so I'm guessing
the best approach is to ensure that each synth engine has an explicit random
seed which can be used to generate the panning (as well as some other values).
For aftertouch that should be fine, though I'm trying to think for normal legato
if it properly gets a new wavetable based around a different frequency. If it
does, then different base frequencies would have desired differences in higher
spectral content (due to anti-aliasing).
As long as the random seed is the same, then the output wavetable should be
equivalent.
Sound good to me
Sounds good to me.
And that sounds like a huge improvement to me.
It looks like the patch set was applied around the same time based upon a quick look into the commit logs. If I'm wrong feel free to ping this issue and we'll migrate it.