Amberwave Visualization Spec — version 1.0
Status: published 2026-11-12. Describes exactly what the Amberwave visualization engine (crates/avs) supports today. A preset written to this spec plays in Amberwave without any plug-in or extra install.
Version 2 (planned, not available yet): a sandboxed effect-plugin API, so developers can add new effect types (WebAssembly code and/or GPU shaders) that run unchanged on macOS, Windows and iOS. Version 1 covers presets: combinations of the built-in effects driven by small scripts.
1. What a visualization is
Amberwave plays two preset formats, both kept exactly as their original tools wrote them:
| Format | File | Made with | Notes |
|---|---|---|---|
| Winamp™ AVS (Advanced Visualization Studio) | .avs (binary) | Winamp™'s AVS editor (Windows) | Effect stacks plus EEL scripts. |
| MilkDrop 1.x | .milk (text, INI style) | Any text editor, or MilkDrop's preset editor | Warp mesh, per-frame and per-pixel scripts, custom waves and shapes. |
Presets are data files, not programs. Nothing in a preset can read files, use the network or run native code. A preset that misbehaves is stopped, and the player carries on.
2. Installing presets
Put presets (and any images they use) in either of these places:
~/Library/Application Support/Amberwave/Visualizations/. Visualizer › Open Presets Folder opens it.- Any folder added with Visualizer › Add Preset Folder…
How folders are read:
- Folders are scanned recursively.
- An
.avsfile is accepted only if it starts with the AVS magicNullsoft AVS Preset 0.1or0.2followed by0x1A. - Identical files are listed once.
- Presets are listed by name; the name shown (title card, window title) is the file name without its extension.
Images used by AVS Picture, Picture II and Texer effects are found by file name. Amberwave looks:
- next to the preset;
- in the folder above it;
- anywhere in the preset folders.
Supported image types: BMP, JPEG, PNG, GIF. Ship images in the same folder as the preset.
3. Audio data a preset receives
Both engines are fed the same analysis, about 60 times a second:
- Waveform: the latest 576 samples per channel (left, right), signed 8-bit range (−127…127), taken from what is actually playing.
- Spectrum: 576 bins per channel, 0…255. The bins are evenly spaced in frequency (bin i is FFT bin i of a 1152-point FFT); the level is on a logarithmic (dB-like) scale, as in Winamp™.
- Beat: Winamp™ AVS's own beat detector (true on a beat frame).
- MilkDrop levels:
bass,midandtrebaverage about 1.0 over time.- Each is the energy in its band divided by its own long-term average, so a value above 1 means louder than usual.
- Bands: FFT bins 1–7, 7–52 and 52–230 of a 1152-point FFT. At 44.1 kHz that is about 40–270 Hz, 270 Hz–2 kHz and 2–8.8 kHz; at higher sample rates the bands shift up in proportion.
bass_att,mid_attandtreb_attare smoothed versions. All six are capped at 10.
Surround music is analysed as the front left/right pair the speakers receive.
4. AVS presets
4.1 Effects
Behaviour follows the Nullsoft AVS source (BSD licence; see crates/avs/NOTICE), so Winamp™'s own documentation for each effect applies.
Built-in Winamp™ effects:
- Render: Simple, SuperScope, Dot Plane, Oscilloscope Star, Ring, Rotating Stars, Dot Grid, Dot Fountain, Bass Spin, Moving Particle, Starfield, Timescope, Text, Picture.
- Trans: Movement, Dynamic Movement, Dynamic Distance Modifier, Dynamic Shift, Blur, Roto Blitter, Mirror, Water, Water Bump, Bump, Blitter Feedback, Brightness, Fast Brightness, Color Clip, Color Modifier, Colorfade, Mosaic, Interleave, Grain, Scatter, Interferences, Unique Tone, Invert, Fadeout.
- Misc: Effect List (with blend modes, input/output buffers and on-beat enabling), Buffer Save, Custom BPM, On Beat Clear, Clear Screen, Set Render Mode, Comment.
Third-party APE effects (re-implemented):
- Color Map
- Channel Shift
- Multiplier
- Convolution Filter (Holden03)
- Add Borders
- Color Reduction
- Video Delay (Holden04)
- Global Variables (Jheriko)
- Multi Filter (Jheriko)
- Texer, Texer II (Acko.net)
- Triangle
- Picture II
- Normalise
- FunkyFX FyrewurX: a recreation; its original source was never published.
Accepted but with no visual effect: VFX Framerate Limiter and AVS Trans Automation. AVS Transmacros are not expanded.
Not supported (the effect is skipped, the rest of the preset runs, and the hover bar names it): SVP/Video, Multi Delay, IrisAPE, 3DAPE, Buffer Blend, VisFrac, Tentacles 3D, Metaballs 3D, Nullsoft TV and a few rare plug-ins.
Coverage on a library of 12,528 real presets: 97.1% run with every effect supported.
4.2 Scripting (EEL)
Amberwave runs EEL the way Winamp™ AVS 2.8 did (EEL1-compatible).
Syntax:
- Statements are separated by
;. - A statement that does not compile is skipped, as Winamp™ did, rather than failing the whole script.
- Operators:
- arithmetic
+ - * / %(%works on whole numbers) and^(power); - bitwise, on whole numbers:
|(or),&(and),~(exclusive or),<<,>>; - assignment
= += -= *= /= %= |= &= ~=, and^=(raise to a power); - comparisons
== != < > <= >=, logic&& || !, and? :. Precedence follows EEL2.
- arithmetic
x[i]reads or writesmegabuf(x+i).- Comments:
//and/* */. - "True" means |x| ≥ 0.00001.
Functions:
- Math:
sin cos tan asin acos atan atan2 sqrt sqr pow exp log log10 abs sign floor ceil min max invsqrt sigmoid. - Logic:
if(c,a,b) equal above below band bor bnot. - Flow:
loop(n, code)andwhile(code), each limited to 1,048,576 iterations;exec2andexec3. - Other:
rand(n)returns a whole number in 0…n−1.gettime(0)gives seconds since Amberwave started (not since the preset started); use differences between calls for timing.getkbmouse(n).getosc(band, width, channel)andgetspec(band, width, channel).
- Constants:
$pi,$e,$phi.
Memory:
megabuf(i): each preset's own memory.gmegabuf(i): shared by all presets.memcpyandmemset.- Up to 8,388,608 values each.
reg00…reg99are shared globals.
Per-effect variables (for example SuperScope's n i v x y red green blue linesize skip drawmode w h b, or Dynamic Movement's x y r d alpha) are the same as in Winamp™.
5. MilkDrop presets
Supported (MilkDrop 1.x):
- Preset settings (the INI keys MilkDrop writes, e.g.
fDecay,zoom,nWaveMode,fVideoEchoAlpha,ob_size,bTexWrap,bInvert…). per_frame_init_N,per_frame_Nandper_pixel_Ncode.- Variables available to scripts:
- Per-frame:
zoom zoomexp rot warp cx cy dx dy sx sy decaywave_r wave_g wave_b wave_a wave_x wave_y wave_mode wave_mystery wave_usedots wave_thick wave_additive wave_brightenob_size ob_r ob_g ob_b ob_a ib_size ib_r ib_g ib_b ib_amv_x mv_y mv_dx mv_dy mv_l mv_r mv_g mv_b mv_aecho_zoom echo_alpha echo_orient gamma darken_center wrap invert brighten darken solarizeq1…q32
- Read-only:
time fps frame progress bass mid treb bass_att mid_att treb_att meshx meshy aspectx aspecty pixelsx pixelsy. - Per-pixel:
x y rad angpluszoom zoomexp rot warp cx cy dx dy sx sy.
- Per-frame:
- The 48 × 36 warp mesh; video echo; gamma; brighten, darken, solarize and invert; motion vectors; outer and inner borders; darken-centre.
- All 9 main waveform modes.
- 4 custom waves (
wavecode_N_*,wave_N_init/per_frame/per_point). Point variables:x y r g b a sample value1 value2 t1…t8. - 4 custom shapes (
shapecode_N_*,shape_N_init/per_frame), including textured shapes andnum_instinstancing. Variables:x y rad ang r g b a r2 g2 b2 a2 border_r border_g border_b border_a sides thick additive textured tex_zoom tex_ang instance num_inst t1…t8.
Code-line rule (same as MilkDrop): code lines are read from _1 upward and stop at the first missing number. A preset whose code starts at _2 has no code.
Not supported yet:
- MilkDrop 2 pixel shaders (
warp_N/comp_NHLSL,PSVERSION): presets that use them run without the shader stage, and the hover bar says so. - User textures named by shaders.
- Blending between presets.
6. Testing a preset
- In the player: move the mouse over the visualizer. The bar names the preset and any unsupported features.
- From the command line (repository):
cargo run --release -p amberwave-avs --example avs_render -- <preset.avs|.milk> out.png [frames] [WxH]renders a frame with synthetic music.-- --census <folder>checks a whole folder of AVS presets (coverage, crashes, timing).-- --milk-census <folder>does the same for MilkDrop.
7. Distributing presets
- Give each preset a descriptive file name. That name is what users see.
- Include every image the preset uses, in the same folder.
- State your licence. Amberwave never modifies a preset file.
- MilkDrop presets are plain text, so mention the author in a
// commentline inside the code.
8. Compatibility promise
Presets that follow this spec keep working in later Amberwave versions. When version 2 adds plug-in effects, version-1 presets are unchanged.
