surge-synthesizer / surge

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

Oscillator FM Routing | Saving and Restoring Oscillator Frequency Ratios #2506

Closed ghost closed 4 years ago

ghost commented 4 years ago

Surge-NIGHTLY-2020-08-21-4988da1 | Win-10 Pro x64, VST3i

What follows is a broader reframing of FM concepts proposed in the closed issue #2051, which are also tangentially related to the open #2363, and extrapolating them here to be applied for all oscillator types.

Parallel Routing of Oscillator FM Routing and Oscillator Mixer Signals Among the interesting possibilities for sound-design with Surge 1.7.1, are using the basic algorithms in the Oscillator FM Routing section and the FM Depth control to create a blend of an FM timbral layer that can be routed in parallel with signals from the Oscillator Mixer.

The interaction of the Oscillator Edit Value Pitch Offsets with SCL Scale Size Usually in the Surge sound-designs here, patches are designed initially to be played in 12-tone-equal-temperament, and user selected microtunings of arbitrary size can be freely loaded to change to other intonation systems as required of the musical scenario at hand.

With 12-tone-equal-temperament as the starting point for patch sound-designs, one can, using semicents (semitones and cents floats) typeins, easily configure the three Surge oscillators in a Scene and routed to the Oscillator FM Routing section (one Carrier and two Modulators), to arbitrary offset intervals such as (quasi) sub/harmonic ratios.

However, there is an unfortunate showstopping rub whenever new SCL-KBM microtuning combinations are loaded that feature scale sizes other than 12, where the carefully configured ratio offsets are rescaled and displaced to other intervals according to the SCL scale size.

A proposed solution for Oscillator Pitch Edit Value Offsets in FM configurations So that Edit Value configured semicents FM ratios are not displaced when loading other SCL-KBM microtuning combinations with scale sizes that are < or > 12, it is proposed here to add an Oscillator Pitch Edit Value context menu option to ‘Edit Value - Ignore SCL Size’.

Adding this simple Oscillator Pitch context menu ‘Edit Value - Ignore SCL Size’ feature would immediately make it possible to create a vast range of new FM timbres with Surge, and would completely remove the complexity of having to recalculate new FM ratio typein values for arbitrary SCL scale sizes.

image

A Related FM Issue: Oscillator FM Routing and independent FM Depth modulation Stating the obvious, in addition to the above feature-request, is that at some point in the future, it would also be extremely useful to evolve the Oscillator FM Routing section such that users could independently modulate the index, or C and M ‘Amount/Depth’.

As we know, currently ‘FM Depth’ modulates them all at once, which can be used, as above, for a basic FM timbre layer, but for more deeply refined and expressive FM timbres to be possible, being able to route modulation-sources to C-Amount/Depth, M1-Amount/Depth and M2-Amount/Depth would be a powerful enhancement.

Already aware here that there is an existing issue on this topic (with a unique perspective), and that an FM matrix design has been considered, and with the latter matrix concept, FM synthesis in Surge could move far beyond the basic algorithms that are currently available.

Consolidating everything in this issue here for consideration and discussion.

Sub/Harmonic pitch offset units for Sine oscillators #2051

FM2 and FM3 Oscillators | Subharmonic and Harmonic Ratio Input #2363

"FM mode" for mixer section #1031

mkruselj commented 4 years ago

That's simply because the pitch controls - including modulation amounts - work in key space, not semicent/frequency space (it's also why the unit for pitch parameters/modulations changes from "st" to "keys" - these are not to be confused, as keys here means "whatever was defined by SCL"). As Paul said once "you have to go out of your way in Surge not to have everything follow SCL now".

ghost commented 4 years ago

Does an "Edit Value - Ignore SCL Size" enhancement sound like a plausible solution?

TBH - Making these kinds of oscillator pitch offsets in other microtonal virtual-instruments is an easy matter of routine, and here discussing these details in the hope and effort that we might find some solution to make it easier for Surge as well.

If an "Edit Value - Ignore SCL Size" enhancement does not sound like a plausible solution, then what might be a better idea?

