34 lines
849 B
Text
Executable file
34 lines
849 B
Text
Executable file
# Adapted from "Synth-C - Quantization" (Winamp AVS / visbot.net)
|
|
# Original Superscope: r = i*2pi; d = snd + .5; x = sin(r)*d; y = cos(r)*d
|
|
# with pixel quantization x = ((x*40)|0)/40 and a dot-fog sound heightmap.
|
|
name: Quantization
|
|
author: synth-c (adapted)
|
|
mode: dots
|
|
blend: additive
|
|
persist: 0.82
|
|
linewidth: 3
|
|
|
|
[init]
|
|
n = 720
|
|
hue = 0
|
|
q = 34
|
|
avg = 0
|
|
|
|
[frame]
|
|
hue = hue + dt * 0.06
|
|
avg = avg * 0.8 + vol * 0.2
|
|
rad = 0.28 + avg * 0.75
|
|
zoom = 0.9 + bass * 0.3
|
|
|
|
[point]
|
|
r = i * 6.28318
|
|
d = rad + abs(v) * 0.4
|
|
x0 = sin(r) * d * zoom
|
|
y0 = cos(r) * d * zoom
|
|
# snap to the quantization grid (the |0 division from the original)
|
|
x = floor(x0 * q) / q / aspect
|
|
y = floor(y0 * q) / q
|
|
red = 0.5 + 0.5 * sin(hue * 6.28318 + d * 3)
|
|
green = 0.5 + 0.5 * sin(hue * 6.28318 + d * 3 + 2.09)
|
|
blue = 0.5 + 0.5 * sin(hue * 6.28318 + d * 3 + 4.19)
|
|
size = 2 + mid * 5
|