Advertisement
FizzleDorf

Parseq Cheat Sheet

Dec 31st, 2022 (edited)
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. /*from the Parseq README at https://github.com/rewbs/sd-parseq*/
  2.  
  3. //Values
  4.  
  5. S Step interpolation: use the last keyframed value
  6.  
  7. L (default) Linear interpolation betwen the last and next keyframed value
  8.  
  9. C Cubic spline interpolation betwen the last and next keyframed value
  10.  
  11. P Polinomial interpolation betwen the last and next keyframed value. Very similar to Cubic spline.
  12.  
  13. 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.
  14.  
  15. prev_keyframe Previous keyframe number for this column
  16.  
  17. next_keyframe Next keyframe number for this column
  18.  
  19. prev_keyframe_value Previous keyframed value for this column
  20.  
  21. next_keyframe_value Next keyframed value for this column
  22.  
  23.  
  24. //Functions
  25.  
  26. /*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)).*/
  27.  
  28. 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.
  29.  
  30. sin() Sine wave oscillator. See below for arguments (only period is required).
  31.  
  32. sq() Square wave oscillator.
  33.  
  34. tri() Triangle wave oscillator.
  35.  
  36. saw() Sawtooth wave oscillator.
  37.  
  38. pulse() Pulse wave oscillator.
  39.  
  40. bez() Bezier curve between previous and next keyframe.
  41. //Arguments are the same as https://cubic-bezier.com/ .
  42. //If none specified, defaults to bez(0.5,0,0.5,1).
  43.  
  44. min() Return the minimum of 2 argument
  45.  
  46. max() Return the maximum of 2 argument
  47.  
  48. abs() Return the asolute value of the argument
  49.  
  50. round() Return the rounded value of the argument
  51.  
  52.  
  53. //Oscillator arguments:
  54.  
  55. 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)).
  56.  
  57. Amplitude a (default: 1): The amplitude of the oscillation.
  58. sin(p=4b, a=2) is equivalent to sin(p=4b)*2.
  59.  
  60. Phase shift ps (default: 0): The x-axis offset of the oscillation.
  61.  
  62. Centre c (default: 0): The y-axis offset of the oscillation.
  63. sin(p=4b, c=2) is equivalent to sin(p=4b)+2
  64.  
  65. Pulse width pw (default: 5): pulse() function only The pulse width.
  66.  
  67.  
  68. //Units
  69.  
  70. 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.
  71.  
  72. f (default) frames
  73.  
  74. s seconds
  75.  
  76. b beats
  77.  
  78. //Other operators and expressions:
  79.  
  80. 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.
  81.  
  82. <expr1> + <expr2> Add two expressions.
  83.  
  84. <expr1> - <expr2> Subtract two expressions
  85.  
  86. <expr1> * <expr2> Multiply two expressions
  87.  
  88. <expr1> / <expr2> Divide two expressions
  89.  
  90. <expr1> % <expr2> Modulus
  91.  
  92. <expr1> != <expr2> 1 if expressions are not equal, 0 otherwise.
  93.  
  94. <expr1> == <expr2> 1 if expressions are equal, 0 otherwise.
  95.  
  96. <expr1> < <expr2> 1 if less than , 0 otherwise.
  97.  
  98. <expr1> <= <expr2> 1 if less than or equals , 0 otherwise.
  99.  
  100. <expr1> >= <expr2> 1 if greater than , 0 otherwise.
  101.  
  102. <expr1> < <expr2> 1 if greater than or equals , 0 otherwise.
  103.  
  104. <expr1> and <expr2> 1 if and are non-zero, 0 otherwise.
  105.  
  106. <expr1> or <expr2> 1 if or are non-zero, 0 otherwise.
  107.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement