(actually useful) Random LFO Generator

i got the idea to make an LFO generator which would put together a bunch of random points on the fly and paste them into vital… i found that this had been done/attempted by others… but all previous posts i found yielded weird shapes that didn’t make sense or were unusable.

so here’s my LFO generator… which makes useable shapes… it runs in node.js (so you need that installed) … and can be run as a bash script:


and a web based version for the less code-savy (just press run):

here’s a quick demo:

each time you run it, it copies the LFO data onto the clipboard, so you can paste it into Vital.

default number of points is between 2 and 16, but you can change it in code to be whatever you want.

the neat thing about bash scripts is they can be dragged/dropped onto the dock in OSX, and default open in terminal, so it’s like “one click, gimme a random LFO”…

obviously not baked into the Vital UI (dice would be nice in the LFO!), but i find it useful so i thought i’d share with the community.

the key part of where i improved upon the work of others comes from an understanding how vital represents LFO points… they are “pairs” of numbers (between 0 and 1) where - for each pair - the first number is the “percent through” the timeline and the second number is how far up or down the point is (where 0 is all the way up, and 1 is all the way down).

like this:

 "points": [
    0, 0.90732568781823, #beginning, close to bottom
    0.07859319588169, 0.17340282374061, #7% through time, close to top
    0.84369235648774, 0.89724101102911, #84% through time, close to bottom
    0.95495571941138, 0.74014372192323, #95% through time, close to bottom
    1, 0.90732568781823 #end, loops back to original point

the “powers” array is for designing curves:

"powers": [
    0, #flat
    0, #flat
    6.5590370099526, #curvy up
    0, #flat
    -8.82780648162589 #curvy down

try the whole thing if you wish (copy/paste into vital):

  "name": "neat stuff",
  "num_points": 5,
  "points": [
  "powers": [
  "smooth": false

it’s really genius what matt did with a simple bit of JSON… i am blown away by this synth


Nice! I would recommend rounding all the points to the nearest 1000th to make it look nicer, and take up less space.

@SlavaCat cool! thanks for looking… why do you recommend 3 decimal places?

it looks like the synth natively uses floats with 16 points of precision (i had to use 14 because javascript floats are trash)

Hey this is pretty cool! Thanks for sharing, I’m saving a bunch of them to play with later

Cool. I like this random stuff. Cool thing would be to be able to input “functions”. What if the user can input functions that are defined on x [0,1] and output y[0,1], for instance sines or something? Could be fun to do some weird shapes with that.
If you like - I have used the formula stuff in meldaproduction like this. It could give you an intuition about what I think. Sorry a bit maths required :wink: https://www.kvraudio.com/forum/viewtopic.php?p=7638475#p7638475

Second idea: I think Mat is open to accept pull requests to the Vital Source Code.
The source code is on github… why not try to include this feature (kind of) natively into Vital?

Third idea: Think about using this random stuff in the “transfere functions” in the matrix as well. You can use one LFO and apply a different transfere function per modulation routing.
That can help you safe LFOs becuase the transfere functions make each routing look perfectly different.

Matt specifically said he won’t take pull requests.

Even better. There’s no rule agains forking. If you’re not selling your fork, you are free to do so.
I bet Mat will merge stuff if it gets succesfull.
There’s already a few forks: https://github.com/mtytel/vital/network/members

1 Like

I recommend rounding to three floats because that’s all the precision really necessary. All the extra floats can take up unneeded memory and space.

This isn’t as important with lower point LFOs, but if you were sharing a massive collection of presets all with high detail LFOs, it would add up.

I’m working on something rn to clean up unnecessary data in presets.


I might remake this later

1 Like