surge-synthesizer / surge

Synthesizer plug-in (previously released as Vember Audio Surge)
https://surge-synthesizer.github.io/
GNU General Public License v3.0
3.08k stars 394 forks source link

Keytrack Modulating Oscillator Unison Detune | Some Observations #2449

Closed ghost closed 4 years ago

ghost commented 4 years ago

Surge 1.7.1

The following is not really a bug-report or a feature-request, but merely some observations about expected-versus-observed behavior when Keytrack-modulating Surge Oscillator Unison Detune, since documentation on the topic is minimal, and it can actually have a huge impact on patches that feature it when SCL-KBM microtunings are loaded.

A common approach in virtual-instrument sound-design is Keytrack-modulating oscillator Unison Detune, such that when MIDI notes are played in the bass range, the Unison Voices will be tuned closer to a unison, while progressively higher notes will feature more pronounced detuning of unison voices, resulting in more rich beating and chorusing effects.

Bass range notes keytracked this way will have a cleaner and less muddy sound in the texture of the music, and this can be especially effective in scenarios using microtunings, where one may want to avoid distorting the intervals of a given intonation-system, as well as imparting a unique chorusing character across the musical range.

Expected Behavior One would expect that to keytrack-modulate Unison Detune, would involve:

(1) First, moving the Unison Detune slider control fully to the left, where keytrack-modulation would start with a value of 0 cents.

(2) Clicking on the Keytrack modulation-source, and assigning it to the Unison Detune slider by dragging to the right from the 0 cents starting value, and assigning a modulation range up to, for example, a value of 6 cents max.

With these settings made, one would expect that bass-range notes played lower on the controller would cause Unison Voices to be tuned closer to a unison and display little noticeable beating, while playing progressively higher up the controller, the increased detuning of the voices would produce more pronounced beating/chorusing effects.

Observed Behavior But what happens rather, is that when Keytrack-modulating Unison Detuning as above configured, it appears the Keytrack modulation source behaves as if it is bipolar, and is centered on MIDI Note 60.C, such that 60.C sounds a unison tone with little discernable Unison Voices detuning and beating, while playing progressively lower or higher notes away from the middle 60.C unison, Unison Detune, beating, chorusing is unexpectedly increased the further one plays above or below the middle 60.C.

Configuring Keytrack-modulation of Unison Detune for the desired effect: (1) Before making any modulation assignments, first ensure that High Precision Value Readouts is activated, then set the Unison Detune slider to an Edit Value of 6 cents.

(2) Click on Keytrack, and assign it to Unison Detune by dragging to the right, or typing in an Edit Keytrack – Unison Detune value of 0.001 cents.

With these settings made, the unison detune voices of bass range notes are tuned closer to a unison, while progressively higher ones display more detuning, beating, chorusing, which is the desired effect.

Somehow the Edit Keytrack – Unison Detune value of 0.001 cents acts as a kind of multiplier, which enables the Unison Detune Keytracking to actually start with a lesser amount of detuning on lower bass range notes, with greater detuning as one plays progressively higher notes.

Questions: Does the above detailed Observed Behavior reveal a bug in the way the Keytrack modulation-source interacts with Unison Detune, or is this bipolar tracking from middle C.60 rather the expected behavior?

Discovering how to get the actual desired keytracking behavior with Edit Value: 6 cents, and Edit Keytrack – Unison Detune value of 0.001 cents, was kind of surprising, and to be honest, slightly non-intuitive, but it works.

Whatever the case may be, the method for achieving the desired end result might be worthy of a Wiki article at some point in the future, if not a bug.

Surge FXP Unison Detune Examples.zip

j5v commented 4 years ago

Changing the value of Keytrack Root Key (above 'F1, F2 filter effect', using scrollwheel or right-click input) sets the centre point for KeyTrack modulation. I just tried it with a simple square wave.

With Keytrack Root Key at C0, there was very little beat/phasing at C0, some at C1, lots at C4. With Keytrack Root Key at C1, there was very little beat/phasing at C1, some at C0 and C2, (and again) lots at C4.

baconpaul commented 4 years ago

@Jacky-Ligon yes @j5v is right. The keytrack modulator is a bipolar modulator whose value is set as follows (from SurgeVoice.cpp)

   modsources[ms_keytrack]->output =
       (state.pitch - (float)scene->keytrack_root.val.i) * (1.0f / 12.0f);

So basically +/- 1 per 12-tone-octave

I could be convinced to change that 12 to scale.length instead. Thoughts?

ghost commented 4 years ago

@j5v @baconpaul

That the Filter Keytracking also controls the Keytracking modulation-source mapping, is yet another undocumented dimension of the topic.

Both the bipolar tracking, and that the filter keytracking affects the controller mapping of the keytrack modulation-source, would be really useful additions to the user-manual FWIW, because unless I'm totally missing something, neither of these are documented.

I wouldn't change the way it works, since it's clear that there are a couple of convenient methods to make it work for tracking unison detuning across the range.

But, at some point before the release of 1.7.2, I'd like to take what has been revealed in this issue, and tweak some of the presets I created for 1.7.1, some of which I realize will be affected by incorrectly applying bipolar modulation.

When the FM2 and FM3 oscillators are updated, that's likely when I'll add a few more patches showcasing their new functionality, as well as tweaking the existing presets. I'll try to monitor the SST GitHub for when that's happening, but feel free to reach out, for testing.

With this comment, I'm closing this issue. Thanks for the input.

baconpaul commented 4 years ago

Sounds good. Let me tag @VincyZed here. We probably want a list of things to add to the 172 manual and I agree this could be clearer.