How to set the gate length to match one cycle?

I’m trying to match the gate length to one LFO cycle in order to make a one shot LFO like in this picture:

Since the LFO frequency is modulated by the incoming pitch the cycle length isn’t static so when I press another note here is the result:

How can I get the gate length to adapt to one LFO cycle?

Can you not use the square wave output of the LFO as a gate?

It should be 1:1 cycle length with the sine wave.

Edit: Or actually 1:2 cycle length so maybe you could use it with a 2 x clock divider.

1 Like

It won’t work because it cycles:

I think you have two basic choices.

Either find a module to do the math and convert V/Oct frequency information into wavelength that can be used to set the gate length.

Or find a way to allow only one cycle of the LFO to pass through, which is how I would attack it. In other words, turn the cycling LFO into a one shot. I have done this in the past, but I’m not in a position at the moment to show how it might be done. At rest you need the LFO to be blocked. Upon a triggering gate, the LFO is reset and a “switch” is thrown to allow the LFO to pass through. Then you need to detect end of cycle and revert the “switch” back to off to block the LFO until the next triggering gate.

Hey! As with everything in VCV there are a lot of different solutions that are dependent on what exactly you want to achieve (and interestingly how many modules / rack space HP you want to use)

Mindmeld Shapemaster would be my choice for „one shot“ envelopes, LFO modulation.

Look for the sine wave in the shape presets Dropdown and then set the mode to „Gate/Trigger“. Now you can send your MIDI>CV Retrigger output to the T/G input on shape master and you’re done :slight_smile:

2 Likes

I am just now seeing that you want to change the LFO frequency via midi input (V/Oct) as well. If you have the PRO Version of shapemaster that will work via an expander module. If not, a wild idea I hope will work is to try a comparator and just output a high voltage (aka. Gate) if the LFO voltage is above zero.

1 Like

I’m a little confused by this setup as to what is supposed to be fixed and what is supposed to be flexible.

You want an LFO whose frequency is set by the 1 V/Oct - so that cycle length is inherently flexible.

You have a gate coming from Midi-CV, which suggests gate length would be flexible too - but perhaps you are only sending a trigger and using the Gate module to set a constant gate length… but if gate length is constant it will never match the flexible LFO cycle length.

If you want your gate length to match the flexible cycle length of the LFO, then aetrion-music’s idea of using a comparator that opens the gate when LFO voltage is non-zero should work.

What do you want to use this gate for? if it is to open a VCA or something like that you could just use the LFO output itself?

If you want a 1-shot LFO cycle (ie an envelope with an LFO-like shape) then ShapeMaster works great for that. Even with the free version you could use Stoermelder uMap to set the cycle length for 2 different channels - one would be your LFO (envelope) shape and the other would be a simple open gate shape. They would always be the same length as long as they are set to the same initial length and the length is being modulated the same way. You’d basically have what you get in your “it won’t work because it cycles” image except it wouldn’t cycle.

Again though it would really help to know what your intended use of the gate was.

2 Likes

Here you go…

The 2 uMaps need to have identical settings and each is mapped to one of the ShapeMaster channel’s length. Set ShapeMaster’s Trigger mode to T/G (trigger/Gate) and make sure Repeats are set to 1 for one-shot. Press keys on keyboard. Profit!

I set the Phase on Channel 1 to 270 degrees so the sine wave starts and ends at 0V.

Channel 2 on ShapeMaster is just a simple open gate

2 Likes