NotePool: Fix obscure legato pitch bug
commit1853f69fb2e42ca0b0172f79786e72fc250f6c42
authorRicard Wanderlof <polluxsynth@butoba.net>
Sat, 16 Oct 2021 00:09:48 +0000 (16 02:09 +0200)
committerMark McCurry <mark.d.mccurry@gmail.com>
Thu, 9 Dec 2021 03:42:34 +0000 (8 22:42 -0500)
treef625ce759f468493a642bbfc9efc150f376e5de2
parent4b59194819a09c4cf5c0e540acff6caa996f033c
NotePool: Fix obscure legato pitch bug

Fix obscure bug where the pitch of a previously played and currently
releasing legato note (i.e. a note formed by playing one note, and
holding it while playing another) will jump to the pitch of a newly
played legato note (i.e., again, not a single note, but a first
note played and helt while playing a second), instead of releasing at
its original pitch.

This is due to applyLegato() setting all note descriptors to the same
note number, including those releasing. Although setting previous
notes to the same pitch as new ones will give the impression of a
single voice being played, this did not happen for the first note
played, and furthermore, gathering all released voices at the new
pitch means there will be an unintended plurality of voices at that
pitch.
src/Containers/NotePool.cpp