Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*from the Parseq README at https://github.com/rewbs/sd-parseq*/
- //Values
- S Step interpolation: use the last keyframed value
- L (default) Linear interpolation betwen the last and next keyframed value
- C Cubic spline interpolation betwen the last and next keyframed value
- P Polinomial interpolation betwen the last and next keyframed value. Very similar to Cubic spline.
- f The frame number. Not very useful alone, but can be used to reference the overall video position in your interpolation algoritm. For example, add it to your seed value to increment the seed on every frame.
- prev_keyframe Previous keyframe number for this column
- next_keyframe Next keyframe number for this column
- prev_keyframe_value Previous keyframed value for this column
- next_keyframe_value Next keyframed value for this column
- //Functions
- /*All functions can be called either with unnamed args (e.g. sin(10,2)) or named args (e.g. sin(period=10, amplitude=2)). Most arguments have long and short names (e.g. sin(p=10, a=2)).*/
- In the examples below, note how the oscillators' amplitude is set to the linearly interpolated value of the field (L), from its initial value of 1 on frame 0, to value 0 on frame 120. This is why the amplitude of the oscillator decreases over time.
- sin() Sine wave oscillator. See below for arguments (only period is required).
- sq() Square wave oscillator.
- tri() Triangle wave oscillator.
- saw() Sawtooth wave oscillator.
- pulse() Pulse wave oscillator.
- bez() Bezier curve between previous and next keyframe.
- //Arguments are the same as https://cubic-bezier.com/ .
- //If none specified, defaults to bez(0.5,0,0.5,1).
- min() Return the minimum of 2 argument
- max() Return the maximum of 2 argument
- abs() Return the asolute value of the argument
- round() Return the rounded value of the argument
- //Oscillator arguments:
- Period p required: The period of the oscillation. 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)).
- Amplitude a (default: 1): The amplitude of the oscillation.
- sin(p=4b, a=2) is equivalent to sin(p=4b)*2.
- Phase shift ps (default: 0): The x-axis offset of the oscillation.
- Centre c (default: 0): The y-axis offset of the oscillation.
- sin(p=4b, c=2) is equivalent to sin(p=4b)+2
- Pulse width pw (default: 5): pulse() function only The pulse width.
- //Units
- Units can be used to modify numbers representing frame ranges to match second of beat offsets calculated using the FPS and BPM values. This is particularly useful when specifying the period of an oscillator.
- f (default) frames
- s seconds
- b beats
- //Other operators and expressions:
- if <cond> <consequent> else <alt> if cond evaluates to any value other than 0, return consequent, else return alt. cond, consequent and alt are all arbitrary expressions.
- <expr1> + <expr2> Add two expressions.
- <expr1> - <expr2> Subtract two expressions
- <expr1> * <expr2> Multiply two expressions
- <expr1> / <expr2> Divide two expressions
- <expr1> % <expr2> Modulus
- <expr1> != <expr2> 1 if expressions are not equal, 0 otherwise.
- <expr1> == <expr2> 1 if expressions are equal, 0 otherwise.
- <expr1> < <expr2> 1 if less than , 0 otherwise.
- <expr1> <= <expr2> 1 if less than or equals , 0 otherwise.
- <expr1> >= <expr2> 1 if greater than , 0 otherwise.
- <expr1> < <expr2> 1 if greater than or equals , 0 otherwise.
- <expr1> and <expr2> 1 if and are non-zero, 0 otherwise.
- <expr1> or <expr2> 1 if or are non-zero, 0 otherwise.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement