surge-synthesizer / surge

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

Phase Scrub on SS doesn't trigger Envelopes (was: quantize pitch / sample and hold?) #2575

Closed hems closed 4 years ago

hems commented 4 years ago

Is your feature request related to a problem? Please describe. In the modular world S&H is commonly used to modulate the pitch of an oscillator freely.

This is achievable on Surge by right clicking the "pitch" fader of an oscillator and checking the "extended pitch" option.

Sometimes on the modular world the S&H gets patched into a "pitch quantizer" in order to make the randomness more harmonic with the rest of the song.

Unfortunately, on surge there is no way of quantizing the pitch changes

Describe the solution you'd like The same way we have a "right" click on the "rate" fader to "tempo sync" we could have a right-click on the "pitch" faders in order to "quantize" the pitch?

Describe alternatives you've considered Using a "random" arpeggiator on the DAW is an alternative with the side-effect of retriggering the volume/filter envelope and changing all the oscillators at the same time and rate

Additional context The same way a user can import custom scales for the micro-tunning perhaps there could be presets for the quantization, similar to how the "scale" plugin works on ableton live?

Perhaps it could the micro-tunning presets for the quantizer and then provide the user with default "non micro tunal" and "micro tunal" scale presets?

baconpaul commented 4 years ago

So this is a good request and one we should consider

But there is a (somewhat) gross way to do this in 1.7.1

In 1.7.1 you can deactivate the rate of an LFO and then the phase slider becomes a scrub. Moreover in the step sequencer you can quantize the steps by using alt-drag or some such.

So what you could do now is set up 12 quantized steps in the step sequencer in lfo3, deactivate the rate, then make lfo2 an S&H unipolar, and use that to modulate the phase of lfo3. You would de-facto get quantized randomized output from lfo3.

I know this isn't perfect but if you have an immediate musical need for the feature it would work.

We've thought a lot about 'lfo transforms' where you can inject functions in the modulation path beyond the simple scale one we have today. Quantize would be a great one.

mkruselj commented 4 years ago

The proper way to solve this is having modmappers per mod assignment.

baconpaul commented 4 years ago

Oh yeah mod mappers is what you called them right; That's what I meant when I said lfo transforms where you can inject functions. But yes I agree totally. This is a classic function-in-the-modulation-path use case.

baconpaul commented 4 years ago

AKA #1384 where you actually called the mod shapers!

Reminds me of this classic US joke. https://www.youtube.com/watch?v=q_8amMzGAx4

hems commented 4 years ago

In 1.7.1 you can deactivate the rate of an LFO and then the phase slider becomes a scrub. Moreover in the step sequencer you can quantize the steps by using alt-drag or some such.

I did not know, i just tried the STEP SEQ and if you hold SHIFT it will quantize to the steps, then i just have to set the modulation amount to 12 and i get 12 steps..

thanks for that info!

So what you could do now is set up 12 quantized steps in the step sequencer in lfo3, deactivate the rate, then make lfo2 an S&H unipolar, and use that to modulate the phase of lfo3. You would de-facto get quantized randomized output from lfo3.

I know this isn't perfect but if you have an immediate musical need for the feature it would work.

that's amazing !!

it's the solution was looking for, because i can use the step sequencer as a "pool of notes", which is what I actually wanted to achieve in the end, so that completely solves my problem!

hems commented 4 years ago

In 1.7.1 you can deactivate the rate of an LFO and then the phase slider becomes a scrub. Moreover in the step sequencer you can quantize the steps by using alt-drag or some such.

i don't have "deactive" on the "rate" of my LFOs, I'm running 1.7.nightly, so i guess i have to update and then right click the "rate" and then select "deactive"?

hems commented 4 years ago

So what you could do now is set up 12 quantized steps in the step sequencer in lfo3, deactivate the rate, then make lfo2 an S&H unipolar, and use that to modulate the phase of lfo3. You would de-facto get quantized randomized output from lfo3.

unfortunately, it seems on my 1.7.nightly version modulating the PHASE of the step sequencer is not triggering the other steps/pitches.. neither manually or using another LFO to do the modulation

baconpaul commented 4 years ago

Can you screen shot your about screen so we know your version?

baconpaul commented 4 years ago

@hems I just gave it a try with code with is basically the same as the latest nightly (my code is a smidge different bot not in the step sequencer). And it worked fine. I made LFO1 a unipolar deformed sin, LFO2 a rate deactivated seq (with RMB/Deactivate on Rate) and then used the LFO1 to scrub through steps. Got exactly what I expected.

