Hydra LFO

Control utilities for Hydra visual synthesizer


Project maintained by oscons Hosted on GitHub Pages — Theme by mattgraham

Hydra LFO » Functions

By category

Asynchronous functions

async -

General Hydra LFO utility functions

get - noop - set - use - used -

Generator functions

choose - rand - range - rnd - sin -

add - div - floor - mod - mul - rad - sub -

Modifier functions

clip - map - sah - slew -

Time functions

fast - slow - speed - time -

By name

add

Add a value

Add a value to the current value, depending on use

async

Asynchronously execute a function

The provided function is run with a frequency of r per time unit. All parameters are based on the current time and bpm, assuming time is in beats. Timing is not guaranteed, so f might drift over time.

Internally async is implemented using setTimeout with all implications regarding execution context.

choose

choose

clip

Clip a value between two thresholds

Allows you to ensure the values are within an aceptable range for the following operations.

div

div

fast

fast

floor

Round down to the nearest number of digits

Rounds the current value down to the specified number of decimal places. This can be used to discretize continous valued functions.

get

Set the current value to a named one.

Fetches the value stored with the name n and sets it as the current value.

map

map

mod

mod

mul

mul

noop

Do nothing

This function performs no operation. It’s mostly used for debugging and testing purposes

rad

rad

rand

rand

range

range

rnd

rnd

sah

sah

set

Set a value

Set the

sin

sin

slew

slew

slow

slow

speed

speed

sub

Subtract a value

Subtract a value from the current value, depending on use

time

time

use

Set the currently modified value.

You can manipulate a custom list of values which you can refer to by name. The val value is the default used initially. The last value that’s in use will be what the LFO function finally returns.

Though fast and the likes are the preferred way to manipulate time you can also use use('time') to manipulate time directly or return its value from the LFO function.

used

Return the name of the currently in use value

This function allows you to retrieve the name of the current default parameter that is modufied by functions like mul or set.

This is usually most helpful for debugging purposes, though you could use it in map too.


Hydra LFO » Functions