Control utilities for Hydra visual synthesizer
Hydra LFO » Functions
async -
get - noop - set - use - used -
choose - rand - range - rnd - sin -
add - div - floor - mod - mul - rad - sub -
Add a value
Add a value to the current value, depending on use
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
Clip a value between two thresholds
Allows you to ensure the values are within an aceptable range for the following operations.
div
fast
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.
Set the current value to a named one.
Fetches the value stored with the name n
and sets it as the current value.
map
mod
mul
Do nothing
This function performs no operation. It’s mostly used for debugging and testing purposes
rad
rand
range
rnd
sah
Set a value
Set the
sin
slew
slow
speed
Subtract a value
Subtract a value from the current value, depending on use
time
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.
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