As it stands now, I'm sampling Surge in 12-equal so that I can play these kinds of FM patches in other microtonal tunings, but am hoping that eventually, we can find a way to use the Edit Value feature for FM synthesis when using any kind of SCL-KBM combination.

Thoughts or possible solutions?

mkruselj commented 4 years ago

I'd rather not clutter the slider RMB context menu with niche usage things, if anything this option should be in the Tuning menu.

baconpaul commented 4 years ago

Sorry I'm super behind on my GitHub. Lot going on.

So the current behavior is: The pitch slider moves you by (N) keys, the octave selector moves you by (scale.length) keys, and the oscillator sounds at frequency( scale( key ) ) which if you are in 12TET is basically 440 * 2^((key-69)/12)) but if you have an SCL loaded is different. And the real concern is that we always send keys to the oscillators so things like 'octave is a frequency multiple' are hard because by the time we make waveforms, we don't know whether we pressed note 60 with octave 1 or note 72 with octave 0. More on this below though.

So there's a few thoughts though on what maybe we can do

  1. We can configure individual oscillators to not use tuning. Like seriously. "Oscillator 2 is always in 12TET no matter what". This is moderately easy to accomplish. It could be super interesting in an FM context.

  2. We can configure oscillators so that a pitch slider offsets are always 12-TET and only base frequency is from the scale. So lets say you play note 42 and you have pitch set at +3. Rather than playing frequency( note 45 ) you would play frequency( note 42 ) * 2^3/12 - so pitches are tuned but pitch shifts are 12TET. This is moderately difficult to accomplish mostly because the pitch is externalized from the oscillator (or: the oscillator gets the same thing when you press note 45 with pitch at 0 as it does when you press note 42 with pitch at 3).

  3. We can configure surge such that the octave button has a different behavior either per-oscillator or per-scene or per-instance. Whether this is easy to do or not depends on the behavior but has a similar difficulty as my second item.

Of course you would save whichever setting in the patch etc....

Where we put the UI is secondary. The thing I'm trying to figure out from this fascinating thread (and thank you for all the detail) is what do we actually want the behavior to be.

Our biggest constraint is the oscillator knows the pitch in key space which is requested of it; but it does not know which key was pressed to trigger that. Things like modulation, pitch shift, pitch bend wheel, octave button are baked in before we go and start making waveforms. So the 2 and 3 options could be a bit more surgery - namely making sure each oscillator knew not only the pitch but also the key. We have the data available though so we could plumb it through and it seems like it may be useful in a variety of settings. But that leads to some things being more extensive fixes.

Finally: Alternate tuning is hard! What an interesting conversation.

baconpaul commented 4 years ago

Note if we did my idea 2 above it would mean we lose a constraint I've tried to keep which is: Set pitch bend to 2. Press C. Bend all the way up. Listen. Release key and pitch bend. Press D. Hear the same note.

In idea 2, C bent 2 up would not be the same as D if D was tuned to non-12TET-interval

ghost commented 4 years ago

Hi @baconpaul and thanks for your reply. Agreed. It is a very interesting and stimulating conversation as well as set of design challenges.

Before commenting on the options you've offered here, I should probably state the obvious in saying that, with adding such new features for applying pitch-transpositions between the three oscillators, where they can be saved and recalled in presets, that it should not in any way compromise the way Surge currently works with...

Both of your 1 and 2 options sound plausible from a user and sound-design perspective, and especially if this direction would still enable freely applying arbitrary pitch-transposition intervals to all three oscillators where needed in a particular sound-design scenario - AND - still permit using full-controller SCL-KBM combinations, where accurately tracking the fundamental pitches would be critical.

Of all the options offered though, I find 3 the most alluring, since:

Having a context-menu option there for applying other transposition values (in semicents units preferably) - at least from a UX and sound-designer perspective - would seem the optimal choice, and somehow superior to the other 2 options, in that it would effectively change nothing about the way the Edit Value and microtuning features currently operate.

The octave-transposition buttons could also remain visually exactly as they are, while the context-menu option would be more of a specialist feature for sound-designers wanting to create patches with a deeper FM synthesis focus than is currently possible.

