Control utilities for Hydra visual synthesizer
Hydra LFO » Functions » used « source: src/components/general.js
use
valueused()
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.
This function takes no parameters.
The name set by the last use
command or val
if not set at all.
console.log(L.used()) // == 'val'
console.log(L.use('time').used()) == 'time'
shape(3)
.rotate(
L.use(() => (time % 2 < 1 ? "cos" : "sin"))
.used()
.map((x, _, {time}) => eval(`Math.${x}(time)`))
.mul(2)
).out(o0)
Other functions in General Hydra LFO utility functions:
Other categories:
Asynchronous functions - General Hydra LFO utility functions - Generator functions - Math related functions - Modifier functions - Time functions -
All functions reference on one page