Equation to LFO, by me

The Creators of Random LFO presents, Equation to LFO, because why not :slight_smile:
Math_LFO.zip (8.1 KB)
Includes:

  • Math_LFO program
  • Some example LFO’s
  • A README with instructions and tips for using

This time everything is explained in the zip, but just in case you don’t feel like downloading it, here’s all the info:

Info

Trig function LFO’s:
Math LFO’s.vitalbank (6.3 KB)

Code: https://pastebin.com/e8MtbWDr

Welcome to Mathematic LFO

by: SlavaCat

Some programming knowledge is recommended for creating equations!

HOW TO USE-------------------------

IF YOU HAVE PYTHON-------------

  • pip install numpy
  • Open code in your editor, make modifications, run the program
  • Copy output and right-click the lfo in vital: select ‘paste’

IF YOU DON’T HAVE PYTHON—

TIPS FOR USE------------------------

  • Use desmos.com to preview your equation and select a good range
  • Math documentation docs.python.org/3/library/math.html
  • Select a smaller range and higher resolution
  • HEED THE WARNINGS!
  • Use the Smoothing knob in Vital to help with non looping equations
  • An IMPORTANT thing to note is that the equation results are scaled to fit the vital LFO window, so x+1 would look the exact same as x+2 or x+103049983789634

EXAMPLE EQUATIONS------------

abs(m.sin(x)+m.tan(x))
x/(1/m.sin(x))
x**2/m.cos(x)

*note operators don’t need the m. if they aren’t found in the documentation: docs.python.org/3/library/math.html

IF YOU HAVE QUESTIONS-------

  • Feel free to message me on the vital forums: forum.vital.audio/u/SlavaCat/
  • Also feel free to follow me on soundcloud: soundcloud.com/slavacat I’m releasing 2 new songs on 3/22/21
  • I’ve also included some example LFO’s for you to use of various trig functions

If you make anything cool, be sure to let me know :slight_smile:

This one is unfortunatly more complicated than the random LFO generator so leave a comment if you need clarification on anything. Also comment any bugs or issues you find!

Examples:
image
image
image

8 Likes

So, first of all, this is great. Awesome idea.
Second of all, I think algorithms for creating LFOs have great potential, so I think it would be really cool if you could make your own python library format for LFO algorithms. Maybe including a generate() function, and other nescesarry preparations or add-ons.
I’m kind of doing the same for wxWidgets generator apps, and might do the sam LFOer thing, but for c++

Maybe one day when I actually know what I’m doing lol

Ah, ok. Also, what skin are you using? It looks awesome.

SlavaRed.vitalskin (16.4 KB)

1 Like

thanks for sharing. very good idea, the examples look interesting.

1 Like

would it be possible to add a dialoge that asks for the things that can/should be changed?

it´s easy to use with the online compiler, but changing stuff is a bit complicated if you have to do it insde the code.

I guess I could add a dialogue option, but I thought it would be faster if you didn’t have to enter those details every time. I also can’t figure out an efficient way to input an equation. Sorry if this one is a bit hard to use.

I compiled your mather and randomer into a GUI, here it is:
LFOer.zip (10.5 KB)
I haven’t tested that much, so it might be a little buggy.
To make the copying work, you can install pyperclip via whatever IDE you are using. In Python, it is
pip install pyperclip
In Anaconda, it is
conda -c install pyperclip
…I think

2 Likes

It closes when the second I open it?

So a window opens?
If so, does it stop responding, or just close?

the window opens, console and gui, and then both close.

What IDE are you using?

Im just running the python file, I’ll try using the an IDE

Ok it stays up now, but It wont copy when I’m done. Im also assuming that 0 = random and 1 = math

So, about there being a ton of points:
If this could be implemented directly into the Vital synthesizer, it would be a lot easier to handle. Vital already makes calculations to find the outputted value for the LFOs, I don’t think it would be too hard to implement a some kind of mathematical function instead of the normal calculations.
If anyone knows their way around the source code for Vital, please tell me, I’m clueless…