On these points, the design of Surge is unique among the other FM synthesis options available here (similar in some ways though to U-He's Z2/ZHZ), in that, not only do the oscillators operate as three independent oscillators that can be combined at the Mixer, but each of them can also be used and variously routed in parallel as FM operators in the Oscillator FM Routing section.

[Worth mentioning here, is that U-He's Z2 and ZHZ actually permit oscillator transpositions in semicents units in the range of -48.00 to 48.00, or sub/harmonic 16]

And the other important detail, of that there are also two self-contained FM oscillators: FM2 and FM3, that when activated, can also be used as complex operator signals in the Oscillator FM Routing algorithms.

When it becomes possible to configure, save and recall FM frequency-ratio relationships between the three oscillators in a Scene, as well as the proposed enhancements for FM2 and FM3 sub/harmonic ratios, a vast universe of new sound-design possibilities will become available to Surge, and already, some of the preliminary sound-design experiments - which have inspired this issue - show incredible promise.

Among the inspiring possibilities for sound-design available now, are using the range of (TX, etc.) waveforms available in the Sine oscillators as FM operators - and very importantly - the ability to band-limit their signals with the Low/High Cut filters and apply Unison Detune, which enables creating some amazingly rich composite stereo FM waveforms...

So all of the above, together with the new FM2 and FM3 options, will make for some extremely exiting possibilities for patch designs in times ahead.

Thanks for the discussion.

mkruselj commented 4 years ago

Perhaps approaching these issues from the skewed and biased perspective of having programmed and made music with myriad FM synths for the better part of four decades, I would hardly qualify being able to configure frequency ratios in FM synthesizer algorithms as "niche usage things", but to each there own experiences and perspectives.

Maybe you misunderstood me, or I didn't explain very well, or a bit of both. 🙂 All I wanted to say is if there is to be an option to bypass scale length from SCL, it should not be in each individual pitch-related slider's RMB context menu - scale length is an SCL feature, so it is better suited to be on a global level, grouped with all other microtuning options that we already have. I did not mean to say anything about FM ratios etc., just purely entered my "product designer" mode on the feature that you proposed in your issue title ("Ignore SCL scale size"). All good? 🙂

I think this discussion is an important one (even though, as you know, I am not really using microtunings myself). This is also why I think it shouldn't be bodged, we need to find a satisfying solution for everyone, while keeping the workflow clean. Hence me putting my "product designer" hat here.

I would suggest to try dissecting how some other synths deal with this situation. For example a good study here could be u-he ACE - it allows the oscillators to be adjusted in semicents, partials (0-24, 0 being the fundamental), subharmonics (0-24 again), Hertz (0-24 Hz), and sync (because oscillator can also be used as an LFO, so this gives you tempo synced divisions - not very useful as an audio rate oscillator). Then ACE has another knob to adjust offset from this pitch value, and it can be in cents, +/- 5 Hz offset, beats (to be used with "sync" mode), and multiply (which is where the sauce lies). The modulation is always applied in cents regardless. @baconpaul Does this breakdown spark some thoughts?

I'd suggest that there should be a way to set the starting oscillator frequency in a value other than keys, then all modulation added on top would be applied as absolute cents (not following microtuning).

Really, @Jacky-Ligon, you should have ACE in your arsenal. These options that it has are right up your alley. 😉

mkruselj commented 4 years ago

Just don't understand why they designed it that way, but I can deal with it.

It's because the knob shares the same parameter range for multiple modes, so they conflated them all.

BTW I don't want to come off as a douche - so please don't take this in the wrong way - but I'd prefer if you didn't tag me in every post, unless it's something really urgent for whatever reason. I have my own schedule of going through GitHub issues so I unsubscribe from them automatically. Rest assured I read everything, whenever I can, but when you tag me, it always automatically re-subscribes me to the issue and sends an e-mail - which I find no way of disabling, and it is a bit annoying they do it like that. No hard feelings and all!

(Oh also, I didn't yet see you at our Discord, since we moved to it from Slack! Are you gonna join us there? 🙂)

ghost commented 4 years ago

Closed for consideration at some future time.