Function Generators: Documentation?

I was about to try to write my own LFO when I stumbled across the concept of function generators.

I can find a few copies of the use of a Ramp generator, and older references to other generator types (squarewave, etc.), but what I cannot find is documentation on the types of function generators available, and explanatory documentation on their usage. Is there a list of what function generators are available?

I have some really fun stuff I am trying to do getting GP to trigger parameter change values in TouchViZ* using OSC, and being able to start generators from markers in the streaming audio player. Some I can do with Ramp, but I really would love to know what other options exist.

* TouchViZ is a cool iOS video loop player/mixer from Hexler that’s controllable using OSC (and MIDI). You can pick clips, fade between them, apply effects, etc. and it can even pull in video from a web cam and use that in place of a loop. I am running experiments using it as a visualization generator that is connected to songs, and have a scriptlet build that can control some key parameters. Now I want automations!

Scroll down to the Generators heading for the full list of relevant functions.

The script manual has a page on the callbacks that are also relevant when using generators.

This plugin also makes it easy to generate MIDI LFO:

Thanks. I had already read and bookmarked the information to which you provided links.

Unfortunately, the list of functions in the Generators section does not answer my question. I am looking for a list of function generators, not a list of generator functions.

The only information hinting at what I am looking for is in the short description of the function EnableGenerators, which says, “Enables or disables any generator (LFO, ramp, squarewave, ADSR, etc)”.

I have not been able to locate any documentation that details the LFO and squarewave generators, or that lists the generator functions implied by the “etc”.

Thanks for sharing!

I’ve been able to piece things together through experimentation, and it looks like the LFO and squarewave generators mentioned do not exist, at least not yet. The Ramp and ADSR generators do exist.

I have so far used the Ramp generator to create a stream of data that I use to control the mix between two videos in TouchViZ. I trigger the ramp to start when a button widget is pressed. I added an OSC handle to the button widget, which enabled me to “press” it via a Marker action in a Streaming Audio Player.

Putting it all together, when I play the song in the streaming audio player, markers cause the videos playing to be changed at different points, and the scriptlet with the ramp fades between the different videos at the right times.

This is definitely at POC stage, but I plan on sharing my scriptlets when done.

There is a SetGeneratorFrequency function. Wouldn’t this create the LFO along with the timer callback with amplitude and the other mathematical functions?

You have given me a thought.

The most common and probably most practical uses of LFOs require the use of sine waves. You can convert a repeated ramp to a sine wave simply. Since the ramp amplitude goes from 0 to 1, the conversion is done with the Sin() function. Multiply the amplitude by 2 x pi, and supply that as the argument to the function.

If I can get that ramp to repeat at a given frequency using your suggestion, I can generate values that equal a sine wave, square wave, sawtooth, reverse sawtooth, and triangle through some trivial math.

Thanks for engaging and prompting me to think a little harder.

1 Like