This is a temporary location for the most updated docs produced by Jack Armitage at the time of publishing
22 March 2019
Hydra Functions
Categories
Contents
Audio
Functions for manipulating audio signals.
hide
.hide()
setBins
.setBins( bins )
bins
:: integer (defaultx
)
setCutoff
.setCutoff( frequency )
frequency
:: float (defaultx
)
setScale
.setScale( amount )
amount
:: float (defaultx
)
setSmooth
.setSmooth( amount )
amount
:: float (defaultx
)
show
.show()
Color
Functions for manipulating color.
contrast
.contrast( amount )
amount
:: float (default1.6
)
Larger amount
value makes higher contrast.
color vec4
.color( r, g, b )
r
:: floatg
:: floatb
:: float
Colorize texture.
colorama
.colorama( amount )
amount
:: float (default0.005
)
Shift HSV values.
invert
.invert( amount )
amount
:: float (default1.0
)
Invert color.
luma
.luma( threshold, tolerance )
threshold
:: float (default0.5
)tolerance
:: float (default0.1
)
thresh
.thresh( threshold, tolerance )
threshold
:: float (default0.5
)tolerance
:: float (default0.04
)
Geometry
Functions for manipulating geometry.
kaleid
.kaleid( nSides )
nSides
:: float (default4.0
)
Kaleidoscope effect with nSides
repetition.
pixelate
.pixelate( x, y )
pixelX
:: float (default20.0
)pixelY
:: float (default20.0
)
Pixelate texture with pixelX
segments and pixelY
segments.
rotate
.rotate( angle, speed )
angle
:: float (default10.0
)speed
:: float (default0.0
)
Rotate texture.
scale
.scale( size, xMult, yMult )
size
:: float (defaultx
)xMult
:: float (default1.0
)yMult
:: float (default1.0
)
Scale texture.
scrollX
.scrollX( scrollX, speed )
scrollX
:: float (default0.5
)speed
:: float (default0.0
)
scrollY
.scrollY( scrollY, speed )
scrollY
:: float (default0.5
)speed
:: float (default0.0
)
Global variables
Useful variables that are defined globally, and can be used within functions as a parameter.
mouse
mouse
.x
:: x position of mouse.y
:: y position of mouse
Example
Control the oscillator frequency with the mouse position:
osc(() => mouse.x).out(o0)
time
time
time
:: the current time
Example
Control the oscillator using a sine wave based on the current time:
osc( ({time}) => Math.sin(time) ).out(o0)
Modulators
Functions for describing modulations of sources.
- modulate
- modulateHue
- modulateKaleid
- modulatePixelate
- modulateRotate
- modulateScale
- modulateScrollX
- modulateScrollY
modulate
.modulate( texture, amount )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
amount
:: float (default0.1
)
Modulate texture. More about modulation at: https://lumen-app.com/guide/modulation/
modulateHue
.modulateHue( color, amount )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
amount
:: float (default1.0
)
Changes coordinates based on hue of second input. Based on:https://www.shadertoy.com/view/XtcSWM
modulateKaleid
.modulateKaleid( nSides )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
nSides
:: float (default4.0
)
See also: kaleid
.
modulatePixelate
.modulatePixelate( multiple, offset )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
multiple
:: float (default10.0
)offset
:: float (default3.0
)
See also: pixelate
modulateRotate
.modulateRotate( multiple, offset )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
multiple
:: float (default1.0
)offset
:: float (default0.0
)
See also: rotate
modulateScale
.modulateScale( multiple, offset )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
multiple
:: float (default1.0
)offset
:: float (default1.0
)
See also: scale
modulateScrollX
.modulateScrollX( multiple, scrollX, speed )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
scrollX
:: float (default0.5
)speed
:: float (default0.0
)
See also: scrollX
modulateScrollY
.modulateScrollY( multiple, scrollX, speed )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
scrollY
:: float (default0.5
)speed
:: float (default0.0
)
See also: scrollY
Operators
Functions for performing operations on sources.
add
.add( texture, amount )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
amount
:: float (default0.5
)
Add textures.
blend
.blend( texture, amount )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
amount
:: float (default0.5
)
Blend textures.
diff
.diff( texture )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
Return difference of textures.
layer
.layer( texture )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
Overlay texture based on alpha value.
mult
.mult( texture, amount )
texture
color
:: see colorvec4
src
:: seesrc
shape
:: seeshape
amount
:: float (default1.0
)
Multiply images and blend with the texture by amount
.
Sources
Sources are elementary generators that output different types of visual content.
gradient
gradient( speed )
speed
:: float (defaultx
)
noise
noise( scale, offset )
scale
:: int (default10.0
)offset
:: float (default0.1
)
Generate Perlin noise.
osc
osc( frequency, sync, offset )
frequency
:: float (default60.0
)sync
:: float (default0.1
)offset
:: float (default0.0
)
out
.out( buffer )
buffer
osc
:o0
,o1
,o2
,o3
src
:s0
,s1
,s2
,s3
render
render( buffer )
buffer
: buffer (defaulto0
)
shape
shape( sides, radius, smoothing)
sides
:: int (default3.0
)radius
:: float (default0.3
)smoothing
:: float (default0.01
)
solid
solid( r, g, b, a )
r
:: float (default0.0
)g
:: float (default0.0
)b
:: float (default0.0
)a
:: float (default1.0
)
src
src( input )
input
:: input (examples:o0
,s1
)
voronoi
voronoi( scale, speed, blending )
scale
:: float (default5
)speed
:: float (default0.3
)blending
:: float (default0.3
)
Generate voronoi shapes.
Parameter sequences
Lists as parameter sequences
osc(
[80, 100, 200, 50], 1 )
)
.out(o0)
Functions on parameter sequences
fast
fast ( amount)
amount
:: float (defaultx
)
osc(
[80, 100, 200, 50].fast(0.2), 1 )
)
.out(o0)
Gigs/workshops
- 15/Feb/2025: Beats and Banter: Intro to Livecoding Workshop - Moonshine by Ext Hyderabad
- 14/Feb/2025: Kittenpop Valentine Edition - Antisocial Hyderabad
- 14/Dec/2024: WIP AltFest Algorave: Delhi Edition - Depot 48
- 2/Dec/2024: WIP AltFest Algorave: Bengaluru Edition - Bangalore Creative Circus
- 1/Dec/2024: Where Things Go - Medai Bengaluru