TAL Sampler: read the pitch envelope depth from the correct matrix row#223
Merged
git-moss merged 1 commit intoJul 25, 2026
Merged
Conversation
The lookup for the modulation which routes envelope 3 to the global pitch combined its two conditions with a logical OR instead of an AND, so it accepted the first row which was either sourced from envelope 3 or targeted a tuning parameter. A row such as an LFO to Master Tune therefore supplied the depth of the pitch envelope. Measured on the 214 TAL Sampler presets of the Goldbaby BlueWave library: 207 of them have no envelope 3 to tuning modulation at all, yet a depth between 0.5 and 1.0 was taken from an LFO row, and the remaining 7 read a different row than the intended one - so every preset of the library was affected. Converting the eight presets of one folder to SFZ removes 710 of 1006 pitch envelopes, which were sweeping the pitch by 4.5 to 10 octaves; the two presets which really do modulate the tuning with envelope 3 keep theirs and now use the correct depth. Nothing but the pitch envelope changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The lookup which finds the modulation routing envelope 3 to the global pitch combines its two conditions with a logical OR instead of an AND:
so it accepts the first row which is either sourced from envelope 3 or targets a tuning parameter, and takes its amount as the depth of the pitch envelope. The two comparable lookups in the same method (
isDestination (VOLUME_A) && isSource (VELOCITY)andisDestination (CUTOFF) && isSource (VELOCITY)) use AND, so this one is the outlier.The practical effect is that a row like LFO → Master Tune supplies the depth of a pitch envelope which the preset does not have.
Measured
The 214 TAL Sampler presets of the Goldbaby BlueWave library:
The row picked up instead is the same one in almost every case — source id 3 targeting Master Tune, in presets named
…RiseLFO…,…FallLFO…,…randLFO….Converting one folder of eight presets to SFZ, before and after:
Six of the eight presets lose the pitch envelope completely, which is correct — they have no envelope 3 to tuning modulation. The remaining two really do have one and keep their envelope, now with the amount of the correct row. Nothing other than the pitch envelope differs between the two runs.
Note
Found while auditing the readers for a related question on #216 (whether a modulation amount that is gated behind a controller can be read as one which is always applied). This one is independent of that PR and of the format's mod matrix having no "via" column — it is purely the operator.