lfo.zip

Here's the patch. Does that help?

mkruselj commented 4 years ago

AKA #1384 where you actually called the mod shapers!

Haha yeah. Kontakt calls them modulation shapers, Zebra calls them modulation mappers. Tomato, Tomahto. 😁

hems commented 4 years ago

Here's the patch. Does that help?

mine doesn't have the "deactivate" option on the LFO i think that's the issue, it's 1.7.nightly, i will download 1.7.1 and let you guys know

baconpaul commented 4 years ago

We really need the hash and date to know which night. 1.7.nighTly.acde123 or what not - please just screenshot the about screen if the problem persists. We need all that info.

You RMB on rate and don’t see deactivate?

mkruselj commented 4 years ago

Sounds like a very old nightly. @hems why not install the latest official 1.7.1 release?

hems commented 4 years ago

Sounds like a very old nightly. @hems why not install the latest official 1.7.1 release?

yes just installed and everything works as expected! the reactive is there and the S&H works!

I'm using this version now:

image

Another thing i was testing is using the SAW to drive the STEP SEQUENCER.. Is there a way of having a SAW UP instead of the default SAW DOWN?

I thought it could be good to have AMPLITUDE to go from -100% to 100% instead of 0-100%, so i could easily make the SAW DOWN become a SAW UP?

hems commented 4 years ago

Another detailed i found is that when driving the PHASE of the STEP SEQUENCER the ENV is not triggered for FILTER even tough i have the TRIGGERS on the STEP SEQ.

image

hems commented 4 years ago

to remedy that i tried to have an ENV and "de-active" the rate and drive the "PHASE" of the ENV with LFO1 ( the same i drive the STEP SEQ ) but that isn't working?

Perhaps the "PHASE" on the ENV doesn't work the same way as the STEP SEQ?

baconpaul commented 4 years ago

That triggering when you modulate phase may be a real bug - I will have to look.

For negative saw just modulate with the other sign. So 1-saw rather than 0+saw

hems commented 4 years ago

For negative saw just modulate with the other sign. So 1-saw rather than 0+saw

haha good point, my bad : D

baconpaul commented 4 years ago

Oh and if your nightly was built recently (you got Really close to screenshotting that whole line but not quite!) you can rmb/extend amplitude I think and it will go negative.

K0rrid0r commented 4 years ago

@hems you can now right click LFO Amplitude and "extend range" try that!

mkruselj commented 4 years ago

Should we close this issue now since it's basically covered by the mod shaper issue?

baconpaul commented 4 years ago

Not until we confirm and fix (or open a separate issue on) or understand

Another detailed i found is that when driving the PHASE of the STEP SEQUENCER the ENV is not triggered for FILTER even tough i have the TRIGGERS on the STEP SEQ.

hems commented 4 years ago

@hems you can now right click LFO Amplitude and "extend range" try that!

awesome, just downloaded the latest nightly and when you do "extend range" it does give the negative amplitude, awesome

hems commented 4 years ago

Not until we confirm and fix (or open a separate issue on) or understand

Another detailed i found is that when driving the PHASE of the STEP SEQUENCER the ENV is not triggered for FILTER even tough i have the TRIGGERS on the STEP SEQ.

I just downloaded the nightly build and:

  1. DEACTIATED LFO2
  2. SET LFO2 to STEP SEQ
  3. ASSIGN LPF on F1 and increased MOD amount of FILTER ENV on F1
  4. MODULE OSC1 PITCH by 12 tones with LFO 2
  5. MODULATE PHASE OF LFO 2 with LFO1

And I can confirm: the pitch modulation works, but the filter isn't being triggered on each step.

If i "activate" the RATE on LFO2 and set it manually it does work.

So I can confirm the Env is just not triggered if the the STEP SEQ is driven via PHASE modulation, if it's driven via it's own RATE then it does trigger the ENV.

triangle-mod-not-being-triggered.fxp.zip

image

Also great work guys i spent just 5 minutes with the last nightly and i can already see so many improvements.

Thank YOU!

baconpaul commented 4 years ago

Have a fix for this inbound.

baconpaul commented 4 years ago

OK @hems there's quite a few changes in the queue but once it all settles down in about an hour, there should be a nightly with hash 4afb9f2 and that will have a fix to this problem. Enjoy!

baconpaul commented 4 years ago

The pipelines got a bit screwed up so I gave em a kick. The nightly for this is still in queue. Will have hash cd6868c

Thanks