[production] Built 2023-10-27T02:41:44+00:00 (12e9126 - all changes)
App: { "_isDeleted": false, "_options": { "apiKey": "AIzaSyCGr7xczPkoHFQW-GanSAoAZZFGfLrYiTI", "authDomain": "sd-parseq.firebaseapp.com", "projectId": "sd-parseq", "storageBucket": "sd-parseq.appspot.com", "messagingSenderId": "830535540412", "appId": "1:830535540412:web:858dde0a82381e6f32bab9", "measurementId": "G-TPY8W4RQ83" }, "_config": { "name": "[DEFAULT]", "automaticDataCollectionEnabled": false }, "_name": "[DEFAULT]", "_automaticDataCollectionEnabled": false, "_container": { "name": "[DEFAULT]", "providers": {} } }Analytics: Auth: { "apiKey": "AIzaSyCGr7xczPkoHFQW-GanSAoAZZFGfLrYiTI", "authDomain": "sd-parseq.firebaseapp.com", "appName": "[DEFAULT]" }
L: Linear interpolation
Linear interpolation between keyframe values using the L
interpolation modifier. This is the default behaviour (try removing L
- you'll see no difference).
Example
C: Cubic spline interpolation
Cubic spline interpolation between keyframe values using the C
interpolation modifier.
Example
S: Step interpolation
Step interpolation between keyframe values using the S
interpolation modifier. You can think of this as the 'last seen' value.
Example
f: Frame number
Simply returns the current frame number. You can use it in any expression. Here, from frame 50 onwards, we use it in a modulus expression to reset it every 10 frames.
Example
k: Frames since last active keyframe
The number of frames since the current active keyframe. An active keyframe for this field is a keyframe that has an explicit value for this field.
Example
Here we see that 0, 15, 80 and 99 are active keyframes, but 30 is not. Note that the value field is overridden with k
, so the actual values in the value column have no effect.
active_keyframe: Frame number of the current active keyframe
Example
next_keyframe: Frame number of the next active keyframe
Example
active_keyframe_value: The value specified at the current active keyframe
Example
next_keyframe_value: The value specified at the next active keyframe
Example
final_frame: the last frame
Examples
Make something happen half-way through the animation, regardless of the length.
prev_computed_value: Value computed at the previous frame.
Allows you to express the value of the current frame relative to the previous frame. Value on frame 0 is the default value for this field. Equivalent to computed_at(f-1)
Examples
Increment by 1 on every frame
Increment by an oscillating amount on every frame
sin(): sinusoidal oscillator
returns position on a sine wave
Arguments:
period
/p
required: The period of the oscillation, i.e. how long each repetition of the oscillation lasts. By default the unit is frames, but you can specify seconds or beats by appending the appropriate suffix (e.g. sin(p=4b)
or sin(p=5s)
). (default: none, type: number)
phase
/ps
: The phase shift or x-axis offset of the oscillation, i.e. how much to subtract from the frame number to get the frame's oscillation x position. A useful value is -active_keyframe
, which will make the period start from the keyframe position. (default: 0, type: number)
amp
/a
: The amplitude of the oscillation. sin(p=4b, a=2)
is equivalent to sin(p=4b)*2
. (default: 1, type: number)
centre
/c
: The centre or y-axis offset of the oscillation. sin(p=4b, c=2)
is equivalent to sin(p=4b)+2
(default: 0, type: number)
limit
/li
: If >0
, limits the number of periods repeated. Values 0 and below do nothing. (default: 0, type: number)
pulse
/pw
: pulse() function only, ignored for other oscillators. The pulse width (default: 5, type: number)
Examples
A simple sinusoidal oscillator with an 8 beat period
A sinusoidal oscillator with an 8 beat period, phase shifted by a half beat
Raising a sine wave to a power to create sharper dips/bumps.
sq(): square wave oscillator
returns position on a square wave
Arguments:
period
/p
required: The period of the oscillation, i.e. how long each repetition of the oscillation lasts. By default the unit is frames, but you can specify seconds or beats by appending the appropriate suffix (e.g. sin(p=4b)
or sin(p=5s)
). (default: none, type: number)
phase
/ps
: The phase shift or x-axis offset of the oscillation, i.e. how much to subtract from the frame number to get the frame's oscillation x position. A useful value is -active_keyframe
, which will make the period start from the keyframe position. (default: 0, type: number)
amp
/a
: The amplitude of the oscillation. sin(p=4b, a=2)
is equivalent to sin(p=4b)*2
. (default: 1, type: number)
centre
/c
: The centre or y-axis offset of the oscillation. sin(p=4b, c=2)
is equivalent to sin(p=4b)+2
(default: 0, type: number)
limit
/li
: If >0
, limits the number of periods repeated. Values 0 and below do nothing. (default: 0, type: number)
pulse
/pw
: pulse() function only, ignored for other oscillators. The pulse width (default: 5, type: number)
Examples
A simple square wave oscillator with a 4 beat period
A square wave oscillator with a 2 beat period and an amplitude defined by the the cubic spline interpolation of the value column
tri(): triangle wave oscillator
returns position on a triangle wave
Arguments:
period
/p
required: The period of the oscillation, i.e. how long each repetition of the oscillation lasts. By default the unit is frames, but you can specify seconds or beats by appending the appropriate suffix (e.g. sin(p=4b)
or sin(p=5s)
). (default: none, type: number)
phase
/ps
: The phase shift or x-axis offset of the oscillation, i.e. how much to subtract from the frame number to get the frame's oscillation x position. A useful value is -active_keyframe
, which will make the period start from the keyframe position. (default: 0, type: number)
amp
/a
: The amplitude of the oscillation. sin(p=4b, a=2)
is equivalent to sin(p=4b)*2
. (default: 1, type: number)
centre
/c
: The centre or y-axis offset of the oscillation. sin(p=4b, c=2)
is equivalent to sin(p=4b)+2
(default: 0, type: number)
limit
/li
: If >0
, limits the number of periods repeated. Values 0 and below do nothing. (default: 0, type: number)
pulse
/pw
: pulse() function only, ignored for other oscillators. The pulse width (default: 5, type: number)
Example
A simple triangle wave oscillator with a 4 beat period
saw(): saw tooth oscillator
returns position on a sawtooth wave
Arguments:
period
/p
required: The period of the oscillation, i.e. how long each repetition of the oscillation lasts. By default the unit is frames, but you can specify seconds or beats by appending the appropriate suffix (e.g. sin(p=4b)
or sin(p=5s)
). (default: none, type: number)
phase
/ps
: The phase shift or x-axis offset of the oscillation, i.e. how much to subtract from the frame number to get the frame's oscillation x position. A useful value is -active_keyframe
, which will make the period start from the keyframe position. (default: 0, type: number)
amp
/a
: The amplitude of the oscillation. sin(p=4b, a=2)
is equivalent to sin(p=4b)*2
. (default: 1, type: number)
centre
/c
: The centre or y-axis offset of the oscillation. sin(p=4b, c=2)
is equivalent to sin(p=4b)+2
(default: 0, type: number)
limit
/li
: If >0
, limits the number of periods repeated. Values 0 and below do nothing. (default: 0, type: number)
pulse
/pw
: pulse() function only, ignored for other oscillators. The pulse width (default: 5, type: number)
Example
A simple saw tooth oscillator with a 4 beat period
pulse(): pulse oscillator
returns position on a pulse wave
Arguments:
period
/p
required: The period of the oscillation, i.e. how long each repetition of the oscillation lasts. By default the unit is frames, but you can specify seconds or beats by appending the appropriate suffix (e.g. sin(p=4b)
or sin(p=5s)
). (default: none, type: number)
phase
/ps
: The phase shift or x-axis offset of the oscillation, i.e. how much to subtract from the frame number to get the frame's oscillation x position. A useful value is -active_keyframe
, which will make the period start from the keyframe position. (default: 0, type: number)
amp
/a
: The amplitude of the oscillation. sin(p=4b, a=2)
is equivalent to sin(p=4b)*2
. (default: 1, type: number)
centre
/c
: The centre or y-axis offset of the oscillation. sin(p=4b, c=2)
is equivalent to sin(p=4b)+2
(default: 0, type: number)
limit
/li
: If >0
, limits the number of periods repeated. Values 0 and below do nothing. (default: 0, type: number)
pulse
/pw
: pulse() function only, ignored for other oscillators. The pulse width (default: 5, type: number)
Examples
A simple pulse oscillator with a 2 beat period
A pulse oscillator providing a 1-frame dip every beat.
Using a pulse oscillator to 'mask' parts of a sinusoidal oscillator.
bez(): bezier curve
returns position on bezier curve for the current frame. x1, y1, x2 and y2 behave as with https://cubic-bezier.com/.
Arguments:
x1
: control point x1 (default: 0.5, type: number)
y1
: control point y1 (default: 0, type: number)
x2
: control point x2 (default: 0.5, type: number)
y2
: control point y2 (default: 1, type: number)
from
/start
/s
: starting y position (default: function(e){return(0,g.lw)(e)}, type: number)
to
/end
/t
: ending y position (default: function(e){return(0,g.yD)(e)}, type: number)
span
/in
/s
: duration of the bezier curve in frames (default: function(e){return(0,g.lr)(e)-e.activeKeyframe}, type: number)
offset
/os
: offset (default: 2, type: number)
curve
/c
: curve type (overriddes x1, y1, x2, y2 with preset values) (default: , type: string)
d
/delta
: ending y position as a delta of starting position (overrides to
if present) (default: 0, type: number)
Examples
A simple bezier curve between all values in the value column
Changing the shape of the bezier curve. Supported values are: easeIn
, easeOut
, easeInOut
, easeIn1
, easeOut1
, easeInOut1 easeIn2
, easeOut2
, easeInOut2
, easeIn3
, easeOut3
, easeInOut3
, easeIn4
, easeOut4
, easeInOut4
, easeIn5
, easeOut5
, easeInOut5
, easeIn6
, easeOut6
, easeInOut6
, easeInCirc
, easeOutCirc
, easeInOutCirc
, easeInBack
, easeOutBack
, easeInOutBack
Restarting the bezier curve on every beat by setting the offset to b%1
, which is the fractional part of the current beat position.
slide(): linear interpolation with scriptable end points
returns position on a linear slide with configurable starting and ending points.
Arguments:
from
/start
/s
: start y (default: current keyframe value, type: number)
to
/end
/t
: end y (default: next keyframe value, type: number)
span
/in
/s
: duration in frames (span) (default: distance between current and next keyframe, type: number)
offset
/os
: offset (default: 2, type: number)
Examples
Interpolate linearly to the next value, but do so in 10 frames rather than over the whole keyframe gap.
Restarting a slide on every beat by setting the offset to b%1
, which is the fractional part of the current beat position. Change the targer position of the slide to the current frame number.
rand(): random number generator
returns a random number between 'min' and 'max' (default 0 and 1), using seed 's' (default current time using high precison timer), holding that value for 'h' frames (default 1)
Arguments:
min
/n
: min (default: 0, type: number)
max
/x
: max (default: 1, type: number)
seed
/s
: seed (default: current time in nanoseconds, type: number)
hold
/h
: hold (default: 1, type: number)
Examples
This curve will look different every time you reload the page.
Make the min and max value of the random number generator depend on the value field. Use a fixed seed to guarantee repeatable values.
Hold each random value for a beat. Use a fixed seed to guarantee repeatable values.
Bezier curve from 0 to a random value on every beat.
smrand(): smooth random number generator (using simplex noise)
Simplex noise function (smooth random)
Arguments:
smooth
/sm
: smoothing factor (1 for ragged, 100 for smooth) (default: 10, type: number)
min
/n
: min (default: 0, type: number)
max
/x
: max (default: 1, type: number)
seed
/s
: seed (default: current time in nanoseconds, type: number)
y
: y (2d component of noise function) (default: 0, type: number)
Examples
This curve will look different every time you reload the page.
Increasingly simplex smooth noise with a fixed seed.
perlin(): smooth random number generator (using perlin noise)
Simplex noise function (smooth random)
Arguments:
smooth
/sm
: smoothing factor (1 for ragged, 100 for smooth) (default: 10, type: number)
min
/n
: min (default: 0, type: number)
max
/x
: max (default: 1, type: number)
seed
/s
: seed (default: current time in nanoseconds, type: number)
y
: y (2d component of noise function) (default: 0, type: number)
Examples
This curve will look different every time you reload the page.
Increasingly smooth perlin noise with a fixed seed.
vibe(): sequence of bezier curves between random values
returns position on bezier curve for the current frame. x1, y1, x2 and y2 behave as with https://cubic-bezier.com/.
Arguments:
x1
: control point x1 (default: 0.5, type: number)
y1
: control point y1 (default: 0, type: number)
x2
: control point x2 (default: 0.5, type: number)
y2
: control point y2 (default: 1, type: number)
offset
/os
: offset (default: 2, type: number)
pmin
: period min (default: 1, type: number)
pmax
: period max (default: 20, type: number)
p
: period (fixed) (default: NaN, type: number)
min
: amplitude min (default: 0, type: number)
max
: amplitude max (default: 1, type: number)
seed
/s
: seed (default: function(){return window.performance.now()}, type: number)
curve
/c
: curve type (overriddes x1, y1, x2, y2 with preset values) (default: , type: string)
Example
Curve to a new random point between -100 and 100 on every half beat using the 'easeInOut' curve shape. This curve will look different every time you reload the page.
min(): minimum of two values
returns the smaller of 2 arguments 'a' and 'b'
Arguments:
a
required: term a (default: none, type: number)
b
required: term b (default: none, type: number)
Example
max(): maximum of two values
returns the greater of 2 arguments 'a' and 'b'
Arguments:
a
required: term a (default: none, type: number)
b
required: term b (default: none, type: number)
Example
abs(): absolute value
returns absolute value of 'v'
Arguments:
v
required: value (default: none, type: number)
Example
round(): round a value to a chosen precision
You can also use ceil() and floor().
returns 'v' rounded to precision 'p' decimal places (default 0)
Arguments:
v
required: value (default: none, type: number)
p
: precision (default: 0, type: number)
Examples
Round the current beat position to the nearest whole number.
Round the current beat position down to the nearest whole number.
Round the current beat position up to the nearest whole number.
Round a sine oscillator to a single decimal place.
Javascript maths functions:
You have access to a range of raw Javascript maths functions and constants. See the the main documentation for the full list.
Examples
info_match():
Returns 1 if the info label of the current keyframe matches the supplied regex, 0 otherwise.
Arguments:
regex
/r
required: regex (default: none, type: string)
Example
info_match_prev():
Returns the frame number of the last keyframe that matched the regex, or -1 if none.
Arguments:
regex
/r
required: regex (default: none, type: string)
default
/d
: default if no previous match (default: -1, type: string)
Example
Spike for 3 frames after every bassdrum hit.
info_match_next():
Returns the frame number of the next keyframe that matched the regex, or -1 if none.
Arguments:
regex
/r
required: regex (default: none, type: string)
default
/d
: default if no next match (default: -1, type: number)
Example
Spike for 3 frames before every bassdrum hit.
info_match_count():
Returns the number of keyframes that have info labels that matched the supplied regex so far.
Arguments:
regex
/r
required: regex (default: none, type: string)
Examples
Count bassdrum hits so far.
Draw a bezier curve to a point that increases with each bassdrum hit. Notice how we require a value (any value) in the value column to force the formula to recompute. This can be avoided with info_match_progress (see below).
info_match_gap():
Returns the number of frames between the previous and next match (equivalent to info_match_next()-info_match_prev()
), or -1
if not between matches.
Arguments:
regex
/r
required: regex (default: none, type: string)
default
/d
: default if not between matches (default: -1, type: number)
Example
info_match_progress():
Returns a number between 0 and 1 reprenting how far the current frame is along the gap between (equivalent to (f-info_match_prev()/info_match_gap())
, or -1
if not between matches.
Arguments:
regex
/r
required: regex (default: none, type: string)
default
/d
: default if not between matches (default: -1, type: number)
Examples
Draw a bezier curve to a point that increases with each bassdrum hit. Improved version compared to the example under info_match_count
because no trigger values are required.
info_match_since(): frames since previous match
Returns the number of frames since the previous keyframe that matched the regex, or an overridable fallback defaulting to -1
if no next match. Equivalent to f-info_match_prev()
.
Arguments:
regex
/r
required: regex (default: none, type: string)
default
/d
: default if not between matches (default: -1, type: number)
Examples
Hold a value for half a beat after every matching keyframe
info_match_until(): frames until next match
Returns the number of frames until the next keyframe that matches the regex, or an overridable fallback defaulting to -1
if no next match. Equivalent to info_match_next()-f
.
Arguments:
regex
/r
required: regex (default: none, type: string)
default
/d
: default if not between matches (default: -1, type: number)
Examples
Hold a value for half a beat before every matching keyframe
Units:
Parseq's default time unit is the frame, but you can use s
and b
suffixes on constants to refer to seconds or beats.
Examples
By default constants refer to frames. Here we specify a sine wave with a period of 20 frames
A sine wave with a period of 1.5 seconds
A sine wave with a period of 4 beats
Units conversions:
If you can't use suffixes on constants, various functions are available to convert between units.
Examples
Beats to frames
Frames to beats
Seconds to frames
Frames to seconds
start_of_beat(): return the frame number of the start of the beat.
Get the frame number of the start of the beat at the given frame.
Arguments:
f
: frame (default: the current frame, type: number)
round
/r
: rounding mode: d
=down, u
=up, r
=round (default: r, type: string)
Example
computed_at(): return the frame number of the start of the beat.
Get the value computed for this field at a given frame.
Arguments:
f
: frame (default: frame number of the active keyframe, type: number)
d
: default value if requested frame is <0 (default: the default value for this field, type: number)
Example
Repeat the same random pattern every beat. This pattern will change if you reload the page.
recompute_if(): compute a value only if a condition is true, else re-use precomputed value.
If the supplied condition is true, return the second param, else return the value of the second param when condition was last true. If condition is false and has never been true, return -1 or overridden default.
Arguments:
if
required: condition (default: none, type: number)
compute
/c
required: compute (default: none, type: number)
default
/d
: default (default: -1, type: number)
Examples
Use a new random value on every 'snare' keyframe.
Bezier to a new random value on every 'snare' keyframe.
dangerous(): access values of other fields
This is an experimental function with no guarantees. If you use it, be prepared for errors and backwards compatibility issues.
Get value of a field at a given frame, IF it has already been calculated, else -1. WARNING: there's no guarantee of field computation ordering, and there's no protection from of cyclical references.
Arguments:
name
/n
required: field name (default: none, type: string)
frame
/f
: frame (default: function(e){return e.frame}, type: number)
Example
Make x translation depend on y rotation.