BlackNoiseModular / VCV

Other
6 stars 1 forks source link

SlewLFO Dev Thread #3

Closed hemmer closed 1 week ago

hemmer commented 3 months ago

Core/DSP

UI

Other

hemmer commented 3 months ago

Time ranges for rise/fall were shared:

Low Speed 
Min : 12ms
Max : 12s
High Speed
Min : 120us
Max : 120ms

Q1: I've started with the assumption that the slew/lfo are in fact linked under the hood. E.g. if we imagine the module theorectically had an "output is rising gate out", then the slewed version of this gate would make the LFO? Put differently, the rise/fall times are the same for LFO/slew, and only real difference is in LFO mode, the "input signal to be slewed" is inferred from the state that we're in (rising vs falling). This is how I've coded up for first pass anyway! To illustrate, I've mocked it up to show how I think it works under the hood with an square LFO tuned to the observed rise/fall times. Top: current VCV implementation, bottom: mock of idea (square wave with 10V for rise portion, 0V for fall portion into slew).

image

Q2: This implies that rise fall time (and therefore LFO frequency) can change (a little) with shape. Does the hardware do this / is it a reasonable property of the module?

BlackNoiseModular commented 3 months ago

Q1: The core of the slew is the same as in the Serge DUSG, using differential pairs. For the LFO function, there's simply a Schmitt trigger on the output that generates a trigger when the slew's cycle completes, allowing to initiate a new cycle. The switch controls whether these triggers are routed to the input of the slew or not.

Q2: Yes, the curve control slightly affects the duration of the slew and the frequency in LFO mode. It's neither a bug nor a feature; it's just the module's behavior.

hemmer commented 3 months ago

Couple of follow-up questions now I have the unit in front of me.

  1. The curve knob has no effect on waveform in LFO mode (slow or fast), I just get the linear ramp, is this expected? From the manual it appears LFO should respond to curve? In slew mode, the curve knob works as expected.

  2. If I'm in audio rate mode + LFO mode, if i go to extreme left values (as if to make a rising saw), the saw breaks down and forms a weird buzzing sound, video below (no sound). Same doesn't happen for rise knob if falling saw waveform is generated, so I assume this isn't expected and is just an odd quirk (not to be included in the port)?

https://github.com/user-attachments/assets/34ea4467-3a0c-4d91-97c1-ba4af87abeed

BlackNoiseModular commented 2 months ago

Couple of follow-up questions now I have the unit in front of me.

1. The curve knob has no effect on waveform in LFO mode (slow or fast), I just get the linear ramp, is this expected? From the manual it appears LFO should respond to curve? In slew mode, the curve knob works as expected.

2. If I'm in audio rate mode + LFO mode, if i go to extreme left values (as if to make a rising saw), the saw breaks down and forms a weird buzzing sound, video below (no sound). Same _doesn't_ happen for rise knob if falling saw waveform is generated, so I assume this isn't expected and is just an odd quirk (not to be included in the port)?

Screen.Recording.2024-07-27.at.19.59.40.mov

Sorry for the late reply:

  1. The effect of the curve knob is indeed quite subtle in LFO mode. Due to the way the module works, adjusting the curve also changes the frequency. To avoid large frequency shifts, I limited the range of the curve knob. For more pronounced curves, you can route the output through an attenuverter and send it to the CV input of the Rise and/or Fall.

  2. In audio rate mode, when you set both controls to their minimum (fully counterclockwise), the module becomes "self-oscillating." This creates a resonance-like effect useful when used in "pseudo filter" mode.

hemmer commented 2 months ago

Thanks for the response!

Sorry for the late reply:

1. The effect of the curve knob is indeed quite subtle in LFO mode. Due to the way the module works, adjusting the curve also changes the frequency. To avoid large frequency shifts, I limited the range of the curve knob. For more pronounced curves, you can route the output through an attenuverter and send it to the CV input of the Rise and/or Fall.

Even with re-routing attenuated copies of output, I can't get the curve knob to have any appreciable effect on the shape of the waveform, until it starts producing cool wild, but chaotic and atonal waveforms, and even then the curve knob doesn't really affect the sound.

I'm wondering what best to do here. We need to strike a balance between what is possible (in reasonable time), what users might expect if they bought the module, and what is useful/cool in the idealised world of VCV Rack. I've historically done things like have a "Differences with hardware" page where explicit deviations from behaviour are listed. For reference (see first video below), currently the curve knob has the same effect in slew and LFO modes, which to be honest is what I expected from this sentence in the manual "In LFO mode - Curve control the shape to the LFO from linear to exponential shape".

https://github.com/user-attachments/assets/48dd823b-4000-4115-ac8d-61c9dc5c84d7

Easiest option a) is to keep this like it is, and put a note / page that says "Effect of curve knob in LFO mode is more subtle in hardware". Alternative option b) is I just disable curve knob having any effect in LFO mode (can even have a UI hint, like greying it out somehow)? Finally c) we can make it have a very subtle effect, but I personally can't see or hear any appreciable effect so I think this is most confusing to users. Let me know what you think.

2. In audio rate mode, when you set both controls to their minimum (fully counterclockwise), the module becomes "self-oscillating." This creates a resonance-like effect useful when used in "pseudo filter" mode.

Cool! I can reproduce this (see below), example with a saw wave. Both rise/fall at minimum, and CV to both. At 0V CV, slightly oscillating filter like, positive CV like a LFP, negative CV increasing resonance then self oscillation between rail voltages. It's a neat effect and something I'm interested to add. Unsurprisingly(!), this doesn't drop out naturally from the implementation and there must be some feedback like thing going on, i.e. something that the simple empirical slew implementation doesn't capture. I'm not confident that I'll be able to do much, but would you be willing to share schematics (maybe not publicly!)?

https://github.com/user-attachments/assets/03f0cb69-59ac-46a1-94a0-509323365ecb

BlackNoiseModular commented 2 months ago

Easiest option a) is to keep this like it is, and put a note / page that says "Effect of curve knob in LFO mode is more subtle in hardware". Alternative option b) is I just disable curve knob having any effect in LFO mode (can even have a UI hint, like greying it out somehow)? Finally c) we can make it have a very subtle effect, but I personally can't see or hear any appreciable effect so I think this is most confusing to users. Let me know what you think.

I agree, option "a" seems like the simplest and most logical solution.

Cool! I can reproduce this (see below), example with a saw wave. Both rise/fall at minimum, and CV to both. At 0V CV, slightly oscillating filter like, positive CV like a LFP, negative CV increasing resonance then self oscillation between rail voltages. It's a neat effect and something I'm interested to add. Unsurprisingly(!), this doesn't drop out naturally from the implementation and there must be some feedback like thing going on, i.e. something that the simple empirical slew implementation doesn't capture. I'm not confident that I'll be able to do much, but would you be willing to share schematics (maybe not publicly!)?

That feature wasn’t intentional, but I kept it because I find it interesting. However, I think it might be tricky to fully replicate in VCV. The curve knob works a bit like a crossfader, reinjecting the slew output back into the input to create an exponential curve. Since the knob has a tolerance, there's a bit of bleed even when set to fully linear, which introduces feedback that creates the resonance effect when the settings are at a minimum.

hemmer commented 2 months ago

I'll have a play, it might be possible to emulate it a bit (at extreme values rise/fall) with feedback. I'll experiment and report back:

image