├── test ├── fixtures │ ├── (empty).avs │ ├── Misc │ │ ├── Comment.avs │ │ ├── Buffer Save.avs │ │ ├── Custom BPM.avs │ │ └── Set render mode.avs │ ├── Trans │ │ ├── Invert.avs │ │ ├── Water.avs │ │ ├── Fadeout.avs │ │ ├── Blitter Feedback.avs │ │ ├── Blur - Heavy blur (Round up).avs │ │ ├── Blur - Light blur (Round up).avs │ │ ├── Blur - No blur (Round down).avs │ │ ├── Blur - No blur (Round up).avs │ │ ├── Color Clip - Off.avs │ │ ├── Color Modifier.avs │ │ ├── Fast Brightness - Brighten by 2x.avs │ │ ├── Fast Brightness - Darken by 0.5x.avs │ │ ├── Fast Brightness - Do nothing.avs │ │ ├── Grain - Replace.avs │ │ ├── Mirror - Static.avs │ │ ├── Mosaic.avs │ │ ├── Blur - Heavy blur (Round down).avs │ │ ├── Blur - Light blur (Round down).avs │ │ ├── Blur - Medium blur (Round down).avs │ │ ├── Blur - Medium blur (Round up).avs │ │ ├── Color Clip - Above.avs │ │ ├── Color Clip - Below.avs │ │ ├── Color Clip - Near.avs │ │ ├── Grain - Blend 50-50.avs │ │ ├── Movement - none.avs │ │ ├── Grain - Additive blend.avs │ │ ├── Mirror - OnBeat Random.avs │ │ ├── Mosaic - OnBeat.avs │ │ ├── Movement - bleedin'.avs │ │ ├── Movement - gridley.avs │ │ ├── Movement - sunburster.avs │ │ ├── Movement - swill.avs │ │ ├── Movement - tunneling.avs │ │ ├── Roto Blitter.avs │ │ ├── Water Bump.avs │ │ ├── Interleave.avs │ │ ├── Movement - 5 pointed distro.avs │ │ ├── Movement - big swirl out.avs │ │ ├── Movement - bubbling outward.avs │ │ ├── Movement - grapevine.avs │ │ ├── Movement - medium swirl.avs │ │ ├── Movement - quadrant.avs │ │ ├── Movement - slight fuzzify.avs │ │ ├── Movement - spinny tube.avs │ │ ├── Movement - swirl to center.avs │ │ ├── Scatter.avs │ │ ├── Movement - 6-way kaleida.avs │ │ ├── Movement - blocky partial out.avs │ │ ├── Movement - radial swirlies.avs │ │ ├── Movement - shift rotate left.avs │ │ ├── Movement - shifted big swirl out.avs │ │ ├── Brightness - Replace.avs │ │ ├── Movement - cosine radial 3-way.avs │ │ ├── Movement - psychotic beaming outward.avs │ │ ├── Brightness - Blend 50-50.avs │ │ ├── Dynamic Movement.avs │ │ ├── Movement - bubbling outward with swirl.avs │ │ ├── Movement - swirl around both ways at once.avs │ │ ├── Texer.avs │ │ ├── Water Bump - Random drop position.avs │ │ ├── Brightness - Additive blend.avs │ │ ├── Color Map.avs │ │ ├── Colorfade.avs │ │ ├── Video Delay.avs │ │ ├── Interference.avs │ │ ├── Dynamic Shift.avs │ │ ├── Convolution Filter.avs │ │ ├── Channel Shift - BGR.avs │ │ ├── Channel Shift - BRG.avs │ │ ├── Channel Shift - GBR.avs │ │ ├── Channel Shift - GRB.avs │ │ ├── Channel Shift - RBG.avs │ │ ├── Channel Shift - RGB.avs │ │ ├── Color Reduction - 128.avs │ │ ├── Color Reduction - 16.avs │ │ ├── Color Reduction - 2.avs │ │ ├── Color Reduction - 256.avs │ │ ├── Color Reduction - 32.avs │ │ ├── Color Reduction - 4.avs │ │ ├── Color Reduction - 64.avs │ │ ├── Color Reduction - 8.avs │ │ ├── Multi Filter - Chrome.avs │ │ ├── Unique Tone - Replace.avs │ │ ├── Color Modifier - 4x Red Brightness, 2x Green, 1x Blue.avs │ │ ├── Dynamic Movement - Wavy.avs │ │ ├── Multi Delay.avs │ │ ├── Color Modifier - Solarization.avs │ │ ├── Dynamic Distance Modifier.avs │ │ ├── Unique Tone - Blend 50-50.avs │ │ ├── Multi Filter - Double Chrome.avs │ │ ├── Multi Filter - Triple Chrome.avs │ │ ├── Unique Tone - Additive blend.avs │ │ ├── Color Modifier - Inverse Solarization (Soft).avs │ │ ├── Unique Tone - Replace (Invert).avs │ │ ├── Bump.avs │ │ ├── Dynamic Movement - 6-Way Outswirl.avs │ │ ├── Dynamic Movement - Unspun Kaleida.avs │ │ ├── Dynamic Movement - Random Direction.avs │ │ ├── Dynamic Movement - Roiling Gridley.avs │ │ ├── Unique Tone - Blend 50-50 (Invert).avs │ │ ├── Dynamic Movement - Smooth Rotoblitter.avs │ │ ├── Unique Tone - Additive blend (Invert).avs │ │ ├── Color Modifier - Double Solarization.avs │ │ ├── Dynamic Movement - Random Rotate.avs │ │ ├── Color Modifier - Big Brightness on Beat.avs │ │ ├── Color Modifier - Rolling Tone (Beat Interpolative).avs │ │ ├── Dynamic Movement - In and Out.avs │ │ ├── Color Modifier - Random Inverse Tone (Switch on Beat).avs │ │ ├── Color Modifier - Pulsing Brightness (Beat Interpolative).avs │ │ ├── Color Modifier - Rolling Solarization (Beat Interpolative).avs │ │ ├── Multi Filter - Infinite Root Multiplier + Small Border Convolution.avs │ │ └── Color Modifier - Big Brightness on Beat (Interpolative).avs │ ├── (empty - Clear every frame).avs │ ├── Render │ │ ├── Clear Screen - Replace.avs │ │ ├── Clear Screen - Additive blend.avs │ │ ├── Clear Screen - Blend 50-50.avs │ │ ├── Clear Screen - Default render blend mode.avs │ │ ├── Picture (no image, disabled).avs │ │ ├── Picture (no image, enabled).avs │ │ ├── Text.avs │ │ ├── Dot Plane.avs │ │ ├── Dot Fountain.avs │ │ ├── OnBeat Clear.avs │ │ ├── Text (Arial).avs │ │ ├── Picture (no image, enabled, keep aspect ratio on X-axis).avs │ │ ├── Picture (no image, enabled, keep aspect ratio on Y-axis).avs │ │ ├── Picture - Replace.avs │ │ ├── Ring - Spectrum.avs │ │ ├── Rotating Stars.avs │ │ ├── Bass Spin - Lines.avs │ │ ├── Dot Grid - 50-50.avs │ │ ├── Oscilliscope Star.avs │ │ ├── Picture - Blend 50-50.avs │ │ ├── Text (@MS Yahei).avs │ │ ├── Dot Grid - Additive.avs │ │ ├── Dot Grid - Replace.avs │ │ ├── Picture - Additive blend.avs │ │ ├── Ring - Oscilloscope.avs │ │ ├── Starfield - Replace.avs │ │ ├── SuperScope - Spiral.avs │ │ ├── SuperScope - Sweep.avs │ │ ├── Timescope - Replace.avs │ │ ├── SuperScope - Spirostar.avs │ │ ├── Moving Particle - 50-50.avs │ │ ├── Moving Particle - Replace.avs │ │ ├── Simple - Spectrum (Dots).avs │ │ ├── Simple - Spectrum (Lines).avs │ │ ├── Simple - Spectrum (Solid).avs │ │ ├── Starfield - Blend 50-50.avs │ │ ├── SuperScope - Flitterbug.avs │ │ ├── SuperScope - Spiral Graph Fun │ │ ├── SuperScope - Swirlie Dots.avs │ │ ├── Texer II - 3D Beat Rings.avs │ │ ├── Timescope - Blend 50-50.avs │ │ ├── Moving Particle - Additive.avs │ │ ├── Picture - Blend 50-50 + onBeat Additive.avs │ │ ├── Starfield - Additive blend.avs │ │ ├── SuperScope - 3D Scope Dish.avs │ │ ├── SuperScope - Vibrating Worm.avs │ │ ├── Texer II - Flummy Spectrum.avs │ │ ├── Timescope - Additive blend.avs │ │ ├── Bass Spin - Filled Triangles.avs │ │ ├── OnBeat Clear - Blend to color.avs │ │ ├── Picture II - XOR, onBeat XOR.avs │ │ ├── Simple - Oscilloscope (Dots).avs │ │ ├── Simple - Oscilloscope (Lines).avs │ │ ├── Simple - Oscilloscope (Solid).avs │ │ ├── SuperScope - Exploding Daisy.avs │ │ ├── SuperScope - Wandering Simple.avs │ │ ├── SuperScope - Whiplash Spiral.avs │ │ ├── Picture II - 50-50, onBeat 50-50.avs │ │ ├── SuperScope - Rotating Bow Thing.avs │ │ ├── Texer II - Colored Oscilloscope.avs │ │ ├── Timescope - Default render blend.avs │ │ ├── Picture II - Ignore, onBeat Ignore.avs │ │ ├── Texer II - Beat-responsive Circle.avs │ │ ├── Dot Grid - Default render blend mode.avs │ │ ├── Picture II - Maximum, onBeat Maximum.avs │ │ ├── Picture II - Minimum, onBeat Minimum.avs │ │ ├── Picture II - Replace, onBeat Replace.avs │ │ ├── SuperScope - Vertical Bounding Scope.avs │ │ ├── Picture II - Additive, onBeat Additive.avs │ │ ├── Picture II - Multiply, onBeat Multiply.avs │ │ ├── SuperScope - Alternating Diagonal Scope.avs │ │ ├── Picture II - Adjustable, onBeat Adjustable.avs │ │ ├── Moving Particle - Default render blend mode.avs │ │ ├── Picture II - Subtractive 1, onBeat Subtractive 1.avs │ │ └── Picture II - Subtractive 2, onBeat Subtractive 2.avs │ ├── Effect List.avs │ └── Virtual Effect │ │ └── Add Border.avs ├── expected │ ├── (empty).webvs │ ├── (empty - Clear every frame).webvs │ ├── Misc │ │ ├── Comment.webvs │ │ ├── Buffer Save.webvs │ │ ├── Set render mode.webvs │ │ └── Custom BPM.webvs │ ├── Trans │ │ ├── Water.webvs │ │ ├── Invert.webvs │ │ ├── Fadeout.webvs │ │ ├── Color Reduction - 2.webvs │ │ ├── Color Reduction - 4.webvs │ │ ├── Color Reduction - 8.webvs │ │ ├── Color Reduction - 128.webvs │ │ ├── Color Reduction - 16.webvs │ │ ├── Color Reduction - 256.webvs │ │ ├── Color Reduction - 32.webvs │ │ ├── Color Reduction - 64.webvs │ │ ├── Video Delay.webvs │ │ ├── Blur - No blur (Round up).webvs │ │ ├── Channel Shift - BGR.webvs │ │ ├── Channel Shift - BRG.webvs │ │ ├── Channel Shift - GBR.webvs │ │ ├── Channel Shift - GRB.webvs │ │ ├── Channel Shift - RBG.webvs │ │ ├── Channel Shift - RGB.webvs │ │ ├── Fast Brightness - Do nothing.webvs │ │ ├── Blur - Heavy blur (Round up).webvs │ │ ├── Blur - Light blur (Round up).webvs │ │ ├── Blur - No blur (Round down).webvs │ │ ├── Fast Brightness - Brighten by 2x.webvs │ │ ├── Texer.webvs │ │ ├── Blur - Heavy blur (Round down).webvs │ │ ├── Blur - Light blur (Round down).webvs │ │ ├── Blur - Medium blur (Round up).webvs │ │ ├── Fast Brightness - Darken by 0.5x.webvs │ │ ├── Blur - Medium blur (Round down).webvs │ │ ├── Grain - Replace.webvs │ │ ├── Multi Filter - Chrome.webvs │ │ ├── Color Clip - Off.webvs │ │ ├── Color Clip - Above.webvs │ │ ├── Color Clip - Below.webvs │ │ ├── Color Clip - Near.webvs │ │ ├── Grain - Additive blend.webvs │ │ ├── Grain - Blend 50-50.webvs │ │ ├── Blitter Feedback.webvs │ │ ├── Multi Filter - Double Chrome.webvs │ │ ├── Multi Filter - Triple Chrome.webvs │ │ ├── Unique Tone - Replace.webvs │ │ ├── Color Modifier.webvs │ │ ├── Unique Tone - Blend 50-50.webvs │ │ ├── Unique Tone - Additive blend.webvs │ │ ├── Unique Tone - Replace (Invert).webvs │ │ ├── Interleave.webvs │ │ ├── Mosaic.webvs │ │ ├── Water Bump.webvs │ │ ├── Unique Tone - Additive blend (Invert).webvs │ │ ├── Unique Tone - Blend 50-50 (Invert).webvs │ │ ├── Colorfade.webvs │ │ ├── Mosaic - OnBeat.webvs │ │ ├── Movement - none.webvs │ │ ├── Dynamic Shift.webvs │ │ ├── Roto Blitter.webvs │ │ ├── Movement - slight fuzzify.webvs │ │ ├── Brightness - Replace.webvs │ │ ├── Movement - blocky partial out.webvs │ │ ├── Water Bump - Random drop position.webvs │ │ ├── Brightness - Blend 50-50.webvs │ │ ├── Mirror - Static.webvs │ │ ├── Brightness - Additive blend.webvs │ │ ├── Color Modifier - Solarization.webvs │ │ ├── Mirror - OnBeat Random.webvs │ │ ├── Scatter.webvs │ │ ├── Movement - cosine radial 3-way.webvs │ │ ├── Dynamic Movement.webvs │ │ ├── Movement - 6-way kaleida.webvs │ │ ├── Movement - gridley.webvs │ │ ├── Movement - spinny tube.webvs │ │ ├── Movement - sunburster.webvs │ │ ├── Movement - tunneling.webvs │ │ ├── Movement - big swirl out.webvs │ │ ├── Movement - psychotic beaming outward.webvs │ │ ├── Movement - shift rotate left.webvs │ │ ├── Color Modifier - 4x Red Brightness, 2x Green, 1x Blue.webvs │ │ ├── Color Modifier - Inverse Solarization (Soft).webvs │ │ ├── Movement - bleedin'.webvs │ │ ├── Multi Filter - Infinite Root Multiplier + Small Border Convolution.webvs │ │ ├── Multi Delay.webvs │ │ ├── Color Modifier - Double Solarization.webvs │ │ ├── Interference.webvs │ │ ├── Bump.webvs │ │ ├── Color Modifier - Big Brightness on Beat.webvs │ │ ├── Movement - 5 pointed distro.webvs │ │ ├── Movement - bubbling outward.webvs │ │ ├── Movement - medium swirl.webvs │ │ ├── Movement - radial swirlies.webvs │ │ ├── Movement - swirl around both ways at once.webvs │ │ ├── Movement - swirl to center.webvs │ │ ├── Convolution Filter.webvs │ │ ├── Dynamic Distance Modifier.webvs │ │ ├── Movement - grapevine.webvs │ │ ├── Color Map.webvs │ │ ├── Movement - quadrant.webvs │ │ ├── Movement - shifted big swirl out.webvs │ │ ├── Movement - swill.webvs │ │ ├── Dynamic Movement - Random Rotate.webvs │ │ ├── Dynamic Movement - In and Out.webvs │ │ ├── Color Modifier - Big Brightness on Beat (Interpolative).webvs │ │ ├── Color Modifier - Pulsing Brightness (Beat Interpolative).webvs │ │ ├── Movement - bubbling outward with swirl.webvs │ │ ├── Color Modifier - Rolling Solarization (Beat Interpolative).webvs │ │ ├── Dynamic Movement - Unspun Kaleida.webvs │ │ ├── Dynamic Movement - Random Direction.webvs │ │ ├── Color Modifier - Rolling Tone (Beat Interpolative).webvs │ │ ├── Dynamic Movement - Wavy.webvs │ │ ├── Color Modifier - Random Inverse Tone (Switch on Beat).webvs │ │ ├── Dynamic Movement - 6-Way Outswirl.webvs │ │ ├── Dynamic Movement - Smooth Rotoblitter.webvs │ │ └── Dynamic Movement - Roiling Gridley.webvs │ ├── Render │ │ ├── Rotating Stars.webvs │ │ ├── SuperScope - Spiral Graph Fun │ │ ├── OnBeat Clear.webvs │ │ ├── Ring - Spectrum.webvs │ │ ├── Timescope - Replace.webvs │ │ ├── Ring - Oscilloscope.webvs │ │ ├── Clear Screen - Replace.webvs │ │ ├── Dot Grid - 50-50.webvs │ │ ├── Dot Grid - Additive.webvs │ │ ├── Dot Grid - Replace.webvs │ │ ├── OnBeat Clear - Blend to color.webvs │ │ ├── Timescope - Additive blend.webvs │ │ ├── Timescope - Blend 50-50.webvs │ │ ├── Oscilliscope Star.webvs │ │ ├── Bass Spin - Lines.webvs │ │ ├── Clear Screen - Additive blend.webvs │ │ ├── Clear Screen - Blend 50-50.webvs │ │ ├── Timescope - Default render blend.webvs │ │ ├── Dot Grid - Default render blend mode.webvs │ │ ├── Bass Spin - Filled Triangles.webvs │ │ ├── Clear Screen - Default render blend mode.webvs │ │ ├── Dot Plane.webvs │ │ ├── Simple - Spectrum (Dots).webvs │ │ ├── Simple - Spectrum (Lines).webvs │ │ ├── Simple - Spectrum (Solid).webvs │ │ ├── Picture (no image, enabled).webvs │ │ ├── Simple - Oscilloscope (Dots).webvs │ │ ├── Starfield - Replace.webvs │ │ ├── Dot Fountain.webvs │ │ ├── Picture (no image, disabled).webvs │ │ ├── Simple - Oscilloscope (Lines).webvs │ │ ├── Simple - Oscilloscope (Solid).webvs │ │ ├── Starfield - Blend 50-50.webvs │ │ ├── Picture - Replace.webvs │ │ ├── Starfield - Additive blend.webvs │ │ ├── Moving Particle - 50-50.webvs │ │ ├── Moving Particle - Replace.webvs │ │ ├── Picture - Blend 50-50.webvs │ │ ├── Moving Particle - Additive.webvs │ │ ├── Picture - Additive blend.webvs │ │ ├── Picture (no image, enabled, keep aspect ratio on X-axis).webvs │ │ ├── Picture (no image, enabled, keep aspect ratio on Y-axis).webvs │ │ ├── Picture - Blend 50-50 + onBeat Additive.webvs │ │ ├── Moving Particle - Default render blend mode.webvs │ │ ├── Picture II - XOR, onBeat XOR.webvs │ │ ├── Picture II - 50-50, onBeat 50-50.webvs │ │ ├── Picture II - Ignore, onBeat Ignore.webvs │ │ ├── Picture II - Maximum, onBeat Maximum.webvs │ │ ├── Picture II - Minimum, onBeat Minimum.webvs │ │ ├── Picture II - Replace, onBeat Replace.webvs │ │ ├── Picture II - Additive, onBeat Additive.webvs │ │ ├── Picture II - Multiply, onBeat Multiply.webvs │ │ ├── SuperScope - Spiral.webvs │ │ ├── Picture II - Adjustable, onBeat Adjustable.webvs │ │ ├── Picture II - Subtractive 1, onBeat Subtractive 1.webvs │ │ ├── Picture II - Subtractive 2, onBeat Subtractive 2.webvs │ │ ├── SuperScope - Rotating Bow Thing.webvs │ │ ├── SuperScope - Alternating Diagonal Scope.webvs │ │ ├── Texer II - Colored Oscilloscope.webvs │ │ ├── SuperScope - 3D Scope Dish.webvs │ │ ├── SuperScope - Vertical Bounding Scope.webvs │ │ ├── SuperScope - Vibrating Worm.webvs │ │ ├── Texer II - Flummy Spectrum.webvs │ │ ├── Text.webvs │ │ ├── Text (Arial).webvs │ │ ├── SuperScope - Swirlie Dots.webvs │ │ ├── Text (@MS Yahei).webvs │ │ ├── Texer II - Beat-responsive Circle.webvs │ │ ├── SuperScope - Whiplash Spiral.webvs │ │ ├── SuperScope - Flitterbug.webvs │ │ ├── SuperScope - Spirostar.webvs │ │ ├── SuperScope - Sweep.webvs │ │ ├── SuperScope - Exploding Daisy.webvs │ │ ├── SuperScope - Wandering Simple.webvs │ │ └── Texer II - 3D Beat Rings.webvs │ ├── Virtual Effect │ │ └── Add Border.webvs │ └── Effect List.webvs ├── sync.test.mjs ├── async.test.mjs └── _helper.mjs ├── .husky └── pre-commit ├── src ├── config.ts ├── lib │ ├── log.ts │ ├── util.ts │ ├── tables.ts │ ├── decode.ts │ └── get.ts └── main.ts ├── .eslintrc.cjs ├── .editorconfig ├── .gitignore ├── tsconfig.json ├── LICENSE ├── doc ├── components.md └── saveSections.txt ├── .github └── workflows │ └── tests.yml ├── types └── index.d.ts ├── README.md └── package.json /test/fixtures/(empty).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Misc/Comment.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Invert.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2% -------------------------------------------------------------------------------- /test/fixtures/Trans/Water.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/(empty - Clear every frame).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Fadeout.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/expected/(empty).webvs: -------------------------------------------------------------------------------- 1 | {"name":"(empty)","clearFrame":false,"components":[]} -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /test/fixtures/Trans/Blitter Feedback.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Blur - Heavy blur (Round up).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Blur - Light blur (Round up).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Blur - No blur (Round down).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Blur - No blur (Round up).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Clip - Off.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2  2 | -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Modifier.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2- -------------------------------------------------------------------------------- /test/fixtures/Trans/Fast Brightness - Brighten by 2x.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2, -------------------------------------------------------------------------------- /test/fixtures/Trans/Fast Brightness - Darken by 0.5x.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2, -------------------------------------------------------------------------------- /test/fixtures/Trans/Fast Brightness - Do nothing.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2, -------------------------------------------------------------------------------- /test/fixtures/Trans/Grain - Replace.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2d -------------------------------------------------------------------------------- /test/fixtures/Trans/Mirror - Static.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Mosaic.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.22 -------------------------------------------------------------------------------- /test/fixtures/Trans/Blur - Heavy blur (Round down).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Blur - Light blur (Round down).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Blur - Medium blur (Round down).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Blur - Medium blur (Round up).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Clip - Above.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2  2 | -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Clip - Below.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2  2 | -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Clip - Near.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2  2 | -------------------------------------------------------------------------------- /test/fixtures/Trans/Grain - Blend 50-50.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2d -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - none.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Render/Clear Screen - Replace.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Grain - Additive blend.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2d -------------------------------------------------------------------------------- /test/fixtures/Trans/Mirror - OnBeat Random.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Mosaic - OnBeat.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.22 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - bleedin'.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2  -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - gridley.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - sunburster.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - swill.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - tunneling.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2  -------------------------------------------------------------------------------- /test/fixtures/Trans/Roto Blitter.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2  -------------------------------------------------------------------------------- /test/fixtures/Trans/Water Bump.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 X( -------------------------------------------------------------------------------- /test/fixtures/Render/Clear Screen - Additive blend.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Render/Clear Screen - Blend 50-50.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Interleave.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2( -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - 5 pointed distro.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2  -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - big swirl out.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - bubbling outward.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2  -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - grapevine.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - medium swirl.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - quadrant.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - slight fuzzify.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - spinny tube.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - swirl to center.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Scatter.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2  -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - 6-way kaleida.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - blocky partial out.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - radial swirlies.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - shift rotate left.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - shifted big swirl out.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Render/Clear Screen - Default render blend mode.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Render/Picture (no image, disabled).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2" -------------------------------------------------------------------------------- /test/fixtures/Render/Picture (no image, enabled).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2" -------------------------------------------------------------------------------- /test/fixtures/Trans/Brightness - Replace.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2( -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - cosine radial 3-way.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - psychotic beaming outward.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/expected/(empty - Clear every frame).webvs: -------------------------------------------------------------------------------- 1 | {"name":"(empty - Clear every frame)","clearFrame":true,"components":[]} -------------------------------------------------------------------------------- /test/fixtures/Effect List.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Effect List.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Text.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Text.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Brightness - Blend 50-50.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2( -------------------------------------------------------------------------------- /test/fixtures/Trans/Dynamic Movement.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2+1 -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - bubbling outward with swirl.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 2 |  -------------------------------------------------------------------------------- /test/fixtures/Trans/Movement - swirl around both ways at once.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 -------------------------------------------------------------------------------- /test/fixtures/Trans/Texer.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Texer.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Water Bump - Random drop position.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2 X( -------------------------------------------------------------------------------- /test/expected/Misc/Comment.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Comment","clearFrame":true,"components":[{"type":"Comment","group":"Misc","text":""}]} -------------------------------------------------------------------------------- /test/expected/Trans/Water.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Water","clearFrame":true,"components":[{"type":"Water","group":"Trans","enabled":true}]} -------------------------------------------------------------------------------- /test/fixtures/Trans/Brightness - Additive blend.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2( -------------------------------------------------------------------------------- /test/expected/Trans/Invert.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Invert","clearFrame":true,"components":[{"type":"Invert","group":"Trans","enabled":true}]} -------------------------------------------------------------------------------- /test/fixtures/Misc/Buffer Save.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Misc/Buffer Save.avs -------------------------------------------------------------------------------- /test/fixtures/Misc/Custom BPM.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Misc/Custom BPM.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Dot Plane.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Dot Plane.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Map.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Map.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Colorfade.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Colorfade.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Video Delay.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Video Delay.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Dot Fountain.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Dot Fountain.avs -------------------------------------------------------------------------------- /test/fixtures/Render/OnBeat Clear.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/OnBeat Clear.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Text (Arial).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Text (Arial).avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Interference.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Interference.avs -------------------------------------------------------------------------------- /test/fixtures/Misc/Set render mode.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Misc/Set render mode.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Picture (no image, enabled, keep aspect ratio on X-axis).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2" -------------------------------------------------------------------------------- /test/fixtures/Render/Picture (no image, enabled, keep aspect ratio on Y-axis).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2" -------------------------------------------------------------------------------- /test/fixtures/Render/Picture - Replace.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2"Cavsres_texer_circle_edgeonly_15x15.bmp -------------------------------------------------------------------------------- /test/fixtures/Render/Ring - Spectrum.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Ring - Spectrum.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Rotating Stars.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Rotating Stars.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Dynamic Shift.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2*Hd=0;&x=sin(d)*1.4; y=1.4*cos(d); d=d+0.01;d=d+2.0 -------------------------------------------------------------------------------- /test/expected/Trans/Fadeout.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Fadeout","clearFrame":true,"components":[{"type":"FadeOut","group":"Trans","speed":16,"color":"#000000"}]} -------------------------------------------------------------------------------- /test/fixtures/Render/Bass Spin - Lines.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Bass Spin - Lines.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Dot Grid - 50-50.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Dot Grid - 50-50.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Oscilliscope Star.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Oscilliscope Star.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Picture - Blend 50-50.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2"Cavsres_texer_circle_edgeonly_15x15.bmp -------------------------------------------------------------------------------- /test/fixtures/Render/Text (@MS Yahei).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Text (@MS Yahei).avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Convolution Filter.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Convolution Filter.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Dot Grid - Additive.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Dot Grid - Additive.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Dot Grid - Replace.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Dot Grid - Replace.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Picture - Additive blend.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2"Cavsres_texer_circle_edgeonly_15x15.bmp -------------------------------------------------------------------------------- /test/fixtures/Render/Ring - Oscilloscope.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Ring - Oscilloscope.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Starfield - Replace.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Starfield - Replace.avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Spiral.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Spiral.avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Sweep.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Sweep.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Timescope - Replace.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Timescope - Replace.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Channel Shift - BGR.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Channel Shift - BGR.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Channel Shift - BRG.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Channel Shift - BRG.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Channel Shift - GBR.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Channel Shift - GBR.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Channel Shift - GRB.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Channel Shift - GRB.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Channel Shift - RBG.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Channel Shift - RBG.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Channel Shift - RGB.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Channel Shift - RGB.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Reduction - 128.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Reduction - 128.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Reduction - 16.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Reduction - 16.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Reduction - 2.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Reduction - 2.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Reduction - 256.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Reduction - 256.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Reduction - 32.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Reduction - 32.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Reduction - 4.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Reduction - 4.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Reduction - 64.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Reduction - 64.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Reduction - 8.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Reduction - 8.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Multi Filter - Chrome.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Multi Filter - Chrome.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Unique Tone - Replace.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Unique Tone - Replace.avs -------------------------------------------------------------------------------- /test/fixtures/Virtual Effect/Add Border.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Virtual Effect/Add Border.avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Spirostar.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Spirostar.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Modifier - 4x Red Brightness, 2x Green, 1x Blue.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2-/red=4*red; green=2*green; -------------------------------------------------------------------------------- /test/fixtures/Trans/Dynamic Movement - Wavy.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Dynamic Movement - Wavy.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Multi Delay.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2xqHolden05: Multi Delay8 -------------------------------------------------------------------------------- /test/expected/Render/Rotating Stars.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Rotating Stars","clearFrame":true,"components":[{"type":"RotatingStars","group":"Render","colors":["#ffffff"]}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Spiral Graph Fun: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/expected/Render/SuperScope - Spiral Graph Fun -------------------------------------------------------------------------------- /test/expected/Trans/Color Reduction - 2.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Reduction - 2","clearFrame":true,"components":[{"type":"ColorReduction","group":"Trans","colors":2}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Reduction - 4.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Reduction - 4","clearFrame":true,"components":[{"type":"ColorReduction","group":"Trans","colors":4}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Reduction - 8.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Reduction - 8","clearFrame":true,"components":[{"type":"ColorReduction","group":"Trans","colors":8}]} -------------------------------------------------------------------------------- /test/fixtures/Render/Moving Particle - 50-50.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Moving Particle - 50-50.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Moving Particle - Replace.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Moving Particle - Replace.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Simple - Spectrum (Dots).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Simple - Spectrum (Dots).avs -------------------------------------------------------------------------------- /test/fixtures/Render/Simple - Spectrum (Lines).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Simple - Spectrum (Lines).avs -------------------------------------------------------------------------------- /test/fixtures/Render/Simple - Spectrum (Solid).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Simple - Spectrum (Solid).avs -------------------------------------------------------------------------------- /test/fixtures/Render/Starfield - Blend 50-50.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Starfield - Blend 50-50.avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Flitterbug.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Flitterbug.avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Spiral Graph Fun: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Spiral Graph Fun -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Swirlie Dots.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Swirlie Dots.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Texer II - 3D Beat Rings.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Texer II - 3D Beat Rings.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Timescope - Blend 50-50.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Timescope - Blend 50-50.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Modifier - Solarization.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2-E0red=(min(1,red*2)-red)*2; 2 | green=red; blue=red; -------------------------------------------------------------------------------- /test/fixtures/Trans/Dynamic Distance Modifier.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Dynamic Distance Modifier.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Unique Tone - Blend 50-50.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Unique Tone - Blend 50-50.avs -------------------------------------------------------------------------------- /test/expected/Trans/Color Reduction - 128.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Reduction - 128","clearFrame":true,"components":[{"type":"ColorReduction","group":"Trans","colors":128}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Reduction - 16.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Reduction - 16","clearFrame":true,"components":[{"type":"ColorReduction","group":"Trans","colors":16}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Reduction - 256.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Reduction - 256","clearFrame":true,"components":[{"type":"ColorReduction","group":"Trans","colors":256}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Reduction - 32.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Reduction - 32","clearFrame":true,"components":[{"type":"ColorReduction","group":"Trans","colors":32}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Reduction - 64.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Reduction - 64","clearFrame":true,"components":[{"type":"ColorReduction","group":"Trans","colors":64}]} -------------------------------------------------------------------------------- /test/fixtures/Render/Moving Particle - Additive.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Moving Particle - Additive.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Picture - Blend 50-50 + onBeat Additive.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2"Cavsres_texer_circle_edgeonly_15x15.bmp -------------------------------------------------------------------------------- /test/fixtures/Render/Starfield - Additive blend.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Starfield - Additive blend.avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - 3D Scope Dish.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - 3D Scope Dish.avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Vibrating Worm.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Vibrating Worm.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Texer II - Flummy Spectrum.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Texer II - Flummy Spectrum.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Timescope - Additive blend.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Timescope - Additive blend.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Multi Filter - Double Chrome.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Multi Filter - Double Chrome.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Multi Filter - Triple Chrome.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Multi Filter - Triple Chrome.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Unique Tone - Additive blend.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Unique Tone - Additive blend.avs -------------------------------------------------------------------------------- /test/expected/Trans/Video Delay.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Video Delay","clearFrame":true,"components":[{"type":"VideoDelay","group":"Trans","enabled":true,"useBeats":false,"delay":10}]} -------------------------------------------------------------------------------- /test/fixtures/Render/Bass Spin - Filled Triangles.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Bass Spin - Filled Triangles.avs -------------------------------------------------------------------------------- /test/fixtures/Render/OnBeat Clear - Blend to color.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/OnBeat Clear - Blend to color.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Picture II - XOR, onBeat XOR.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Picture II - XOR, onBeat XOR.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Simple - Oscilloscope (Dots).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Simple - Oscilloscope (Dots).avs -------------------------------------------------------------------------------- /test/fixtures/Render/Simple - Oscilloscope (Lines).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Simple - Oscilloscope (Lines).avs -------------------------------------------------------------------------------- /test/fixtures/Render/Simple - Oscilloscope (Solid).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Simple - Oscilloscope (Solid).avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Exploding Daisy.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Exploding Daisy.avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Wandering Simple.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Wandering Simple.avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Whiplash Spiral.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Whiplash Spiral.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Modifier - Inverse Solarization (Soft).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2-D/red=abs(red - .5) * 1.5; 2 | green=red; blue=red; -------------------------------------------------------------------------------- /test/fixtures/Trans/Unique Tone - Replace (Invert).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Unique Tone - Replace (Invert).avs -------------------------------------------------------------------------------- /src/config.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | allFields: true, 3 | builtinMax: 16384, 4 | hiddenStrings: false, 5 | presetHeaderLength: 25, 6 | sizeInt: 4 7 | }; 8 | -------------------------------------------------------------------------------- /test/expected/Virtual Effect/Add Border.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Add Border","clearFrame":true,"components":[{"type":"AddBorders","group":"Misc","enabled":true,"color":"#000000","size":1}]} -------------------------------------------------------------------------------- /test/fixtures/Render/Picture II - 50-50, onBeat 50-50.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Picture II - 50-50, onBeat 50-50.avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Rotating Bow Thing.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Rotating Bow Thing.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Texer II - Colored Oscilloscope.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Texer II - Colored Oscilloscope.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Timescope - Default render blend.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Timescope - Default render blend.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Bump.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2ld/x=0.5+cos(t)*0.3; 2 | y=0.5+sin(t)*0.3; 3 | t=t+0.1;t=0; -------------------------------------------------------------------------------- /test/fixtures/Trans/Dynamic Movement - 6-Way Outswirl.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Dynamic Movement - 6-Way Outswirl.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Dynamic Movement - Unspun Kaleida.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Dynamic Movement - Unspun Kaleida.avs -------------------------------------------------------------------------------- /test/expected/Trans/Blur - No blur (Round up).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Blur - No blur (Round up)","clearFrame":true,"components":[{"type":"Blur","group":"Trans","blur":"NONE","round":"UP"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Channel Shift - BGR.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Channel Shift - BGR","clearFrame":true,"components":[{"type":"ChannelShift","group":"Misc","mode":"BGR","onBeatRandom":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Channel Shift - BRG.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Channel Shift - BRG","clearFrame":true,"components":[{"type":"ChannelShift","group":"Misc","mode":"BRG","onBeatRandom":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Channel Shift - GBR.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Channel Shift - GBR","clearFrame":true,"components":[{"type":"ChannelShift","group":"Misc","mode":"GBR","onBeatRandom":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Channel Shift - GRB.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Channel Shift - GRB","clearFrame":true,"components":[{"type":"ChannelShift","group":"Misc","mode":"GRB","onBeatRandom":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Channel Shift - RBG.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Channel Shift - RBG","clearFrame":true,"components":[{"type":"ChannelShift","group":"Misc","mode":"RBG","onBeatRandom":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Channel Shift - RGB.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Channel Shift - RGB","clearFrame":true,"components":[{"type":"ChannelShift","group":"Misc","mode":"RBG","onBeatRandom":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Fast Brightness - Do nothing.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Fast Brightness - Do nothing","clearFrame":true,"components":[{"type":"FastBrightness","group":"Trans","factor":1}]} -------------------------------------------------------------------------------- /test/fixtures/Render/Picture II - Ignore, onBeat Ignore.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Picture II - Ignore, onBeat Ignore.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Texer II - Beat-responsive Circle.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Texer II - Beat-responsive Circle.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Dynamic Movement - Random Direction.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Dynamic Movement - Random Direction.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Dynamic Movement - Roiling Gridley.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Dynamic Movement - Roiling Gridley.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Unique Tone - Blend 50-50 (Invert).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Unique Tone - Blend 50-50 (Invert).avs -------------------------------------------------------------------------------- /test/expected/Trans/Blur - Heavy blur (Round up).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Blur - Heavy blur (Round up)","clearFrame":true,"components":[{"type":"Blur","group":"Trans","blur":"HEAVY","round":"UP"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Blur - Light blur (Round up).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Blur - Light blur (Round up)","clearFrame":true,"components":[{"type":"Blur","group":"Trans","blur":"LIGHT","round":"UP"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Blur - No blur (Round down).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Blur - No blur (Round down)","clearFrame":true,"components":[{"type":"Blur","group":"Trans","blur":"NONE","round":"DOWN"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Fast Brightness - Brighten by 2x.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Fast Brightness - Brighten by 2x","clearFrame":true,"components":[{"type":"FastBrightness","group":"Trans","factor":2}]} -------------------------------------------------------------------------------- /test/expected/Trans/Texer.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Texer","clearFrame":true,"components":[{"type":"Texer","group":"Misc","image":"","input":"REPLACE","blendMode":"MASKED_TEXTURE","particles":100}]} -------------------------------------------------------------------------------- /test/fixtures/Render/Dot Grid - Default render blend mode.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Dot Grid - Default render blend mode.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Picture II - Maximum, onBeat Maximum.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Picture II - Maximum, onBeat Maximum.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Picture II - Minimum, onBeat Minimum.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Picture II - Minimum, onBeat Minimum.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Picture II - Replace, onBeat Replace.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Picture II - Replace, onBeat Replace.avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Vertical Bounding Scope.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Vertical Bounding Scope.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Dynamic Movement - Smooth Rotoblitter.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Dynamic Movement - Smooth Rotoblitter.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Unique Tone - Additive blend (Invert).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Unique Tone - Additive blend (Invert).avs -------------------------------------------------------------------------------- /test/expected/Render/OnBeat Clear.webvs: -------------------------------------------------------------------------------- 1 | {"name":"OnBeat Clear","clearFrame":true,"components":[{"type":"OnBeatClear","group":"Render","color":"#ffffff","blendMode":"REPLACE","clearBeats":1}]} -------------------------------------------------------------------------------- /test/expected/Trans/Blur - Heavy blur (Round down).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Blur - Heavy blur (Round down)","clearFrame":true,"components":[{"type":"Blur","group":"Trans","blur":"HEAVY","round":"DOWN"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Blur - Light blur (Round down).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Blur - Light blur (Round down)","clearFrame":true,"components":[{"type":"Blur","group":"Trans","blur":"LIGHT","round":"DOWN"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Blur - Medium blur (Round up).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Blur - Medium blur (Round up)","clearFrame":true,"components":[{"type":"Blur","group":"Trans","blur":"MEDIUM","round":"UP"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Fast Brightness - Darken by 0.5x.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Fast Brightness - Darken by 0.5x","clearFrame":true,"components":[{"type":"FastBrightness","group":"Trans","factor":0.5}]} -------------------------------------------------------------------------------- /test/fixtures/Render/Picture II - Additive, onBeat Additive.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Picture II - Additive, onBeat Additive.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Picture II - Multiply, onBeat Multiply.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Picture II - Multiply, onBeat Multiply.avs -------------------------------------------------------------------------------- /test/fixtures/Render/SuperScope - Alternating Diagonal Scope.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/SuperScope - Alternating Diagonal Scope.avs -------------------------------------------------------------------------------- /test/expected/Misc/Buffer Save.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Buffer Save","clearFrame":true,"components":[{"type":"BufferSave","group":"Misc","action":"SAVE","bufferId":18,"blendMode":"REPLACE","adjustBlend":0}]} -------------------------------------------------------------------------------- /test/expected/Trans/Blur - Medium blur (Round down).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Blur - Medium blur (Round down)","clearFrame":true,"components":[{"type":"Blur","group":"Trans","blur":"MEDIUM","round":"DOWN"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Grain - Replace.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Grain - Replace","clearFrame":true,"components":[{"type":"Grain","group":"Trans","enabled":true,"blendMode":"REPLACE","amount":100,"static":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Multi Filter - Chrome.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Multi Filter - Chrome","clearFrame":true,"components":[{"type":"MultiFilter","group":"Misc","enabled":true,"effect":"CHROME","onBeat":false}]} -------------------------------------------------------------------------------- /test/fixtures/Render/Picture II - Adjustable, onBeat Adjustable.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Picture II - Adjustable, onBeat Adjustable.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Modifier - Double Solarization.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2-`Kred=(min(1,red*2)-red)*2; 2 | red=(min(1,red*2)-red)*2; 3 | green=red; blue=red; -------------------------------------------------------------------------------- /test/fixtures/Trans/Dynamic Movement - Random Rotate.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2+i r = r + dr;,dr = (rand(100) / 100) * $PI; 2 | d = d * .95; -------------------------------------------------------------------------------- /test/expected/Misc/Set render mode.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Set render mode","clearFrame":true,"components":[{"type":"SetRenderMode","group":"Misc","blend":"REPLACE","adjustBlend":0,"lineSize":1,"enabled":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Clip - Off.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Clip - Off","clearFrame":true,"components":[{"type":"ColorClip","group":"Trans","mode":"OFF","color":"#202020","outColor":"#202020","level":10}]} -------------------------------------------------------------------------------- /test/fixtures/Render/Moving Particle - Default render blend mode.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Moving Particle - Default render blend mode.avs -------------------------------------------------------------------------------- /test/expected/Trans/Color Clip - Above.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Clip - Above","clearFrame":true,"components":[{"type":"ColorClip","group":"Trans","mode":"ABOVE","color":"#202020","outColor":"#202020","level":10}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Clip - Below.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Clip - Below","clearFrame":true,"components":[{"type":"ColorClip","group":"Trans","mode":"BELOW","color":"#202020","outColor":"#202020","level":10}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Clip - Near.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Clip - Near","clearFrame":true,"components":[{"type":"ColorClip","group":"Trans","mode":"NEAR","color":"#202020","outColor":"#202020","level":10}]} -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Modifier - Big Brightness on Beat.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2-g%red=red*scale; 2 | green=red; blue=red;scale=0.07 + (scale*0.93) scale=16 3 | scale=1.0 -------------------------------------------------------------------------------- /test/expected/Render/Ring - Spectrum.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Ring - Spectrum","clearFrame":true,"components":[{"type":"Ring","group":"Render","audioChannel":"CENTER","positionX":"CENTER","colors":["#ffffff"],"size":8}]} -------------------------------------------------------------------------------- /test/expected/Render/Timescope - Replace.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Timescope - Replace","clearFrame":true,"components":[{"type":"Timescope","group":"Render","enabled":true,"color":"#ffffff","blendMode":"REPLACE","bands":39}]} -------------------------------------------------------------------------------- /test/expected/Trans/Grain - Additive blend.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Grain - Additive blend","clearFrame":true,"components":[{"type":"Grain","group":"Trans","enabled":true,"blendMode":"ADDITIVE","amount":100,"static":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Grain - Blend 50-50.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Grain - Blend 50-50","clearFrame":true,"components":[{"type":"Grain","group":"Trans","enabled":true,"blendMode":"FIFTY_FIFTY","amount":100,"static":false}]} -------------------------------------------------------------------------------- /test/fixtures/Render/Picture II - Subtractive 1, onBeat Subtractive 1.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Picture II - Subtractive 1, onBeat Subtractive 1.avs -------------------------------------------------------------------------------- /test/fixtures/Render/Picture II - Subtractive 2, onBeat Subtractive 2.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Render/Picture II - Subtractive 2, onBeat Subtractive 2.avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Modifier - Rolling Tone (Beat Interpolative).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Modifier - Rolling Tone (Beat Interpolative).avs -------------------------------------------------------------------------------- /test/fixtures/Trans/Dynamic Movement - In and Out.avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2+x d = d * dd;-c = c + ($PI/2); 2 | dd = 1 - (sin(c) * speed);speed=.2;c=0; -------------------------------------------------------------------------------- /test/expected/Misc/Custom BPM.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Custom BPM","clearFrame":true,"components":[{"type":"CustomBPM","group":"Misc","enabled":true,"mode":"ARBITRARY","arbitraryValue":33,"skipValue":33,"skipFirstBeats":33}]} -------------------------------------------------------------------------------- /test/expected/Render/Ring - Oscilloscope.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Ring - Oscilloscope","clearFrame":true,"components":[{"type":"Ring","group":"Render","audioChannel":"CENTER","positionX":"CENTER","colors":["#ffffff"],"size":8}]} -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Modifier - Random Inverse Tone (Switch on Beat).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Modifier - Random Inverse Tone (Switch on Beat).avs -------------------------------------------------------------------------------- /test/expected/Trans/Blitter Feedback.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Blitter Feedback","clearFrame":true,"components":[{"type":"BlitterFeedback","group":"Misc","zoom":30,"onBeatZoom":30,"blendMode":"REPLACE","onBeat":false,"bilinear":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Multi Filter - Double Chrome.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Multi Filter - Double Chrome","clearFrame":true,"components":[{"type":"MultiFilter","group":"Misc","enabled":true,"effect":"DOUBLE_CHROME","onBeat":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Multi Filter - Triple Chrome.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Multi Filter - Triple Chrome","clearFrame":true,"components":[{"type":"MultiFilter","group":"Misc","enabled":true,"effect":"TRIPLE_CHROME","onBeat":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Unique Tone - Replace.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Unique Tone - Replace","clearFrame":true,"components":[{"type":"UniqueTone","group":"Trans","enabled":true,"color":"#ffffff","blendMode":"REPLACE","invert":false}]} -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Modifier - Pulsing Brightness (Beat Interpolative).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Modifier - Pulsing Brightness (Beat Interpolative).avs -------------------------------------------------------------------------------- /test/expected/Render/Clear Screen - Replace.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Clear Screen - Replace","clearFrame":true,"components":[{"type":"ClearScreen","group":"Render","enabled":true,"color":"#000000","blendMode":"REPLACE","onlyFirst":false}]} -------------------------------------------------------------------------------- /test/expected/Render/Dot Grid - 50-50.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dot Grid - 50-50","clearFrame":true,"components":[{"type":"DotGrid","group":"Render","colors":["#ffffff"],"spacing":8,"speedX":128,"speedY":128,"blendMode":"FIFTY_FIFTY"}]} -------------------------------------------------------------------------------- /test/expected/Render/Dot Grid - Additive.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dot Grid - Additive","clearFrame":true,"components":[{"type":"DotGrid","group":"Render","colors":["#ffffff"],"spacing":8,"speedX":128,"speedY":128,"blendMode":"Additive"}]} -------------------------------------------------------------------------------- /test/expected/Render/Dot Grid - Replace.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dot Grid - Replace","clearFrame":true,"components":[{"type":"DotGrid","group":"Render","colors":["#ffffff"],"spacing":8,"speedX":128,"speedY":128,"blendMode":"REPLACE"}]} -------------------------------------------------------------------------------- /test/expected/Render/OnBeat Clear - Blend to color.webvs: -------------------------------------------------------------------------------- 1 | {"name":"OnBeat Clear - Blend to color","clearFrame":true,"components":[{"type":"OnBeatClear","group":"Render","color":"#ffffff","blendMode":"FIFTY_FIFTY","clearBeats":1}]} -------------------------------------------------------------------------------- /test/expected/Render/Timescope - Additive blend.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Timescope - Additive blend","clearFrame":true,"components":[{"type":"Timescope","group":"Render","enabled":true,"color":"#ffffff","blendMode":"ADDITIVE","bands":39}]} -------------------------------------------------------------------------------- /test/expected/Render/Timescope - Blend 50-50.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Timescope - Blend 50-50","clearFrame":true,"components":[{"type":"Timescope","group":"Render","enabled":true,"color":"#ffffff","blendMode":"FIFTY_FIFTY","bands":39}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Modifier.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Modifier","clearFrame":true,"components":[{"type":"ColorModifier","group":"Trans","code":{"init":"","perFrame":"","onBeat":"","perPoint":""},"recomputeEveryFrame":true}]} -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Modifier - Rolling Solarization (Beat Interpolative).avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Color Modifier - Rolling Solarization (Beat Interpolative).avs -------------------------------------------------------------------------------- /test/expected/Trans/Unique Tone - Blend 50-50.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Unique Tone - Blend 50-50","clearFrame":true,"components":[{"type":"UniqueTone","group":"Trans","enabled":true,"color":"#ffffff","blendMode":"FIFTY_FIFTY","invert":false}]} -------------------------------------------------------------------------------- /test/expected/Render/Oscilliscope Star.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Oscilliscope Star","clearFrame":true,"components":[{"type":"OscilliscopeStar","group":"Render","audioChannel":"CENTER","positionX":"CENTER","colors":["#ffffff"],"size":8,"rotation":3}]} -------------------------------------------------------------------------------- /test/expected/Trans/Unique Tone - Additive blend.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Unique Tone - Additive blend","clearFrame":true,"components":[{"type":"UniqueTone","group":"Trans","enabled":true,"color":"#ffffff","blendMode":"ADDITIVE","invert":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Unique Tone - Replace (Invert).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Unique Tone - Replace (Invert)","clearFrame":true,"components":[{"type":"UniqueTone","group":"Trans","enabled":true,"color":"#ffffff","blendMode":"REPLACE","invert":true}]} -------------------------------------------------------------------------------- /test/expected/Render/Bass Spin - Lines.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Bass Spin - Lines","clearFrame":true,"components":[{"type":"BassSpin","group":"Trans","enabledLeft":true,"enabledRight":true,"colorLeft":"#ffffff","colorRight":"#ffffff","mode":"LINES"}]} -------------------------------------------------------------------------------- /test/expected/Render/Clear Screen - Additive blend.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Clear Screen - Additive blend","clearFrame":true,"components":[{"type":"ClearScreen","group":"Render","enabled":true,"color":"#000000","blendMode":"ADDITIVE","onlyFirst":false}]} -------------------------------------------------------------------------------- /test/expected/Render/Clear Screen - Blend 50-50.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Clear Screen - Blend 50-50","clearFrame":true,"components":[{"type":"ClearScreen","group":"Render","enabled":true,"color":"#000000","blendMode":"FIFTY_FIFTY","onlyFirst":false}]} -------------------------------------------------------------------------------- /test/expected/Render/Timescope - Default render blend.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Timescope - Default render blend","clearFrame":true,"components":[{"type":"Timescope","group":"Render","enabled":true,"color":"#ffffff","blendMode":"DEFAULT","bands":39}]} -------------------------------------------------------------------------------- /test/expected/Trans/Interleave.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Interleave","clearFrame":true,"components":[{"type":"Interleave","group":"Trans","enabled":true,"x":1,"y":1,"color":"#000000","blendMode":"REPLACE","onbeat":false,"x2":1,"y2":1,"beatDuration":4}]} -------------------------------------------------------------------------------- /test/expected/Trans/Mosaic.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Mosaic","clearFrame":true,"components":[{"type":"Mosaic","group":"Trans","enabled":true,"squareSize":50,"onBeatSquareSize":1,"blendMode":"REPLACE","onBeatSizeChange":false,"onBeatSizeDuration":15}]} -------------------------------------------------------------------------------- /test/fixtures/Trans/Multi Filter - Infinite Root Multiplier + Small Border Convolution.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grandchild/AVS-File-Decoder/HEAD/test/fixtures/Trans/Multi Filter - Infinite Root Multiplier + Small Border Convolution.avs -------------------------------------------------------------------------------- /test/expected/Trans/Water Bump.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Water Bump","clearFrame":true,"components":[{"type":"WaterBump","group":"Trans","enabled":true,"density":6,"depth":600,"random":false,"dropPositionX":1,"dropPositionY":1,"dropRadius":40,"method":0}]} -------------------------------------------------------------------------------- /test/fixtures/Trans/Color Modifier - Big Brightness on Beat (Interpolative).avs: -------------------------------------------------------------------------------- 1 | Nullsoft AVS Preset 0.2-}$red = red * t; 2 | green=red;blue=red;'f = f + 1; 3 | t = (1.025 - (f / c)) * 5; c = f;f = 0;c = 200; f = 0; -------------------------------------------------------------------------------- /test/expected/Trans/Unique Tone - Additive blend (Invert).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Unique Tone - Additive blend (Invert)","clearFrame":true,"components":[{"type":"UniqueTone","group":"Trans","enabled":true,"color":"#ffffff","blendMode":"ADDITIVE","invert":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Unique Tone - Blend 50-50 (Invert).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Unique Tone - Blend 50-50 (Invert)","clearFrame":true,"components":[{"type":"UniqueTone","group":"Trans","enabled":true,"color":"#ffffff","blendMode":"FIFTY_FIFTY","invert":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Colorfade.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Colorfade","clearFrame":true,"components":[{"type":"Colorfade","group":"Trans","enabled":true,"onBeat":false,"onBeatRandom":false,"fader1":8,"fader2":-8,"fader3":-8,"beatFader1":8,"beatFader2":-8,"beatFader3":-8}]} -------------------------------------------------------------------------------- /test/expected/Trans/Mosaic - OnBeat.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Mosaic - OnBeat","clearFrame":true,"components":[{"type":"Mosaic","group":"Trans","enabled":true,"squareSize":50,"onBeatSquareSize":1,"blendMode":"REPLACE","onBeatSizeChange":true,"onBeatSizeDuration":15}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - none.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - none","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"None","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":""}]} -------------------------------------------------------------------------------- /test/expected/Render/Dot Grid - Default render blend mode.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dot Grid - Default render blend mode","clearFrame":true,"components":[{"type":"DotGrid","group":"Render","colors":["#ffffff"],"spacing":8,"speedX":128,"speedY":128,"blendMode":"DEFAULT"}]} -------------------------------------------------------------------------------- /test/expected/Render/Bass Spin - Filled Triangles.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Bass Spin - Filled Triangles","clearFrame":true,"components":[{"type":"BassSpin","group":"Trans","enabledLeft":true,"enabledRight":true,"colorLeft":"#ffffff","colorRight":"#ffffff","mode":"TRIANGLES"}]} -------------------------------------------------------------------------------- /test/expected/Render/Clear Screen - Default render blend mode.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Clear Screen - Default render blend mode","clearFrame":true,"components":[{"type":"ClearScreen","group":"Render","enabled":true,"color":"#000000","blendMode":"DEFAULT","onlyFirst":false}]} -------------------------------------------------------------------------------- /test/expected/Render/Dot Plane.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dot Plane","clearFrame":true,"components":[{"type":"DotPlane","group":"Render","rotationSpeed":16,"colorTop":"#1c6b18","colorHigh":"#ff0a23","colorMid":"#2a1d74","colorLow":"#9036d9","colorBottom":"#6b88ff","angle":-20}]} -------------------------------------------------------------------------------- /test/expected/Render/Simple - Spectrum (Dots).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Simple - Spectrum (Dots)","clearFrame":true,"components":[{"type":"Simple","group":"Render","audioSource":"Spectrum","renderType":"Dots","audioChannel":"CENTER","positionY":"CENTER","colors":["#ffffff"]}]} -------------------------------------------------------------------------------- /test/expected/Render/Simple - Spectrum (Lines).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Simple - Spectrum (Lines)","clearFrame":true,"components":[{"type":"Simple","group":"Render","audioSource":"Spectrum","renderType":"Lines","audioChannel":"CENTER","positionY":"CENTER","colors":["#ffffff"]}]} -------------------------------------------------------------------------------- /test/expected/Render/Simple - Spectrum (Solid).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Simple - Spectrum (Solid)","clearFrame":true,"components":[{"type":"Simple","group":"Render","audioSource":"Spectrum","renderType":"Solid","audioChannel":"CENTER","positionY":"CENTER","colors":["#ffffff"]}]} -------------------------------------------------------------------------------- /test/expected/Trans/Dynamic Shift.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dynamic Shift","clearFrame":true,"components":[{"type":"DynamicShift","group":"Trans","code":{"init":"d=0;","perFrame":"x=sin(d)*1.4; y=1.4*cos(d); d=d+0.01;","onBeat":"d=d+2.0"},"blendMode":"Replace","bilinear":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Roto Blitter.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Roto Blitter","clearFrame":true,"components":[{"type":"RotoBlitter","group":"Trans","zoom":31,"rotate":31,"blendMode":"REPLACE","onBeatReverse":false,"reversalSpeed":0,"onBeatZoom":31,"onBeat":false,"bilinear":true}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture (no image, enabled).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture (no image, enabled)","clearFrame":true,"components":[{"type":"Picture","group":"Render","enabled":true,"blendMode":"FIFTY_FIFTY","adapt":0,"onBeatPersist":6,"file":"","ratio":0,"aspectRatioAxis":"X"}]} -------------------------------------------------------------------------------- /test/expected/Render/Simple - Oscilloscope (Dots).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Simple - Oscilloscope (Dots)","clearFrame":true,"components":[{"type":"Simple","group":"Render","audioSource":"Waveform","renderType":"Dots","audioChannel":"CENTER","positionY":"CENTER","colors":["#ffffff"]}]} -------------------------------------------------------------------------------- /test/expected/Render/Starfield - Replace.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Starfield - Replace","clearFrame":true,"components":[{"type":"Starfield","group":"Render","enabled":1,"color":"#ffffff","blendMode":"REPLACE","WarpSpeed":6,"MaxStars_set":350,"onbeat":0,"spdBeat":4,"durFrames":15}]} -------------------------------------------------------------------------------- /test/expected/Render/Dot Fountain.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dot Fountain","clearFrame":true,"components":[{"type":"DotFountain","group":"Render","rotationSpeed":16,"colorTop":"#1c6b18","colorHigh":"#ff0a23","colorMid":"#2a1d74","colorLow":"#9036d9","colorBottom":"#6b88ff","angle":-20}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture (no image, disabled).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture (no image, disabled)","clearFrame":true,"components":[{"type":"Picture","group":"Render","enabled":false,"blendMode":"FIFTY_FIFTY","adapt":0,"onBeatPersist":6,"file":"","ratio":0,"aspectRatioAxis":"X"}]} -------------------------------------------------------------------------------- /test/expected/Render/Simple - Oscilloscope (Lines).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Simple - Oscilloscope (Lines)","clearFrame":true,"components":[{"type":"Simple","group":"Render","audioSource":"Waveform","renderType":"Lines","audioChannel":"CENTER","positionY":"CENTER","colors":["#ffffff"]}]} -------------------------------------------------------------------------------- /test/expected/Render/Simple - Oscilloscope (Solid).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Simple - Oscilloscope (Solid)","clearFrame":true,"components":[{"type":"Simple","group":"Render","audioSource":"Waveform","renderType":"Solid","audioChannel":"CENTER","positionY":"CENTER","colors":["#ffffff"]}]} -------------------------------------------------------------------------------- /test/expected/Render/Starfield - Blend 50-50.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Starfield - Blend 50-50","clearFrame":true,"components":[{"type":"Starfield","group":"Render","enabled":1,"color":"#ffffff","blendMode":"FIFTY_FIFTY","WarpSpeed":6,"MaxStars_set":350,"onbeat":0,"spdBeat":4,"durFrames":15}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - slight fuzzify.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - slight fuzzify","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Slight Fuzzify","output":"Replace","sourceMapped":false,"coordinates":"POLAR","bilinear":true,"wrap":false}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture - Replace.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture - Replace","clearFrame":true,"components":[{"type":"Picture","group":"Render","enabled":true,"blendMode":"REPLACE","adapt":0,"onBeatPersist":6,"file":"avsres_texer_circle_edgeonly_15x15.bmp","ratio":0,"aspectRatioAxis":"X"}]} -------------------------------------------------------------------------------- /test/expected/Render/Starfield - Additive blend.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Starfield - Additive blend","clearFrame":true,"components":[{"type":"Starfield","group":"Render","enabled":1,"color":"#ffffff","blendMode":"ADDITIVE","WarpSpeed":6,"MaxStars_set":350,"onbeat":0,"spdBeat":4,"durFrames":15}]} -------------------------------------------------------------------------------- /test/expected/Trans/Brightness - Replace.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Brightness - Replace","clearFrame":true,"components":[{"type":"Brightness","group":"Trans","enabled":true,"blendMode":"REPLACE","red":0,"green":0,"blue":0,"separate":false,"excludeColor":"#000000","exclude":false,"distance":16}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - blocky partial out.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - blocky partial out","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Blocky Partial Out","output":"Replace","sourceMapped":false,"coordinates":"POLAR","bilinear":true,"wrap":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Water Bump - Random drop position.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Water Bump - Random drop position","clearFrame":true,"components":[{"type":"WaterBump","group":"Trans","enabled":true,"density":6,"depth":600,"random":true,"dropPositionX":1,"dropPositionY":1,"dropRadius":40,"method":0}]} -------------------------------------------------------------------------------- /test/expected/Render/Moving Particle - 50-50.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Moving Particle - 50-50","clearFrame":true,"components":[{"type":"MovingParticle","group":"Render","enabled":true,"onBeatSizeChange":false,"color":"#ffffff","distance":16,"particleSize":8,"onBeatParticleSize":8,"blendMode":"FIFTY_FIFTY"}]} -------------------------------------------------------------------------------- /test/expected/Render/Moving Particle - Replace.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Moving Particle - Replace","clearFrame":true,"components":[{"type":"MovingParticle","group":"Render","enabled":true,"onBeatSizeChange":false,"color":"#ffffff","distance":16,"particleSize":8,"onBeatParticleSize":8,"blendMode":"REPLACE"}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture - Blend 50-50.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture - Blend 50-50","clearFrame":true,"components":[{"type":"Picture","group":"Render","enabled":true,"blendMode":"FIFTY_FIFTY","adapt":0,"onBeatPersist":6,"file":"avsres_texer_circle_edgeonly_15x15.bmp","ratio":0,"aspectRatioAxis":"X"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Brightness - Blend 50-50.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Brightness - Blend 50-50","clearFrame":true,"components":[{"type":"Brightness","group":"Trans","enabled":true,"blendMode":"FIFTY_FIFTY","red":0,"green":0,"blue":0,"separate":false,"excludeColor":"#000000","exclude":false,"distance":16}]} -------------------------------------------------------------------------------- /test/expected/Trans/Mirror - Static.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Mirror - Static","clearFrame":true,"components":[{"type":"Mirror","group":"Trans","enabled":true,"topToBottom":true,"bottomToTop":false,"leftToRight":false,"rightToLeft":false,"onBeatRandom":false,"smoothTransition":false,"transitionDuration":4}]} -------------------------------------------------------------------------------- /test/expected/Render/Moving Particle - Additive.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Moving Particle - Additive","clearFrame":true,"components":[{"type":"MovingParticle","group":"Render","enabled":true,"onBeatSizeChange":false,"color":"#ffffff","distance":16,"particleSize":8,"onBeatParticleSize":8,"blendMode":"Additive"}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture - Additive blend.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture - Additive blend","clearFrame":true,"components":[{"type":"Picture","group":"Render","enabled":true,"blendMode":"ADDITIVE","adapt":0,"onBeatPersist":6,"file":"avsres_texer_circle_edgeonly_15x15.bmp","ratio":0,"aspectRatioAxis":"X"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Brightness - Additive blend.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Brightness - Additive blend","clearFrame":true,"components":[{"type":"Brightness","group":"Trans","enabled":true,"blendMode":"ADDITIVE","red":0,"green":0,"blue":0,"separate":false,"excludeColor":"#000000","exclude":false,"distance":16}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Modifier - Solarization.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Modifier - Solarization","clearFrame":true,"components":[{"type":"ColorModifier","group":"Trans","code":{"init":"","perFrame":"","onBeat":"","perPoint":"red=(min(1,red*2)-red)*2;\r\ngreen=red; blue=red;"},"recomputeEveryFrame":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Mirror - OnBeat Random.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Mirror - OnBeat Random","clearFrame":true,"components":[{"type":"Mirror","group":"Trans","enabled":true,"topToBottom":true,"bottomToTop":true,"leftToRight":true,"rightToLeft":true,"onBeatRandom":true,"smoothTransition":false,"transitionDuration":4}]} -------------------------------------------------------------------------------- /test/expected/Trans/Scatter.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Scatter","clearFrame":true,"components":[{"type":"Scatter","group":"Trans","enabled":true},{"type":"RotoBlitter","group":"Trans","zoom":31,"rotate":31,"blendMode":"REPLACE","onBeatReverse":false,"reversalSpeed":0,"onBeatZoom":31,"onBeat":false,"bilinear":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - cosine radial 3-way.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - cosine radial 3-way","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Cosine Radial 3-way","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"r = cos(r * 3)"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Dynamic Movement.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dynamic Movement","clearFrame":true,"components":[{"type":"DynamicMovement","group":"Trans","code":{"init":"","perFrame":"","onBeat":"","perPoint":""},"bFilter":true,"coord":"POLAR","gridW":16,"gridH":16,"blend":false,"wrap":false,"buffer":43,"alphaOnly":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - 6-way kaleida.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - 6-way kaleida","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"6-way Kaleida (use Wrap!)","output":"Replace","sourceMapped":false,"coordinates":1,"bilinear":true,"wrap":true,"code":"y = (r*6)/($PI), x = d,"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - gridley.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - gridley","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Gridley","output":"Replace","sourceMapped":false,"coordinates":1,"bilinear":true,"wrap":false,"code":"x = x + (cos(y * 18) * .02),\r\ny = y + (sin(x * 14) * .03),"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - spinny tube.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - spinny tube","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Spinny Tube","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"d = d * (1 - ((d - .35) * .5)),\r\nr = r + .1,"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - sunburster.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - sunburster","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Sunburster","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"d = d * (0.94 + (cos((r-$PI*0.5) * 32.0) * 0.06)),"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - tunneling.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - tunneling","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Tunneling","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"r = r + 0.04,\r\nd = d * (0.96 + cos(d * $PI) * 0.05),"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - big swirl out.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - big swirl out","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Big Swirl Out","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"r = r + (0.1 - (0.2 * d)),\r\nd = d * 0.96,"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - psychotic beaming outward.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - psychotic beaming outward","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Psychotic Beaming Outward","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"d = 0.15"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - shift rotate left.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - shift rotate left","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Shift Rotate Left","output":"Replace","sourceMapped":false,"coordinates":1,"bilinear":true,"wrap":false,"code":"x=x+1/32, // use wrap for this one"}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture (no image, enabled, keep aspect ratio on X-axis).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture (no image, enabled, keep aspect ratio on X-axis)","clearFrame":true,"components":[{"type":"Picture","group":"Render","enabled":false,"blendMode":"FIFTY_FIFTY","adapt":0,"onBeatPersist":6,"file":"","ratio":1,"aspectRatioAxis":"X"}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture (no image, enabled, keep aspect ratio on Y-axis).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture (no image, enabled, keep aspect ratio on Y-axis)","clearFrame":true,"components":[{"type":"Picture","group":"Render","enabled":false,"blendMode":"FIFTY_FIFTY","adapt":0,"onBeatPersist":6,"file":"","ratio":1,"aspectRatioAxis":"Y"}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture - Blend 50-50 + onBeat Additive.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture - Blend 50-50 + onBeat Additive","clearFrame":true,"components":[{"type":"Picture","group":"Render","enabled":true,"blendMode":"REPLACE","adapt":1,"onBeatPersist":6,"file":"avsres_texer_circle_edgeonly_15x15.bmp","ratio":0,"aspectRatioAxis":"X"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Modifier - 4x Red Brightness, 2x Green, 1x Blue.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Modifier - 4x Red Brightness, 2x Green, 1x Blue","clearFrame":true,"components":[{"type":"ColorModifier","group":"Trans","code":{"init":"","perFrame":"","onBeat":"","perPoint":"red=4*red; green=2*green;"},"recomputeEveryFrame":false}]} -------------------------------------------------------------------------------- /test/expected/Render/Moving Particle - Default render blend mode.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Moving Particle - Default render blend mode","clearFrame":true,"components":[{"type":"MovingParticle","group":"Render","enabled":true,"onBeatSizeChange":false,"color":"#ffffff","distance":16,"particleSize":8,"onBeatParticleSize":8,"blendMode":"DEFAULT"}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture II - XOR, onBeat XOR.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture II - XOR, onBeat XOR","clearFrame":true,"components":[{"type":"PictureII","group":"Misc","image":"avsres_texer_circle_edgeonly_15x15.bmp","blendMode":"REPLACE","onBeatOutput":"REPLACE","bilinear":false,"onBeatBilinear":false,"adjustBlend":0,"onBeatAdjustBlend":0}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Modifier - Inverse Solarization (Soft).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Modifier - Inverse Solarization (Soft)","clearFrame":true,"components":[{"type":"ColorModifier","group":"Trans","code":{"init":"","perFrame":"","onBeat":"","perPoint":"red=abs(red - .5) * 1.5;\r\ngreen=red; blue=red;"},"recomputeEveryFrame":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - bleedin'.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - bleedin'","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Bleedin'","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"t = cos(d * $PI),\r\nr = r + (0.07 * t),\r\nd = d * (0.98 + t * 0.10),"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Multi Filter - Infinite Root Multiplier + Small Border Convolution.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Multi Filter - Infinite Root Multiplier + Small Border Convolution","clearFrame":true,"components":[{"type":"MultiFilter","group":"Misc","enabled":true,"effect":"INFINITE_ROOT_MULTIPLIER_AND_SMALL_BORDER_CONVOLUTION","onBeat":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Multi Delay.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Multi Delay","clearFrame":true,"components":[{"type":"MultiDelay","group":"Trans","mode":"DISABLED","activeBuffer":0,"useBeats0":false,"delay0":0,"useBeats1":false,"delay1":0,"useBeats2":false,"delay2":0,"useBeats3":false,"delay3":0,"useBeats4":false,"delay4":0,"useBeats5":false,"delay5":0}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture II - 50-50, onBeat 50-50.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture II - 50-50, onBeat 50-50","clearFrame":true,"components":[{"type":"PictureII","group":"Misc","image":"avsres_texer_circle_edgeonly_15x15.bmp","blendMode":"REPLACE","onBeatOutput":"REPLACE","bilinear":false,"onBeatBilinear":false,"adjustBlend":0,"onBeatAdjustBlend":0}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture II - Ignore, onBeat Ignore.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture II - Ignore, onBeat Ignore","clearFrame":true,"components":[{"type":"PictureII","group":"Misc","image":"avsres_texer_circle_edgeonly_15x15.bmp","blendMode":"REPLACE","onBeatOutput":"REPLACE","bilinear":false,"onBeatBilinear":false,"adjustBlend":0,"onBeatAdjustBlend":0}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture II - Maximum, onBeat Maximum.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture II - Maximum, onBeat Maximum","clearFrame":true,"components":[{"type":"PictureII","group":"Misc","image":"avsres_texer_circle_edgeonly_15x15.bmp","blendMode":"REPLACE","onBeatOutput":"REPLACE","bilinear":false,"onBeatBilinear":false,"adjustBlend":0,"onBeatAdjustBlend":0}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture II - Minimum, onBeat Minimum.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture II - Minimum, onBeat Minimum","clearFrame":true,"components":[{"type":"PictureII","group":"Misc","image":"avsres_texer_circle_edgeonly_15x15.bmp","blendMode":"REPLACE","onBeatOutput":"REPLACE","bilinear":false,"onBeatBilinear":false,"adjustBlend":0,"onBeatAdjustBlend":0}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture II - Replace, onBeat Replace.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture II - Replace, onBeat Replace","clearFrame":true,"components":[{"type":"PictureII","group":"Misc","image":"avsres_texer_circle_edgeonly_15x15.bmp","blendMode":"REPLACE","onBeatOutput":"REPLACE","bilinear":false,"onBeatBilinear":false,"adjustBlend":0,"onBeatAdjustBlend":0}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Modifier - Double Solarization.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Modifier - Double Solarization","clearFrame":true,"components":[{"type":"ColorModifier","group":"Trans","code":{"init":"","perFrame":"","onBeat":"","perPoint":"red=(min(1,red*2)-red)*2;\r\nred=(min(1,red*2)-red)*2;\r\ngreen=red; blue=red;"},"recomputeEveryFrame":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Interference.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Interference","clearFrame":true,"components":[{"type":"Interferences","group":"Trans","enabled":true,"numberOfLayers":2,"distance":10,"alpha":128,"rotation":0,"blendMode":"REPLACE","onBeatDistance":32,"onBeatAlpha":192,"onBeatRotation":25,"separateRGB":true,"onBeat":true,"speed":0.19999998807907104}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture II - Additive, onBeat Additive.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture II - Additive, onBeat Additive","clearFrame":true,"components":[{"type":"PictureII","group":"Misc","image":"avsres_texer_circle_edgeonly_15x15.bmp","blendMode":"REPLACE","onBeatOutput":"REPLACE","bilinear":false,"onBeatBilinear":false,"adjustBlend":0,"onBeatAdjustBlend":0}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture II - Multiply, onBeat Multiply.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture II - Multiply, onBeat Multiply","clearFrame":true,"components":[{"type":"PictureII","group":"Misc","image":"avsres_texer_circle_edgeonly_15x15.bmp","blendMode":"REPLACE","onBeatOutput":"REPLACE","bilinear":false,"onBeatBilinear":false,"adjustBlend":0,"onBeatAdjustBlend":0}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Spiral.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - Spiral","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n=800","perFrame":"t=t-0.05","onBeat":"","perPoint":"d=i+v*0.2; r=t+i*$PI*4; x=cos(r)*d; y=sin(r)*d"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Bump.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Bump","clearFrame":true,"components":[{"type":"Bump","group":"Trans","enabled":true,"onBeat":false,"duration":15,"depth":30,"onBeatDepth":100,"blendMode":"REPLACE","code":{"init":"t=0;","perFrame":"","onBeat":"x=0.5+cos(t)*0.3;\r\ny=0.5+sin(t)*0.3;\r\nt=t+0.1;"},"showDot":false,"invertDepth":false,"depthBuffer":29}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Modifier - Big Brightness on Beat.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Modifier - Big Brightness on Beat","clearFrame":true,"components":[{"type":"ColorModifier","group":"Trans","code":{"init":"scale=1.0","perFrame":"scale=0.07 + (scale*0.93)","onBeat":"scale=16","perPoint":"red=red*scale;\r\ngreen=red; blue=red;"},"recomputeEveryFrame":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - 5 pointed distro.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - 5 pointed distro","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"5 Pointed Distro","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"d = d * (0.95 + (cos(((r-$PI*0.5) * 5.0) - ($PI / 2.50)) * 0.03)),"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - bubbling outward.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - bubbling outward","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Bubbling Outward","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"t = sin(d * $PI),\r\nd = d - (8*t*t*t*t*t)/sqrt((sw*sw+sh*sh)/4),"}]} -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | module.exports = { 3 | root: true, 4 | parser: '@typescript-eslint/parser', 5 | plugins: [ 6 | '@typescript-eslint', 7 | ], 8 | extends: [ 9 | 'eslint:recommended', 10 | 'plugin:@typescript-eslint/recommended', 11 | ], 12 | rules: { 13 | curly: ["error", "all"] 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /test/expected/Trans/Movement - medium swirl.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - medium swirl","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Medium Swirl","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"d = d * (0.99 * (1.0 - sin(r-$PI*0.5) / 32.0)),\r\nr = r + (0.03 * sin(d * $PI * 4)),"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - radial swirlies.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - radial swirlies","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Radial Swirlies","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"d = d * (1 - (sin((r-$PI*0.5) * 7) * .03)),\r\nr = r + (cos(d * 12) * .03),"}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture II - Adjustable, onBeat Adjustable.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture II - Adjustable, onBeat Adjustable","clearFrame":true,"components":[{"type":"PictureII","group":"Misc","image":"avsres_texer_circle_edgeonly_15x15.bmp","blendMode":"REPLACE","onBeatOutput":"REPLACE","bilinear":false,"onBeatBilinear":false,"adjustBlend":0,"onBeatAdjustBlend":0}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - swirl around both ways at once.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - swirl around both ways at once","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Swirling Around Both Ways At Once","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"r = r + (0.1 * sin(d * $PI * 5)),"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - swirl to center.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - swirl to center","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Swirl To Center","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"d = d * (1.01 + (cos((r-$PI*0.5) * 4) * 0.04)),\r\nr = r + (0.03 * sin(d * $PI * 4)),"}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture II - Subtractive 1, onBeat Subtractive 1.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture II - Subtractive 1, onBeat Subtractive 1","clearFrame":true,"components":[{"type":"PictureII","group":"Misc","image":"avsres_texer_circle_edgeonly_15x15.bmp","blendMode":"REPLACE","onBeatOutput":"REPLACE","bilinear":false,"onBeatBilinear":false,"adjustBlend":0,"onBeatAdjustBlend":0}]} -------------------------------------------------------------------------------- /test/expected/Render/Picture II - Subtractive 2, onBeat Subtractive 2.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Picture II - Subtractive 2, onBeat Subtractive 2","clearFrame":true,"components":[{"type":"PictureII","group":"Misc","image":"avsres_texer_circle_edgeonly_15x15.bmp","blendMode":"REPLACE","onBeatOutput":"REPLACE","bilinear":false,"onBeatBilinear":false,"adjustBlend":0,"onBeatAdjustBlend":0}]} -------------------------------------------------------------------------------- /test/expected/Trans/Convolution Filter.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Convolution Filter","clearFrame":true,"components":[{"type":"ConvolutionFilter","group":"Trans","enabled":true,"edgeMode":"EXTEND","absolute":false,"twoPass":false,"kernel":{"width":7,"height":7,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"bias":0,"scale":1}]} -------------------------------------------------------------------------------- /test/expected/Trans/Dynamic Distance Modifier.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dynamic Distance Modifier","clearFrame":true,"components":[{"type":"DynamicDistanceModifier","group":"Trans","code":{"init":"u=1;t=0","perFrame":"t=t+u;t=min(100,t);t=max(0,t);u=if(equal(t,100),-1,u);u=if(equal(t,0),1,u)","onBeat":"","perPoint":"d=d-sigmoid((t-50)/100,2)"},"blendMode":"REPLACE","bilinear":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - grapevine.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - grapevine","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Grapevine","output":"Replace","sourceMapped":false,"coordinates":1,"bilinear":true,"wrap":false,"code":"x = x + (cos(abs(y-.5) * 8) * .02),\r\ny = y + (sin(abs(x-.5) * 8) * .05),\r\nx = x * .95,\r\ny = y * .95,"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Map.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Map","clearFrame":true,"components":[{"type":"ColorMap","group":"Trans","key":"RED","blendMode":"REPLACE","mapCycleMode":"SINGLE","adjustBlend":0,"dontSkipFastBeats":false,"cycleSpeed":8,"maps":[{"index":0,"enabled":true,"colors":[{"color":"#000000","position":0},{"color":"#ffffff","position":255}],"id":94483456,"fileName":""}]}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - quadrant.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - quadrant","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Quadrant","output":"Replace","sourceMapped":false,"coordinates":1,"bilinear":true,"wrap":false,"code":"y = y * ( 1 + (sin(r + $PI/2) * .3) ),\r\nx = x * ( 1 + (cos(r + $PI/2) * .3) ),\r\nx = x * .995,\r\ny = y * .995,"}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Rotating Bow Thing.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - Rotating Bow Thing","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n=80;t=0.0;","perFrame":"t=t+0.01","onBeat":"","perPoint":"r=i*$PI*2; d=sin(r*3)+v*0.5; x=cos(t+r)*d; y=sin(t-r)*d"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - shifted big swirl out.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - shifted big swirl out","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Shifted Big Swirl Out","output":"Replace","sourceMapped":false,"coordinates":1,"bilinear":true,"wrap":false,"code":"d=sqrt(x*x+y*y), r=atan2(y,x),\r\nr=r+0.1-0.2*d, d=d*0.96,\r\nx=cos(r)*d + 8/128, y=sin(r)*d,"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - swill.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - swill","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Swill","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"d = d * (1 - (sin((r - $PI*0.5) * 12) * .05)),\r\nr = r + (cos(d * 18) * .05),\r\nd = d * (1-((d - .4) * .03)),\r\nr = r + ((d - .4) * .13)"}]} -------------------------------------------------------------------------------- /test/expected/Effect List.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Effect List","clearFrame":true,"components":[{"type":"EffectList","enabled":true,"clearFrame":false,"input":"IGNORE","output":"REPLACE","inAdjustBlend":128,"outAdjustBlend":128,"inBuffer":0,"outBuffer":0,"inBufferInvert":false,"outBufferInvert":false,"enableOnBeat":false,"enableOnBeatFor":1,"code":{"enabled":false,"init":"","perFrame":""},"components":[]}]} -------------------------------------------------------------------------------- /test/expected/Trans/Dynamic Movement - Random Rotate.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dynamic Movement - Random Rotate","clearFrame":true,"components":[{"type":"DynamicMovement","group":"Trans","code":{"init":"","perFrame":"","onBeat":"dr = (rand(100) / 100) * $PI;\r\nd = d * .95;","perPoint":"r = r + dr;"},"bFilter":true,"coord":"POLAR","gridW":2,"gridH":2,"blend":false,"wrap":true,"buffer":43,"alphaOnly":false}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Alternating Diagonal Scope.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - Alternating Diagonal Scope","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n=64; t=1;","perFrame":"","onBeat":"t=-t;","perPoint":"sc=0.4*sin(i*$PI); x=2*(i-0.5-v*sc)*t; y=2*(i-0.5+v*sc);"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /test/expected/Render/Texer II - Colored Oscilloscope.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Texer II - Colored Oscilloscope","clearFrame":true,"components":[{"type":"TexerII","group":"Render","imageSrc":"","resizing":false,"wrapAround":false,"colorFiltering":true,"code":{"init":"// This example needs Maximum render mode\r\nn=300;","perFrame":"","onBeat":"","perPoint":"x=(i*2-1)*2;y=v;\r\nred=1-y*2;green=abs(y)*2;blue=y*2-1;"}}]} -------------------------------------------------------------------------------- /test/expected/Trans/Dynamic Movement - In and Out.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dynamic Movement - In and Out","clearFrame":true,"components":[{"type":"DynamicMovement","group":"Trans","code":{"init":"speed=.2;c=0;","perFrame":"","onBeat":"c = c + ($PI/2);\r\ndd = 1 - (sin(c) * speed);","perPoint":"d = d * dd;"},"bFilter":true,"coord":"POLAR","gridW":2,"gridH":2,"blend":false,"wrap":true,"buffer":43,"alphaOnly":false}]} -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_size = 4 8 | indent_style = space 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | 15 | [*.webvs] 16 | insert_final_newline = false 17 | trim_trailing_whitespace = false 18 | -------------------------------------------------------------------------------- /test/expected/Trans/Color Modifier - Big Brightness on Beat (Interpolative).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Modifier - Big Brightness on Beat (Interpolative)","clearFrame":true,"components":[{"type":"ColorModifier","group":"Trans","code":{"init":"c = 200; f = 0;","perFrame":"f = f + 1;\r\nt = (1.025 - (f / c)) * 5;","onBeat":"c = f;f = 0;","perPoint":"red = red * t;\r\ngreen=red;blue=red;"},"recomputeEveryFrame":true}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - 3D Scope Dish.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - 3D Scope Dish","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n=200","perFrame":"","onBeat":"","perPoint":"iz=1.3+sin(r+i*$PI*2)*(v+0.5)*0.88; ix=cos(r+i*$PI*2)*(v+0.5)*.88; iy=-0.3+abs(cos(v*$PI)); x=ix/iz;y=iy/iz;"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Modifier - Pulsing Brightness (Beat Interpolative).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Modifier - Pulsing Brightness (Beat Interpolative)","clearFrame":true,"components":[{"type":"ColorModifier","group":"Trans","code":{"init":"c = 200; f = 0;","perFrame":"f = f + 1;\r\nt = (f * 2 * $PI) / c;\r\nst = sin(t) + 1;","onBeat":"c = f;f = 0;","perPoint":"red = red * st;\r\ngreen=red;blue=red;"},"recomputeEveryFrame":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Movement - bubbling outward with swirl.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Movement - bubbling outward with swirl","clearFrame":true,"components":[{"type":"Movement","group":"Trans","builtinEffect":"Bubbling Outward With Swirl","output":"Replace","sourceMapped":false,"coordinates":0,"bilinear":true,"wrap":false,"code":"t = sin(d * $PI),\r\nd = d - (8*t*t*t*t*t)/sqrt((sw*sw+sh*sh)/4),\r\nt=cos(d*$PI/2.0),\r\nr= r + 0.1*t*t*t,"}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Vertical Bounding Scope.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - Vertical Bounding Scope","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n=100; t=0; tv=0.1;dt=1;","perFrame":"t=t*0.9+tv*0.1","onBeat":"tv=((rand(50.0)/50.0))*dt; dt=-dt;","perPoint":"x=t+v*pow(sin(i*$PI),2); y=i*2-1.0;"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Vibrating Worm.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - Vibrating Worm","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n=w; dt=0.01; t=0; sc=1;","perFrame":"t=t+dt;dt=0.9*dt+0.001; t=if(above(t,$PI*2),t-$PI*2,t);","onBeat":"dt=sc;sc=-sc;","perPoint":"x=cos(2*i+t)*0.9*(v*0.5+0.5); y=sin(i*2+t)*0.9*(v*0.5+0.5);"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Modifier - Rolling Solarization (Beat Interpolative).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Modifier - Rolling Solarization (Beat Interpolative)","clearFrame":true,"components":[{"type":"ColorModifier","group":"Trans","code":{"init":"c = 200; f = 0;","perFrame":"f = f + 1;\r\nt = (f * 2 * $PI) / c;\r\nst = ( sin(t) * .75 ) + 2;","onBeat":"c = f;f = 0;","perPoint":"red=(min(1,red*st)-red)*st;\r\nred=(min(1,red*2)-red)*2;\r\ngreen=red; blue=red;"},"recomputeEveryFrame":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Dynamic Movement - Unspun Kaleida.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dynamic Movement - Unspun Kaleida","clearFrame":true,"components":[{"type":"DynamicMovement","group":"Trans","code":{"init":"c=200;f=0;dt=0;dl=0;beatdiv=8","perFrame":"f = f + 1;\r\nt = ((f * $pi * 2)/c)/beatdiv;\r\ndt = dl + t;\r\ndr = 4+(cos(dt)*2);","onBeat":"c=f;f=0;dl=dt","perPoint":"r=cos(r*dr);"},"bFilter":true,"coord":"POLAR","gridW":33,"gridH":33,"blend":false,"wrap":true,"buffer":43,"alphaOnly":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Dynamic Movement - Random Direction.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dynamic Movement - Random Direction","clearFrame":true,"components":[{"type":"DynamicMovement","group":"Trans","code":{"init":"speed=.05;dr = (rand(200) / 100) * $PI;","perFrame":"dx = cos(dr) * speed;\r\ndy = sin(dr) * speed;","onBeat":"dr = (rand(200) / 100) * $PI;","perPoint":"x = x + dx;\r\ny = y + dy;"},"bFilter":true,"coord":"CARTESIAN","gridW":2,"gridH":2,"blend":false,"wrap":true,"buffer":43,"alphaOnly":false}]} -------------------------------------------------------------------------------- /test/expected/Render/Texer II - Flummy Spectrum.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Texer II - Flummy Spectrum","clearFrame":true,"components":[{"type":"TexerII","group":"Render","imageSrc":"","resizing":true,"wrapAround":false,"colorFiltering":true,"code":{"init":"// This example needs Maximum render mode\r\n","perFrame":"n=w/20+1;","onBeat":"","perPoint":"x=i*1.8-.9;\r\ny=0;\r\nvol=1.001-getspec(abs(x)*.5,.05,0)*min(1,abs(x)+.5)*2;\r\nsizex=vol;sizey=(1/vol)*2;\r\nj=abs(x);red=1-j;green=1-abs(.5-j);blue=j"}}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Modifier - Rolling Tone (Beat Interpolative).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Modifier - Rolling Tone (Beat Interpolative)","clearFrame":true,"components":[{"type":"ColorModifier","group":"Trans","code":{"init":"c = 200; f = 0;","perFrame":"f = f + 1;\r\nt = (f * 2 * $PI) / c;\r\nti = (f / c);\r\nst = sin(t) + 1.5;\r\nct = cos(t) + 1.5;","onBeat":"c = f;f = 0;","perPoint":"red = red * st;\r\ngreen = green * ct;\r\nblue = (blue * 4 * ti) - red - green;"},"recomputeEveryFrame":true}]} -------------------------------------------------------------------------------- /test/expected/Trans/Dynamic Movement - Wavy.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dynamic Movement - Wavy","clearFrame":true,"components":[{"type":"DynamicMovement","group":"Trans","code":{"init":"c=200;f=0;dx=0;dl=0;beatdiv=16;speed=.05","perFrame":"f = f + 1;\r\nt = ( (f * 2 * 3.1415) / c ) / beatdiv;\r\ndx = dl + t;","onBeat":"c = f;\r\nf = 0;\r\ndl = dx;","perPoint":"y = y + ((sin((x+dx) * $PI))*speed);\r\nx = x + .025"},"bFilter":true,"coord":"CARTESIAN","gridW":6,"gridH":6,"blend":false,"wrap":true,"buffer":43,"alphaOnly":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Color Modifier - Random Inverse Tone (Switch on Beat).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Color Modifier - Random Inverse Tone (Switch on Beat)","clearFrame":true,"components":[{"type":"ColorModifier","group":"Trans","code":{"init":"","perFrame":"","onBeat":"token = rand(99) % 3;\r\ndr = if (equal(token, 0), -1, 1);\r\ndg = if (equal(token, 1), -1, 1);\r\ndb = if (equal(token, 2), -1, 1);","perPoint":"dd = red * 1.5;\r\nred = pow(dd, dr);\r\ngreen = pow(dd, dg);\r\nblue = pow(dd, db);"},"recomputeEveryFrame":true}]} -------------------------------------------------------------------------------- /test/expected/Render/Text.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Text","clearFrame":true,"components":[{"type":"Text","group":"Render","enabled":true,"color":"#ffffff","blendMode":"REPLACE","onBeat":false,"insertBlanks":false,"randomPosition":false,"verticalAlign":"CENTER","horizontalAlign":"CENTER","onBeatSpeed":15,"normSpeed":15,"weight":0,"italic":false,"underline":false,"strikeOut":false,"charSet":0,"fontName":"","text":"Demo","outline":false,"outlineColor":"#000000","shiftX":0,"shiftY":0,"outlineShadowSize":1,"randomWord":false,"shadow":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Dynamic Movement - 6-Way Outswirl.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dynamic Movement - 6-Way Outswirl","clearFrame":true,"components":[{"type":"DynamicMovement","group":"Trans","code":{"init":"c=200;f=0;dt=0;dl=0;beatdiv=8","perFrame":"f = f + 1;\r\nt = ((f * $pi * 2)/c)/beatdiv;\r\ndt = dl + t;\r\ndr = 18+(cos(dt)*12);","onBeat":"c=f;f=0;dl=dt","perPoint":"d=d*(1+(cos(r*6) * .05));\r\nr=r-(sin(d*dr) * .05);\r\nd = d * .98;"},"bFilter":true,"coord":"POLAR","gridW":32,"gridH":32,"blend":false,"wrap":false,"buffer":43,"alphaOnly":false}]} -------------------------------------------------------------------------------- /test/expected/Trans/Dynamic Movement - Smooth Rotoblitter.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dynamic Movement - Smooth Rotoblitter","clearFrame":true,"components":[{"type":"DynamicMovement","group":"Trans","code":{"init":"c=200;f=0;dt=0;dl=0;beatdiv=4;speed=.15","perFrame":"f = f + 1;\r\nt = ((f * $pi * 2)/c)/beatdiv;\r\ndt = dl + t;\r\ndr = cos(dt)*speed*2;\r\ndd = 1 - (sin(dt)*speed);","onBeat":"c=f;f=0;dl=dt","perPoint":"r = r + dr;\r\nd = d * dd;"},"bFilter":true,"coord":"POLAR","gridW":2,"gridH":2,"blend":false,"wrap":true,"buffer":43,"alphaOnly":false}]} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Project 2 | **/_*.* 3 | **/*.map 4 | assets/ 5 | 6 | # Global 7 | .Sync* 8 | error.log 9 | node_modules/ 10 | npm-debug.log 11 | package-lock.json 12 | yarn.lock 13 | yarn-error.log 14 | 15 | # AVS specific 16 | *.ape 17 | *.avs 18 | *.bmp 19 | *.cff 20 | *.clm 21 | *.exe 22 | *.pimp 23 | *.wav 24 | *.webvs 25 | *.zip 26 | avs/ 27 | etc/ 28 | ui/ 29 | 30 | # Development 31 | .eslintcache 32 | 33 | # Build 34 | dist/ 35 | 36 | # Test 37 | !test/**/*avs 38 | !test/**/*webvs 39 | 40 | # Temporary 41 | presets.d.ts 42 | -------------------------------------------------------------------------------- /test/expected/Trans/Dynamic Movement - Roiling Gridley.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Dynamic Movement - Roiling Gridley","clearFrame":true,"components":[{"type":"DynamicMovement","group":"Trans","code":{"init":"c=200;f=0;dt=0;dl=0;beatdiv=8","perFrame":"f = f + 1;\r\nt = ((f * $pi * 2)/c)/beatdiv;\r\ndt = dl + t;\r\ndx = 14+(cos(dt)*8);\r\ndy = 10+(sin(dt*2)*4);","onBeat":"c=f;f=0;dl=dt","perPoint":"x=x+(sin(y*dx) * .03);\r\ny=y-(cos(x*dy) * .03);"},"bFilter":true,"coord":"CARTESIAN","gridW":32,"gridH":32,"blend":false,"wrap":true,"buffer":43,"alphaOnly":false}]} -------------------------------------------------------------------------------- /test/expected/Render/Text (Arial).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Text (Arial)","clearFrame":true,"components":[{"type":"Text","group":"Render","enabled":true,"color":"#ffffff","blendMode":"REPLACE","onBeat":false,"insertBlanks":false,"randomPosition":false,"verticalAlign":"CENTER","horizontalAlign":"CENTER","onBeatSpeed":15,"normSpeed":15,"weight":400,"italic":false,"underline":false,"strikeOut":false,"charSet":0,"fontName":"Arial","text":"Demo","outline":false,"outlineColor":"#000000","shiftX":0,"shiftY":0,"outlineShadowSize":1,"randomWord":false,"shadow":false}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Swirlie Dots.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - Swirlie Dots","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n=45;t=rand(100);u=rand(100)","perFrame":"t = t + .15; u = u + .05","onBeat":"bb = bb + 1;\r\nbeatdiv = 16;\r\nn = if(equal(bb%beatdiv,0),30 + rand( 30 ),n);","perPoint":"di = ( i - .5) * 2;\r\nx = di;sin(u*di) * .4;\r\ny = cos(u*di) * .6;\r\nx = x + ( cos(t) * .05 );\r\ny = y + ( sin(t) * .05 );"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /test/expected/Render/Text (@MS Yahei).webvs: -------------------------------------------------------------------------------- 1 | {"name":"Text (@MS Yahei)","clearFrame":true,"components":[{"type":"Text","group":"Render","enabled":true,"color":"#ffffff","blendMode":"REPLACE","onBeat":false,"insertBlanks":false,"randomPosition":false,"verticalAlign":"CENTER","horizontalAlign":"CENTER","onBeatSpeed":15,"normSpeed":15,"weight":290,"italic":false,"underline":false,"strikeOut":false,"charSet":0,"fontName":"@Microsoft YaHei Light","text":"Demo","outline":false,"outlineColor":"#000000","shiftX":0,"shiftY":0,"outlineShadowSize":1,"randomWord":false,"shadow":false}]} -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": true, 3 | "compilerOptions": { 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "target": "es6", 7 | "lib": [ 8 | "es2020", 9 | "dom" 10 | ], 11 | "outDir": "./", 12 | "noImplicitAny": false, 13 | "removeComments": false, 14 | "rootDir": "src", 15 | "esModuleInterop": true, 16 | "sourceMap": true 17 | }, 18 | "exclude": [ 19 | ".vscode-test", 20 | "node_modules" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /src/lib/log.ts: -------------------------------------------------------------------------------- 1 | import logSymbols from 'log-symbols'; 2 | 3 | export default { 4 | log(message: string): void { 5 | console.log(message); 6 | }, 7 | 8 | info(message: string): void { 9 | console.info(logSymbols.info, message); 10 | }, 11 | 12 | error(message: string): void { 13 | console.error(logSymbols.error, message); 14 | }, 15 | 16 | success(message: string): void { 17 | console.log(logSymbols.success, message); 18 | }, 19 | 20 | warn(message: string): void { 21 | console.warn(logSymbols.warning, message); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /test/expected/Render/Texer II - Beat-responsive Circle.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Texer II - Beat-responsive Circle","clearFrame":true,"components":[{"type":"TexerII","group":"Render","imageSrc":"","resizing":false,"wrapAround":false,"colorFiltering":true,"code":{"init":"// This example needs Maximum render mode\r\nn=30;newradius=.5;","perFrame":"rotation=rotation+step;step=step*.9;\r\nradius=radius*.9+newradius*.1;\r\npoint=0;\r\naspect=h/w;","onBeat":"step=.05;\r\nnewradius=rand(100)*.005+.5;","perPoint":"angle=rotation+point/n*$pi*2;\r\nx=cos(angle)*radius*aspect;y=sin(angle)*radius;\r\nred=sin(i*$pi*2)*.5+.5;green=1-red;blue=.5;\r\npoint=point+1;"}}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Whiplash Spiral.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - Whiplash Spiral","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n=80;c=200;f=0","perFrame":"t=t-0.05;f=f+1;dt=(f*2*3.1415)/c","onBeat":"bb = bb + 1;\r\nbeatdiv = 8;\r\nc=if(equal(bb%beatdiv,0),f,c);\r\nf=if(equal(bb%beatdiv,0),0,f);","perPoint":"d=i;\r\nr=t+i*3.14159*4;\r\nsdt=sin(dt+(i*3.1415*2));\r\ncdt=cos(dt+(i*3.1415*2));\r\nx=(cos(r)*d) + (sdt * .6 * sin(t) );\r\ny=(sin(r)*d) + ( cdt *.6 * sin(t) );\r\nblue=abs(x);\r\ngreen=abs(y);\r\nred=cos(dt*4)"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Flitterbug.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - Flitterbug","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n=180;t=0.0;lx=0;ly=0;vx=rand(200)-100;vy=rand(200)-100;cf=.97;c=200;f=0","perFrame":"f=f+1;t=(f*2*3.1415)/c;\r\nvx=(vx-(lx*.1))*cf;\r\nvy=(vy-(ly*.1))*cf;\r\nlx=lx+vx;ly=ly+vy;\r\nnx=lx*.001;ny=ly*.001;\r\ns=abs(nx*ny)","onBeat":"c=f;f=0;\r\nvx=vx+rand(600)-300;vy=vy+rand(600)-300","perPoint":"x=nx;y=ny;\r\nr=i*3.14159*2; d=(sin(r*5*(1-s))+i*0.5)*(.3-s);\r\ntx=(t*(1-(s*(i-.5))));\r\nx=x+cos(tx+r)*d; y=y+sin(t-y)*d;\r\nred=abs(x-nx)*5;\r\ngreen=abs(y-ny)*5;\r\nblue=1-s-red-green;"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Spirostar.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - Spirostar","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n=20;t=0;f=0;c=200;mn=10;dv=2;dn=0","perFrame":"f=f+1;t=(f*3.1415*2)/c;\r\nsz=abs(sin(t-3.1415));\r\ndv=if(below(n,12),(n/2)-1,\r\n if(equal(12,n),3,\r\n if(equal(14,n),6,\r\n if(below(n,20),2,4))))","onBeat":"bb = bb + 1;\r\nbeatdiv = 8;\r\nc=if(equal(bb%beatdiv,0),f,c);\r\nf=if(equal(bb%beatdiv,0),0,f);\r\ng=if(equal(bb%beatdiv,0),g+1,g);\r\nn=if(equal(bb%beatdiv,0),(abs((g%17)-8) *2)+4,n);","perPoint":"r=if(b,0,((i*dv)*3.14159*128)+(t/2));\r\nx=cos(r)*sz;\r\ny=sin(r)*sz;"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Sweep.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - Sweep","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n=180;lsv=100;sv=200;ssv=200;c=200;f=0","perFrame":"f=f+1;t=(f*2*3.1415)/c;\r\nlsv=slsv;sv=ssv;fv=0","onBeat":"bb = bb + 1;\r\nbeatdiv = 8;\r\nc=if(equal(bb%beatdiv,0),f,c);\r\nf=if(equal(bb%beatdiv,0),0,f);\r\ndv=if(equal(bb%beatdiv,0),((rand(100)*.01) * .1) + .02,dv);\r\nn=if(equal(bb%beatdiv,0),80+rand(100),n);\r\nssv=if(equal(bb%beatdiv,0),rand(200)+100,ssv);\r\nslsv=if(equal(bb%beatdiv,0),rand(200)+100,slsv);","perPoint":"sv=(sv*abs(cos(lsv)))+(lsv*abs(cos(sv)));\r\nfv=fv+(sin(sv)*dv);\r\nd=i; r=t+(fv * sin(t) * .3)*3.14159*4;\r\nx=cos(r)*d;\r\ny=sin(r)*d;\r\nred=i;\r\ngreen=abs(sin(r))-(red*.15);\r\nblue=fv"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Exploding Daisy.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - Exploding Daisy","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n = 380 + rand(200) ; k = 0.0; l = 0.0; m = ( rand( 10 ) + 2 ) * .5; c = 0; f = 0","perFrame":"a = a + 0.002 ; k = k + 0.04 ; l = l + 0.03","onBeat":"bb = bb + 1;\r\nbeatdiv = 16;\r\nn=if(equal(bb%beatdiv,0),380 + rand(200),n);\r\nt=if(equal(bb%beatdiv,0),0.0,t);\r\na=if(equal(bb%beatdiv,0),0.0,a);\r\nk=if(equal(bb%beatdiv,0),0.0,k);\r\nl=if(equal(bb%beatdiv,0),0.0,l);\r\nm=if(equal(bb%beatdiv,0),(( rand( 100 ) + 2 ) * .1) + 2,m);","perPoint":"r=(i*3.14159*2)+(a * 3.1415);\r\nd=sin(r*m)*.3;\r\nx=cos(k+r)*d*2;y=( (sin(k-r)*d) + ( sin(l*(i-.5) ) ) ) * .7;\r\nred=abs(x);\r\ngreen=abs(y);\r\nblue=d"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /test/expected/Render/SuperScope - Wandering Simple.webvs: -------------------------------------------------------------------------------- 1 | {"name":"SuperScope - Wandering Simple","clearFrame":true,"components":[{"type":"SuperScope","group":"Render","code":{"init":"n=800;xa=-0.5;ya=0.0;xb=-0.0;yb=0.75;c=200;f=0;\r\nnxa=(rand(100)-50)*.02;nya=(rand(100)-50)*.02;\r\nnxb=(rand(100)-50)*.02;nyb=(rand(100)-50)*.02;","perFrame":"f=f+1;\r\nt=1-((cos((f*3.1415)/c)+1)*.5);\r\nxa=((nxa-lxa)*t)+lxa;\r\nya=((nya-lya)*t)+lya;\r\nxb=((nxb-lxb)*t)+lxb;\r\nyb=((nyb-lyb)*t)+lyb;\r\nex=(xb-xa);\r\ney=(yb-ya);\r\nd=sqrt(sqr(ex)+sqr(ey));\r\nr=atan(ey/ex)+(3.1415/2);\r\ndv=d*2","onBeat":"c=f;\r\nf=0;\r\nlxa=nxa;\r\nlya=nya;\r\nlxb=nxb;\r\nlyb=nyb;\r\nnxa=(rand(100)-50)*.02;\r\nnya=(rand(100)-50)*.02;\r\nnxb=(rand(100)-50)*.02;\r\nnyb=(rand(100)-50)*.02","perPoint":"//primary render\r\nx=(ex*i)+xa;\r\ny=(ey*i)+ya;\r\n\r\n//volume offset\r\nx=x+ ( cos(r) * v * dv);\r\ny=y+ ( sin(r) * v * dv);\r\n\r\n//color values\r\nred=i;\r\ngreen=(1-i);\r\nblue=abs(v*6);"},"audioChannel":"CENTER","audioSource":"WAVEFORM","colors":["#ffffff"],"drawMode":"DOTS"}]} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2023 grandchild, idleberg 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /test/expected/Render/Texer II - 3D Beat Rings.webvs: -------------------------------------------------------------------------------- 1 | {"name":"Texer II - 3D Beat Rings","clearFrame":true,"components":[{"type":"TexerII","group":"Render","imageSrc":"","resizing":true,"wrapAround":false,"colorFiltering":false,"code":{"init":"// This shows how to use texer for 3D particles\r\n// Additive or maximum blend mode should be used\r\nxr=(rand(50)/500)-0.05;\r\nyr=(rand(50)/500)-0.05;\r\nzr=(rand(50)/500)-0.05;","perFrame":"// Rotation along x/y/z axes\r\nxt=xt+xr;yt=yt+yr;zt=zt+zr;\r\n// Shrink rings\r\nbt=max(0,bt*.95+.01);\r\n// Aspect correction\r\nasp=w/h;\r\n// Dynamically adjust particle count based on ring size\r\nn=((bt*40)|0)*3;","onBeat":"// New rotation speeds\r\nxr=(rand(50)/500)-0.05;\r\nyr=(rand(50)/500)-0.05;\r\nzr=(rand(50)/500)-0.05;\r\n// Ring size\r\nbt=1.2;\r\nn=((bt*40)|0)*3;","perPoint":"// 3D object\r\nx1=sin(i*$pi*6)/2*bt;\r\ny1=above(i,.66)-below(i,.33);\r\nz1=cos(i*$pi*6)/2*bt;\r\n\r\n// 3D rotations\r\nx2=x1*sin(zt)-y1*cos(zt);y2=x1*cos(zt)+y1*sin(zt);\r\nz2=x2*cos(yt)+z1*sin(yt);x3=x2*sin(yt)-z1*cos(yt);\r\ny3=y2*sin(xt)-z2*cos(xt);z3=y2*cos(xt)+z2 *sin(xt);\r\n\r\n// 2D Projection\r\niz=1/(z3+2);\r\nx=x3*iz;y=y3*iz*asp;\r\nsizex=iz*2;sizey=iz*2;"}}]} -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | // Modules 2 | import * as Util from './lib/util'; 3 | import config from './config'; 4 | import decode from './lib/decode'; 5 | import Log from './lib/log'; 6 | 7 | // Constants 8 | let verbosity = 0; // log individual key:value fields 9 | 10 | const defaultArgs: Arguments = { 11 | hidden: true, 12 | quiet: false, 13 | verbose: 0 14 | }; 15 | 16 | export function convertPreset(data: Buffer | ArrayBuffer, presetName: string, presetDate: string = undefined, customArgs: Arguments = {}): unknown { 17 | const args = { 18 | ...defaultArgs, 19 | ...customArgs 20 | }; 21 | 22 | verbosity = args.quiet ? -1 : Number(args.verbose); 23 | 24 | Util.setVerbosity(verbosity); 25 | Util.setHiddenStrings(Boolean(args.hidden)); 26 | 27 | const preset = { 28 | name: presetName 29 | }; 30 | 31 | if (presetDate) { 32 | preset['date'] = presetDate; 33 | } 34 | 35 | const blob8 = new Uint8Array(data); 36 | const clearFrame = decode.presetHeader(blob8.subarray(0, config.presetHeaderLength)); 37 | preset['clearFrame'] = clearFrame; 38 | 39 | const components = Util.convertComponents(blob8.subarray(config.presetHeaderLength)); 40 | preset['components'] = components; 41 | 42 | return preset; 43 | } 44 | -------------------------------------------------------------------------------- /doc/components.md: -------------------------------------------------------------------------------- 1 | ## Component Checklist 2 | 3 | - `Effect List` 4 | 5 | ### Misc 6 | - `AVS Trans Automation` 7 | - `Buffer Blend` 8 | - `Buffer Save` 9 | - `Comment` 10 | - `Custom BPM` 11 | - `Framerate Limiter` 12 | - `Global Variables` 13 | - `MIDI Trace` 14 | - `Set Render Mode` 15 | 16 | ### Trans 17 | - `Blitter Feedback` 18 | - `Blur` 19 | - `Brightness` 20 | - `Bump` 21 | - `Channel Shift` 22 | - `Color Clip` 23 | - `Color Map` 24 | - `Color Modifier` 25 | - `Color Reduction` 26 | - `Colorfade` 27 | - `Convolution Filter` 28 | - `Dynamic Distance Modifier` 29 | - `Dynamic Movement` 30 | - `Dynamic Shift` 31 | - `FadeOut` 32 | - `Fast Brightness` 33 | - `Grain` 34 | - `Interferences` 35 | - `Interleave` 36 | - `Invert` 37 | - `Mirror` 38 | - `Mosaic` 39 | - `Movement` 40 | - `Multi Delay` 41 | - `Multi Filter` 42 | - `Multiplier` 43 | - `Normalize` 44 | - `Roto Blitter` 45 | - `Scatter` 46 | - `Unique Tone` 47 | - `Video Delay` 48 | - `Water Bump` 49 | - `Water` 50 | 51 | ### Render 52 | - `AVI` 53 | - `Bass Spin` 54 | - `Clear Screen` 55 | - `Dot Fountain` 56 | - `Dot Grid` 57 | - `Dot Plane` 58 | - `Fluid` 59 | - `FyrewurX` 60 | - `Moving Particle` 61 | - `OnBeat Clear` 62 | - `Oscilliscope Star` 63 | - `Particle System` 64 | - `Picture` 65 | - `Picture II` 66 | - `Ring` 67 | - `Rotating Stars` 68 | - `Simple` 69 | - `Starfield` 70 | - `Super Scope` 71 | - `SVP` 72 | - `Texer` 73 | - `Texer II` 74 | - `Text` 75 | - `Timescope` 76 | - `Triangle` 77 | -------------------------------------------------------------------------------- /test/sync.test.mjs: -------------------------------------------------------------------------------- 1 | // Modules 2 | import { convertFileSync } from './_helper.mjs'; 3 | 4 | // Dependencies 5 | import { globbySync } from 'globby'; 6 | import { test } from 'uvu'; 7 | import * as assert from 'uvu/assert'; 8 | import fs from 'node:fs'; 9 | import path from 'node:path'; 10 | 11 | // Variables 12 | const __dirname = path.resolve(path.dirname('')); 13 | const fixturesDir = path.join(__dirname, 'test/fixtures'); 14 | const expectedDir = path.join(__dirname, 'test/expected'); 15 | 16 | // Converter Settings 17 | const options = { 18 | minify: true, 19 | noDate: true 20 | }; 21 | 22 | const avsFiles = globbySync(['**/*.avs'], { cwd: fixturesDir }); 23 | const emptyFiles = [ 24 | '(empty - Clear every frame).avs', 25 | '(empty).avs' 26 | ]; 27 | 28 | avsFiles.map(avsFile => { 29 | const basename = path.basename(avsFile, '.avs'); 30 | const dirname = path.dirname(avsFile); 31 | 32 | const absolutePath = { 33 | expected: path.join(expectedDir, dirname, `${basename}.webvs`), 34 | fixture: path.join(fixturesDir, avsFile) 35 | }; 36 | 37 | test(`Converted: ${avsFile}`, () => { 38 | const actual = convertFileSync(absolutePath.fixture, options); 39 | const expected = fs.readFileSync(absolutePath.expected, 'utf-8').toString(); 40 | 41 | assert.is(actual, expected); 42 | }); 43 | 44 | if (!emptyFiles.includes(avsFile)) { 45 | test(`Not empty: ${avsFile}`, () => { 46 | const actual = JSON.parse(convertFileSync(absolutePath.fixture, options)); 47 | 48 | assert.is.not(actual.components.length, 0); 49 | }); 50 | } 51 | }); 52 | 53 | test.run(); 54 | -------------------------------------------------------------------------------- /test/async.test.mjs: -------------------------------------------------------------------------------- 1 | // Modules 2 | import { convertFile } from './_helper.mjs'; 3 | 4 | // Dependencies 5 | import { globby } from 'globby'; 6 | import { promises as fs } from 'node:fs'; 7 | import { test } from 'uvu'; 8 | import * as assert from 'uvu/assert'; 9 | import path from 'node:path'; 10 | 11 | // Variables 12 | const __dirname = path.resolve(path.dirname('')); 13 | const fixturesDir = path.join(__dirname, 'test/fixtures'); 14 | const expectedDir = path.join(__dirname, 'test/expected'); 15 | 16 | // Converter Settings 17 | const options = { 18 | minify: true, 19 | noDate: true 20 | }; 21 | 22 | 23 | const avsFiles = await globby(['**/*.avs'], { cwd: fixturesDir }); 24 | const emptyFiles = [ 25 | '(empty - Clear every frame).avs', 26 | '(empty).avs' 27 | ]; 28 | 29 | avsFiles.map(avsFile => { 30 | const basename = path.basename(avsFile, '.avs'); 31 | const dirname = path.dirname(avsFile); 32 | 33 | const absolutePath = { 34 | expected: path.join(expectedDir, dirname, `${basename}.webvs`), 35 | fixture: path.join(fixturesDir, avsFile) 36 | }; 37 | 38 | test(`Converted: ${avsFile}`, async () => { 39 | const actual = await convertFile(absolutePath.fixture, options); 40 | const expected = (await fs.readFile(absolutePath.expected, 'utf-8')).toString(); 41 | 42 | assert.is(actual, expected); 43 | }); 44 | 45 | if (!emptyFiles.includes(avsFile)) { 46 | test(`Not empty: ${avsFile}`, async () => { 47 | const actual = JSON.parse(await convertFile(absolutePath.fixture, options)); 48 | 49 | assert.is.not(actual.components.length, 0); 50 | }); 51 | } 52 | }); 53 | 54 | test.run(); 55 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Run Tests 2 | 3 | on: 4 | push: 5 | paths: 6 | - 'src/**' 7 | - 'tests/**' 8 | - 'package.json' 9 | - 'pnpm-lock.yaml' 10 | pull_request: 11 | paths: 12 | - 'src/**' 13 | - 'tests/**' 14 | - 'package.json' 15 | - 'pnpm-lock.yaml' 16 | workflow_dispatch: 17 | 18 | jobs: 19 | tests: 20 | runs-on: ${{ matrix.os }} 21 | strategy: 22 | matrix: 23 | node-version: ['lts/*', '*'] 24 | os: [ubuntu-latest] 25 | 26 | steps: 27 | - uses: actions/checkout@v3 28 | with: 29 | fetch-depth: 1 30 | 31 | - uses: actions/setup-node@v3 32 | with: 33 | node-version: ${{ matrix.node-version }} 34 | 35 | - uses: pnpm/action-setup@v2.0.1 36 | name: Install pnpm 37 | id: pnpm-install 38 | with: 39 | version: 7 40 | run_install: false 41 | 42 | - name: Get pnpm store directory 43 | id: pnpm-cache 44 | run: | 45 | echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" 46 | 47 | - uses: actions/cache@v3 48 | name: Setup pnpm cache 49 | with: 50 | path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} 51 | key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} 52 | restore-keys: | 53 | ${{ runner.os }}-pnpm-store- 54 | 55 | - name: Install dependencies 56 | run: pnpm install --frozen-lockfile --strict-peer-dependencies 57 | 58 | - name: Lint Source 59 | run: pnpm run --if-present lint 60 | 61 | - name: Build Source 62 | run: pnpm run --if-present build 63 | 64 | - name: Run Tests 65 | run: pnpm run --if-present test 66 | -------------------------------------------------------------------------------- /test/_helper.mjs: -------------------------------------------------------------------------------- 1 | import { basename, extname } from 'node:path'; 2 | import { convertPreset } from '../dist/webvsc.mjs'; 3 | import { promises as fs, readFileSync, statSync } from 'node:fs'; 4 | 5 | const defaultArgs = { 6 | hidden: true, 7 | quiet: false, 8 | verbose: 0 9 | }; 10 | 11 | export function convertFile(file, customArgs) { 12 | const args = { 13 | ...defaultArgs, 14 | ...customArgs 15 | }; 16 | 17 | return fs.readFile(file) 18 | .then(async (presetBlob) => { 19 | const presetName = typeof args.name !== 'undefined' && args.name.trim().length > 0 ? args.name : basename(file, extname(file)); 20 | const presetDate = args.noDate ? undefined : await getISOTime(file); 21 | const presetObj = convertPreset(presetBlob, presetName, presetDate, args); 22 | 23 | return JSON.stringify(presetObj, null, 0); 24 | }) 25 | .catch((err) => { 26 | throw new Error(err.message); 27 | }); 28 | } 29 | 30 | export function convertFileSync(file, customArgs) { 31 | const args = { 32 | ...defaultArgs, 33 | ...customArgs 34 | }; 35 | 36 | try { 37 | const presetBlob = readFileSync(file); 38 | const presetName = typeof args.name !== 'undefined' && args.name.trim().length > 0 ? args.name : basename(file, extname(file)); 39 | const presetDate = args.noDate ? undefined : statSync(file).mtime.toISOString(); 40 | 41 | const presetObj = convertPreset(presetBlob, presetName, presetDate, args); 42 | 43 | return JSON.stringify(presetObj, null, 0); 44 | } catch (err) { 45 | throw new Error(err.message); 46 | } 47 | 48 | 49 | 50 | } 51 | 52 | async function getISOTime(file) { 53 | const time = await fs.stat(file); 54 | 55 | return time.mtime.toISOString(); 56 | } 57 | -------------------------------------------------------------------------------- /types/index.d.ts: -------------------------------------------------------------------------------- 1 | type uint8 = 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208|209|210|211|212|213|214|215|216|217|218|219|220|221|222|223|224|225|226|227|228|229|230|231|232|233|234|235|236|237|238|239|240|241|242|243|244|245|246|247|248|249|250|251|252|253|254|255; 2 | 3 | interface Arguments { 4 | verbose?: number; 5 | quiet?: boolean; 6 | minify?: boolean; 7 | name?: string; 8 | noDate?: boolean; 9 | hidden?: boolean; 10 | } 11 | 12 | interface ColorMap { 13 | index: number; 14 | enabled: boolean; 15 | colors: { color: string, position: number }[]; 16 | id?: number; 17 | fileName?: string; 18 | } 19 | 20 | interface CodeSection { 21 | enabled?: boolean; 22 | init: string; 23 | perFrame: string; 24 | onBeat?: string; 25 | perPoint?: string; 26 | _hidden?: string[]; 27 | } 28 | 29 | interface ComponentDefinition { 30 | readonly name: string; 31 | readonly code: number|number[]; 32 | readonly group: string; 33 | readonly func: string; 34 | readonly fields?: any; 35 | } 36 | 37 | type JSONPrimitive = string | number | boolean | null; 38 | type JSONValue = JSONPrimitive | JSONObject | JSONArray; 39 | type JSONObject = { [member: string]: JSONValue }; 40 | type JSONArray = Array 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # webvsc 2 | 3 | [![npm](https://flat.badgen.net/npm/license/@visbot/webvsc)](https://www.npmjs.org/package/@visbot/webvsc) 4 | [![npm](https://flat.badgen.net/npm/v/@visbot/webvsc)](https://www.npmjs.org/package/@visbot/webvsc) 5 | [![CI](https://img.shields.io/github/actions/workflow/status/grandchild/AVS-File-Decoder/tests.yml?style=flat-square)](https://github.com/grandchild/AVS-File-Decoder/actions) 6 | 7 | ## Description 8 | 9 | Library to to batch-convert [Winamp AVS presets](https://www.wikiwand.com/en/Advanced_Visualization_Studio) into native [Webvs](https://github.com/azeem/webvs) JSON format. Take a look at the [supported components](doc/components.md). 10 | 11 | ## Installation 12 | 13 | Use your preferred [Node](https://nodejs.org) package manager to install the package: 14 | 15 | ```sh 16 | npm install @visbot/webvsc@next 17 | ``` 18 | 19 | ## Usage 20 | 21 | `convertPreset(arrayBuffer, fileName, fileDate, [options])` 22 | 23 | ```js 24 | import { convertPreset } from '@visbot/webvsc'; 25 | import fs from 'node:fs': 26 | 27 | const avsBuffer = await fs.promises.readFile(file); 28 | const presetName = 'My Awesome Preset'; // no file-extension! 29 | const modifiedDate = (await fs.stat(file)).mtime || new Date(); 30 | 31 | const webvs = convertPreset(avsBuffer, presetName, modifiedDate.toISOString()); 32 | ``` 33 | 34 | ## Options 35 | 36 | ### hidden 37 | 38 | Type: `boolean` 39 | Default: `false` 40 | 41 | Don't extract hidden strings from fixed-size strings 42 | 43 | ### quiet 44 | 45 | Type: `boolean` 46 | Default: `false` 47 | 48 | Prints errors only 49 | 50 | ### verbose 51 | 52 | Type: `number` 53 | Default: `0` 54 | 55 | Control the amount of output displayed: 56 | 57 | * `0` Display name of operation (read/write) 58 | * `1` List detected components 59 | * `2` List component details 60 | 61 | ## Authors 62 | 63 | * [grandchild](https://github.com/grandchild) 64 | * [idleberg](https://github.com/idleberg) 65 | 66 | ## License 67 | 68 | All code is licensed under [The MIT License](http://opensource.org/licenses/MIT) 69 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@visbot/webvsc", 3 | "version": "3.0.0-alpha", 4 | "description": "A library to convert Winamp AVS presets into Webvs JSON", 5 | "license": "MIT", 6 | "type": "module", 7 | "exports": "./dist/webvsc.mjs", 8 | "engines": { 9 | "node": ">=14.16" 10 | }, 11 | "files": [ 12 | "dist/", 13 | "types/", 14 | "LICENSE", 15 | "README.md" 16 | ], 17 | "directories": { 18 | "doc": "doc", 19 | "test": "test" 20 | }, 21 | "contributors": [ 22 | "grandchild", 23 | "idleberg" 24 | ], 25 | "homepage": "https://github.com/grandchild/AVS-File-Decoder#readme", 26 | "repository": { 27 | "type": "git", 28 | "url": "https://github.com/grandchild/AVS-File-Decoder.git" 29 | }, 30 | "bugs": { 31 | "url": "https://github.com/grandchild/AVS-File-Decoder/issues" 32 | }, 33 | "keywords": [ 34 | "avs", 35 | "webvs", 36 | "webvsc", 37 | "cli", 38 | "converter", 39 | "winamp" 40 | ], 41 | "scripts": { 42 | "build": "esbuild src/main.ts --bundle --outfile=dist/webvsc.mjs --format=esm", 43 | "clean": "rimraf ./dist", 44 | "dev": "npm run start", 45 | "lint:code": "eslint ./src --ignore-path .gitignore", 46 | "lint": "npm-run-all --parallel lint:*", 47 | "prepack": "npm run build", 48 | "prepare": "husky install", 49 | "start": "esbuild src/main.ts --bundle --outfile=dist/webvsc.mjs --format=esm --watch", 50 | "test": "uvu test --ignore _h.mjs" 51 | }, 52 | "dependencies": { 53 | "log-symbols": "^5.1.0" 54 | }, 55 | "devDependencies": { 56 | "@types/node": "^18.11.18", 57 | "@typescript-eslint/eslint-plugin": "^5.48.0", 58 | "@typescript-eslint/parser": "^5.48.0", 59 | "esbuild": "^0.16.14", 60 | "eslint": "^8.31.0", 61 | "globby": "^13.1.3", 62 | "husky": "^8.0.3", 63 | "lint-staged": "^13.1.0", 64 | "npm-run-all2": "^6.0.4", 65 | "prettier": "^2.8.1", 66 | "rimraf": "^3.0.2", 67 | "typescript": "^4.9.4", 68 | "uvu": "^0.5.6" 69 | }, 70 | "lint-staged": { 71 | "*.ts": "eslint --cache --fix" 72 | }, 73 | "volta": { 74 | "node": "18.13.0", 75 | "npm": "8.19.3 " 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/lib/util.ts: -------------------------------------------------------------------------------- 1 | // Modules 2 | import * as Components from './components'; 3 | import config from '../config'; 4 | import decode from './decode'; 5 | import get from './get'; 6 | import Log from './log'; 7 | 8 | const componentTable: ComponentDefinition[] = Components.builtin.concat(Components.dll); 9 | 10 | const setHiddenStrings = (value: boolean): void => { 11 | config.hiddenStrings = value; 12 | }; 13 | 14 | let verbosity = 0; 15 | 16 | const setVerbosity = (value: number): void => { 17 | verbosity = value; 18 | }; 19 | 20 | class ConvertException extends Error { 21 | name = 'ConvertException'; 22 | 23 | constructor(public message: string) { 24 | super(message); 25 | this.message = message; 26 | } 27 | 28 | toString(): string { 29 | return `${this.name} : ${this.message}`; 30 | } 31 | } 32 | 33 | function cmpBytes(arr: Uint8Array, offset: number, test: number[]): boolean { 34 | for (let i = 0; i < test.length; i++) { 35 | if (test[i] === null) { 36 | continue; // null means 'any value' - a letiable 37 | } 38 | if (arr[i + offset] !== test[i]) { 39 | return false; 40 | } 41 | } 42 | 43 | return true; 44 | } 45 | 46 | function printTable(name: string, table: any): void { 47 | Log.log(`${name}:`); 48 | for (const key in table) { 49 | Log.log(`\t${key}: ${table[key] ? ('' + table[key]).replace(/\n/g, '\n\t\t') : 'undefined'}`); 50 | } 51 | } 52 | 53 | function callFunction(funcName: string, blobOrValue: JSONPrimitive | Uint8Array, offset?: void | number, extra?: unknown | void): unknown { 54 | try { 55 | if (blobOrValue instanceof Uint8Array) { 56 | return get[funcName](blobOrValue, offset, extra); 57 | } else { 58 | return get[funcName](blobOrValue); 59 | } 60 | } catch (e) { 61 | if (e.message.search(/not a function|has no method/) >= 0) { 62 | throw new ConvertException(`Method or table '${'get' + funcName}' was not found. Correct capitalization?`); 63 | } else { 64 | throw e; 65 | } 66 | } 67 | } 68 | 69 | function removeSpaces(str: string): string { 70 | return str.replace(/[ ]/g, ''); 71 | } 72 | 73 | function lowerInitial(str: string): string { 74 | return str[0].toLowerCase() + str.slice(1); 75 | } 76 | 77 | 78 | 79 | function convertComponents(blob: Uint8Array): unknown { 80 | let fp = 0; 81 | const components: unknown[] = []; 82 | let res; 83 | // read file as long as there are components left. 84 | // a component takes at least two int32s of space, if there are less bytes than that left, 85 | // ignore them. usually fp < blob.length should suffice but some rare presets have trailing 86 | // bytes. found in one preset's trailing colormap so far. 87 | while (fp <= blob.length - config.sizeInt * 2) { 88 | const code = get.UInt32(blob, fp); 89 | const i = getComponentIndex(code, blob, fp); 90 | const isDll: number = code !== 0xfffffffe && code >= config.builtinMax ? 1 : 0; 91 | const size = getComponentSize(blob, fp + config.sizeInt + isDll * 32); 92 | // console.log("component size", size, "blob size", blob.length); 93 | if (i < 0) { 94 | res = { type: 'Unknown: (' + -i + ')' }; 95 | } else { 96 | const offset = fp + config.sizeInt * 2 + isDll * 32; 97 | res = decode[componentTable[i].func](blob, offset, componentTable[i].fields, componentTable[i].name, componentTable[i].group, offset + size); 98 | } 99 | if (!res || typeof res !== 'object') { 100 | // should not happen, decode functions should throw their own. 101 | throw new ConvertException('Unknown convert error'); 102 | } 103 | components.push(res); 104 | fp += size + config.sizeInt * 2 + isDll * 32; 105 | } 106 | 107 | return components; 108 | } 109 | 110 | function getComponentIndex(code: number, blob: Uint8Array, offset: number): number { 111 | if (code < config.builtinMax || code === 0xfffffffe) { 112 | for (let i = 0; i < componentTable.length; i++) { 113 | if (code === componentTable[i].code) { 114 | if (verbosity >= 1) { 115 | Log.log(`Found component: ${componentTable[i].name} (${code})`); 116 | } 117 | return i; 118 | } 119 | } 120 | } else { 121 | for (let i = Components.builtin.length; i < componentTable.length; i++) { 122 | if (componentTable[i].code instanceof Array && cmpBytes(blob, offset + config.sizeInt, componentTable[i].code)) { 123 | if (verbosity >= 1) { 124 | Log.log(`Found component: ${componentTable[i].name}`); 125 | } 126 | return i; 127 | } 128 | } 129 | } 130 | 131 | if (verbosity >= 1) { 132 | Log.log(`Found unknown component (code: ${code})`); 133 | } 134 | 135 | return -code; 136 | } 137 | 138 | function getComponentSize(blob: Uint8Array, offset: number) { 139 | return get.UInt32(blob, offset); 140 | } 141 | 142 | export { callFunction, cmpBytes, convertComponents, ConvertException, lowerInitial, printTable, removeSpaces, setHiddenStrings, setVerbosity }; 143 | -------------------------------------------------------------------------------- /src/lib/tables.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | blendmodeIn: { 3 | '0': 'IGNORE', 4 | '1': 'REPLACE', 5 | '2': 'FIFTY_FIFTY', 6 | '3': 'MAXIMUM', 7 | '4': 'ADDITIVE', 8 | '5': 'SUB_DEST_SRC', 9 | '6': 'SUB_SRC_DEST', 10 | '7': 'EVERY_OTHER_LINE', 11 | '8': 'EVERY_OTHER_PIXEL', 12 | '9': 'XOR', 13 | '10': 'ADJUSTABLE', 14 | '11': 'MULTIPLY', 15 | '12': 'BUFFER' 16 | }, 17 | 18 | blendmodeOut: { 19 | '0': 'REPLACE', 20 | '1': 'IGNORE', 21 | '2': 'MAXIMUM', 22 | '3': 'FIFTY_FIFTY', 23 | '4': 'SUB_DEST_SRC', 24 | '5': 'ADDITIVE', 25 | '6': 'EVERY_OTHER_LINE', 26 | '7': 'SUB_SRC_DEST', 27 | '8': 'XOR', 28 | '9': 'EVERY_OTHER_PIXEL', 29 | '10': 'MULTIPLY', 30 | '11': 'ADJUSTABLE', 31 | // don't ask me.... 32 | '13': 'BUFFER' 33 | }, 34 | 35 | blendmodeBuffer: { 36 | '0': 'REPLACE', 37 | '1': 'FIFTY_FIFTY', 38 | '2': 'ADDITIVE', 39 | '3': 'EVERY_OTHER_PIXEL', 40 | '4': 'SUB_DEST_SRC', 41 | '5': 'EVERY_OTHER_LINE', 42 | '6': 'XOR', 43 | '7': 'MAXIMUM', 44 | '8': 'MINIMUM', 45 | '9': 'SUB_SRC_DEST', 46 | '10': 'MULTIPLY', 47 | '11': 'ADJUSTABLE' 48 | }, 49 | 50 | blendmodeRender: { 51 | '0': 'REPLACE', 52 | '1': 'ADDITIVE', 53 | '2': 'MAXIMUM', 54 | '3': 'FIFTY_FIFTY', 55 | '4': 'SUB_DEST_SRC', 56 | '5': 'SUB_SRC_DEST', 57 | '6': 'MULTIPLY', 58 | '7': 'ADJUSTABLE', 59 | '8': 'XOR' 60 | }, 61 | 62 | blendmodePicture2: { 63 | '0': 'REPLACE', 64 | '1': 'ADDITIVE', 65 | '2': 'MAXIMUM', 66 | '3': 'MINIMUM', 67 | '4': 'FIFTY_FIFTY', 68 | '5': 'SUB_DEST_SRC', 69 | '6': 'SUB_SRC_DEST', 70 | '7': 'MULTIPLY', 71 | '8': 'XOR', 72 | '9': 'ADJUSTABLE', 73 | '10': 'IGNORE' 74 | }, 75 | 76 | blendmodeColorMap: { 77 | '0': 'REPLACE', 78 | '1': 'ADDITIVE', 79 | '2': 'MAXIMUM', 80 | '3': 'MINIMUM', 81 | '4': 'FIFTY_FIFTY', 82 | '5': 'SUB_DEST_SRC', 83 | '6': 'SUB_SRC_DEST', 84 | '7': 'MULTIPLY', 85 | '8': 'XOR', 86 | '9': 'ADJUSTABLE' 87 | }, 88 | 89 | blendmodeTexer: { 90 | '0': 'TEXTURE', 91 | '1': 'MASKED_TEXTURE' 92 | }, 93 | 94 | colorMapKey: { 95 | '0': 'RED', 96 | '1': 'GREEN', 97 | '2': 'BLUE', 98 | '3': 'CHANNEL_SUM_HALF', 99 | '4': 'MAX', 100 | '5': 'CHANNEL_AVERAGE' 101 | }, 102 | 103 | colorMapCycleMode: { 104 | '0': 'SINGLE', 105 | '1': 'ONBEAT_RANDOM', 106 | '2': 'ONBEAT_SEQUENTIAL' 107 | }, 108 | 109 | bufferMode: { 110 | '0': 'SAVE', 111 | '1': 'RESTORE', 112 | '2': 'ALTERNATE_SAVE_RESTORE', 113 | '3': 'ALTERNATE_RESTORE_SAVE' 114 | }, 115 | 116 | coordinates: { 117 | '0': 'POLAR', 118 | '1': 'CARTESIAN' 119 | }, 120 | 121 | drawMode: { 122 | '0': 'DOTS', 123 | '1': 'LINES' 124 | }, 125 | 126 | audioChannel: { 127 | '0': 'LEFT', 128 | '1': 'RIGHT', 129 | '2': 'CENTER' 130 | }, 131 | 132 | audioSource: { 133 | '0': 'WAVEFORM', 134 | '1': 'SPECTRUM' 135 | }, 136 | 137 | positionX: { 138 | '0': 'LEFT', 139 | '1': 'RIGHT', 140 | '2': 'CENTER' 141 | }, 142 | 143 | positionY: { 144 | '0': 'TOP', 145 | '1': 'BOTTOM', 146 | '2': 'CENTER' 147 | }, 148 | 149 | convolutionEdgeMode: { 150 | '0': 'EXTEND', 151 | '1': 'WRAP' 152 | }, 153 | 154 | multiFilterEffect: { 155 | '0': 'CHROME', 156 | '1': 'DOUBLE_CHROME', 157 | '2': 'TRIPLE_CHROME', 158 | '3': 'INFINITE_ROOT_MULTIPLIER_AND_SMALL_BORDER_CONVOLUTION' 159 | }, 160 | 161 | bufferBlendMode: { 162 | '0': 'REPLACE', 163 | '1': 'ADDITIVE', 164 | '2': 'MAXIMUM', 165 | '3': 'FIFTY_FIFTY', 166 | '4': 'SUB_DEST_SRC', 167 | '5': 'SUB_SRC_DEST', 168 | '6': 'MULTIPLY', 169 | '7': 'ADJUSTABLE', 170 | '8': 'XOR', 171 | '9': 'MINIMUM', 172 | '10': 'ABSOLUTE_DIFFERENCE' 173 | }, 174 | 175 | bufferBlendBuffer: { 176 | '0': 'buffer1', 177 | '1': 'buffer2', 178 | '2': 'buffer3', 179 | '3': 'buffer4', 180 | '4': 'buffer5', 181 | '5': 'buffer6', 182 | '6': 'buffer7', 183 | '7': 'buffer8', 184 | '8': 'CURRENT' 185 | }, 186 | 187 | particleSystemAccelerationType: { 188 | '0': 'NT', 189 | '1': 'FADE_OUT_BY_0_9', 190 | '2': 'FADE_OUT_BY_0_6', 191 | '3': 'COSINE', 192 | '4': 'SQUARED_COSINE' 193 | }, 194 | 195 | particleSystemColorBounce: { 196 | '0': 'STOP', 197 | '1': 'WRAP_EACH', 198 | '2': 'WAVE_EACH', 199 | '3': 'WRAP_ALL', 200 | '4': 'WAVE_ALL' 201 | }, 202 | 203 | // pretty much directly from vis_avs/r_trans.cpp 204 | // [name, script code representation (if any), 0:polar/1:cartesian] 205 | movementEffect: { 206 | '0': ['None', '', 0], 207 | '1': ['Slight Fuzzify', '', 0], 208 | '2': ['Shift Rotate Left', 'x=x+1/32, // use wrap for this one', 1], 209 | '3': ['Big Swirl Out', 'r = r + (0.1 - (0.2 * d)),\r\nd = d * 0.96,', 0], 210 | '4': ['Medium Swirl', 'd = d * (0.99 * (1.0 - sin(r-$PI*0.5) / 32.0)),\r\nr = r + (0.03 * sin(d * $PI * 4)),', 0], 211 | '5': ['Sunburster', 'd = d * (0.94 + (cos((r-$PI*0.5) * 32.0) * 0.06)),', 0], 212 | '6': ['Swirl To Center', 'd = d * (1.01 + (cos((r-$PI*0.5) * 4) * 0.04)),\r\nr = r + (0.03 * sin(d * $PI * 4)),', 0], 213 | '7': ['Blocky Partial Out', '', 0], 214 | '8': ['Swirling Around Both Ways At Once', 'r = r + (0.1 * sin(d * $PI * 5)),', 0], 215 | '9': ['Bubbling Outward', 't = sin(d * $PI),\r\nd = d - (8*t*t*t*t*t)/sqrt((sw*sw+sh*sh)/4),', 0], 216 | '10': ['Bubbling Outward With Swirl', 't = sin(d * $PI),\r\nd = d - (8*t*t*t*t*t)/sqrt((sw*sw+sh*sh)/4),\r\nt=cos(d*$PI/2.0),\r\nr= r + 0.1*t*t*t,', 0], 217 | '11': ['5 Pointed Distro', 'd = d * (0.95 + (cos(((r-$PI*0.5) * 5.0) - ($PI / 2.50)) * 0.03)),', 0], 218 | '12': ['Tunneling', 'r = r + 0.04,\r\nd = d * (0.96 + cos(d * $PI) * 0.05),', 0], 219 | '13': ["Bleedin'", 't = cos(d * $PI),\r\nr = r + (0.07 * t),\r\nd = d * (0.98 + t * 0.10),', 0], 220 | '14': ['Shifted Big Swirl Out', 'd=sqrt(x*x+y*y), r=atan2(y,x),\r\nr=r+0.1-0.2*d, d=d*0.96,\r\nx=cos(r)*d + 8/128, y=sin(r)*d,', 1], // comment from AVS src: // this is a very bad approximation in script. fix\r\n 221 | '15': ['Psychotic Beaming Outward', 'd = 0.15', 0], 222 | '16': ['Cosine Radial 3-way', 'r = cos(r * 3)', 0], 223 | '17': ['Spinny Tube', 'd = d * (1 - ((d - .35) * .5)),\r\nr = r + .1,', 0], 224 | '18': ['Radial Swirlies', 'd = d * (1 - (sin((r-$PI*0.5) * 7) * .03)),\r\nr = r + (cos(d * 12) * .03),', 0], 225 | '19': ['Swill', 'd = d * (1 - (sin((r - $PI*0.5) * 12) * .05)),\r\nr = r + (cos(d * 18) * .05),\r\nd = d * (1-((d - .4) * .03)),\r\nr = r + ((d - .4) * .13)', 0], 226 | '20': ['Gridley', 'x = x + (cos(y * 18) * .02),\r\ny = y + (sin(x * 14) * .03),', 1], 227 | '21': ['Grapevine', 'x = x + (cos(abs(y-.5) * 8) * .02),\r\ny = y + (sin(abs(x-.5) * 8) * .05),\r\nx = x * .95,\r\ny = y * .95,', 1], 228 | '22': ['Quadrant', 'y = y * ( 1 + (sin(r + $PI/2) * .3) ),\r\nx = x * ( 1 + (cos(r + $PI/2) * .3) ),\r\nx = x * .995,\r\ny = y * .995,', 1], 229 | '23': ['6-way Kaleida (use Wrap!)', 'y = (r*6)/($PI), x = d,', 1] 230 | } 231 | }; 232 | -------------------------------------------------------------------------------- /src/lib/decode.ts: -------------------------------------------------------------------------------- 1 | import * as Util from './util'; 2 | import config from '../config'; 3 | import get from './get'; 4 | import Log from './log'; 5 | import Table from './tables'; 6 | 7 | const verbosity = 0; 8 | 9 | export default { 10 | presetHeader(blob: Uint8Array): boolean { 11 | // prettier-ignore 12 | const presetHeader0_1 = [ 13 | 0x4E, 0x75, 0x6C, 0x6C, 0x73, 0x6F, 0x66, 0x74, 14 | 0x20, 0x41, 0x56, 0x53, 0x20, 0x50, 0x72, 0x65, 15 | 0x73, 0x65, 0x74, 0x20, 0x30, 0x2E, 0x31, 0x1A 16 | ]; 17 | 18 | // prettier-ignore 19 | const presetHeader0_2 = [ 20 | 0x4E, 0x75, 0x6C, 0x6C, 0x73, 0x6F, 0x66, 0x74, 21 | 0x20, 0x41, 0x56, 0x53, 0x20, 0x50, 0x72, 0x65, 22 | 0x73, 0x65, 0x74, 0x20, 0x30, 0x2E, 0x32, 0x1A, 23 | ]; 24 | if (!Util.cmpBytes(blob, /*offset*/ 0, presetHeader0_2) && !Util.cmpBytes(blob, /*offset*/ 0, presetHeader0_1)) { 25 | // 0.1 only if 0.2 failed because it's far rarer. 26 | throw new Util.ConvertException('Invalid preset header.\n' + ' This does not seem to be an AVS preset file.\n' + " If it does load with Winamp's AVS please send the file in so we can look at it."); 27 | } 28 | 29 | return blob[config.presetHeaderLength - 1] === 1; // 'Clear Every Frame' 30 | }, 31 | 32 | //// component decode , 33 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 34 | effectList(blob: Uint8Array, offset: number, _: unknown, name: string): unknown { 35 | const size: number = get.UInt32(blob, offset - config.sizeInt); 36 | const comp = { 37 | type: Util.removeSpaces(name), 38 | enabled: get.Bit(blob, offset, 1)[0] !== 1, 39 | clearFrame: get.Bit(blob, offset, 0)[0] === 1, 40 | input: Table['blendmodeIn'][blob[offset + 2]], 41 | output: Table['blendmodeOut'][blob[offset + 3]] 42 | }; 43 | const modebit: boolean = get.Bit(blob, offset, 7)[0] === 1; // is true in all presets I know, probably only for truly ancient versions 44 | if (!modebit) { 45 | Log.error("EL modebit is off!! If you're seeing this, send this .avs file in please!"); 46 | } 47 | const configSize: number = (modebit ? blob[offset + 4] : blob[offset]) + 1; 48 | if (configSize > 1) { 49 | comp['inAdjustBlend'] = get.UInt32(blob, offset + 5); 50 | comp['outAdjustBlend'] = get.UInt32(blob, offset + 9); 51 | comp['inBuffer'] = get.UInt32(blob, offset + 13); 52 | comp['outBuffer'] = get.UInt32(blob, offset + 17); 53 | comp['inBufferInvert'] = get.UInt32(blob, offset + 21) === 1; 54 | comp['outBufferInvert'] = get.UInt32(blob, offset + 25) === 1; 55 | comp['enableOnBeat'] = get.UInt32(blob, offset + 29) === 1; 56 | comp['enableOnBeatFor'] = get.UInt32(blob, offset + 33); 57 | } 58 | 59 | // prettier-ignore 60 | const effectList28plusHeader = [ 61 | 0x00, 0x40, 0x00, 0x00, 0x41, 0x56, 0x53, 0x20, 62 | 0x32, 0x2E, 0x38, 0x2B, 0x20, 0x45, 0x66, 0x66, 63 | 0x65, 0x63, 0x74, 0x20, 0x4C, 0x69, 0x73, 0x74, 64 | 0x20, 0x43, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x00, 65 | 0x00, 0x00, 0x00, 0x00 66 | ]; 67 | 68 | let contentOffset = offset + configSize; 69 | if (Util.cmpBytes(blob, contentOffset, effectList28plusHeader)) { 70 | const codeOffset: number = offset + configSize + effectList28plusHeader.length; 71 | const codeSize: number = get.UInt32(blob, codeOffset); 72 | comp['code'] = get.CodeEIF(blob, codeOffset + config.sizeInt)[0]; 73 | contentOffset = codeOffset + config.sizeInt + codeSize; 74 | } 75 | const content = Util.convertComponents(blob.subarray(contentOffset, offset + size)); 76 | comp['components'] = content; 77 | return comp; 78 | }, 79 | 80 | // generic field decoding function that most components use. 81 | generic(blob: Uint8Array, offset: number, fields: unknown, name: string, group: string, end: number): unknown { 82 | const comp = { 83 | type: Util.removeSpaces(name), 84 | group: group 85 | }; 86 | const keys = Object.keys(fields); 87 | let lastWasABitField = false; 88 | for (let i = 0; i < keys.length; i++) { 89 | if (offset >= end) { 90 | break; 91 | } 92 | const k = keys[i]; 93 | const f = fields[k]; 94 | // console.log(`key: ${k}, field: ${f}`); 95 | if (k.match(/^null[_0-9]*$/)) { 96 | offset += f; 97 | // 'null_: 0' resets bitfield continuity to allow several consecutive bitfields 98 | lastWasABitField = false; 99 | continue; 100 | } 101 | let size = 0; 102 | let value: JSONPrimitive; 103 | let result: [JSONPrimitive, number]; 104 | const num: boolean = typeof f === 'number'; 105 | const other: boolean = typeof f === 'string'; 106 | const array: boolean = f instanceof Array; 107 | if (num) { 108 | size = f; 109 | try { 110 | value = get.UInt(blob, offset, size); 111 | } catch (e) { 112 | throw new Util.ConvertException('Invalid field size: ' + f + '.'); 113 | } 114 | lastWasABitField = false; 115 | } else if (other) { 116 | // const func = 'get' + f; 117 | // console.log(`get: ${f}`); 118 | result = Util.callFunction(f, blob, offset); 119 | value = result[0]; 120 | size = result[1]; 121 | lastWasABitField = false; 122 | } else if (array && f.length >= 2) { 123 | if (f[0] === 'Bit') { 124 | if (lastWasABitField) { 125 | offset -= 1; // compensate to stay in same bitfield 126 | } 127 | lastWasABitField = true; 128 | } else { 129 | lastWasABitField = false; 130 | } 131 | // console.log(`get: ${f[0]} ${f[1]} ${typeof f[1]}`); 132 | let tableName: string = Util.lowerInitial(f[0]); 133 | if (tableName in Table) { 134 | const tableKey: number = get.UInt(blob, offset, f[1]); 135 | value = Table[tableName][tableKey]; 136 | size = f[1]; 137 | } else { 138 | result = Util.callFunction(f[0], blob, offset, f[1]); 139 | size = result[1]; 140 | value = result[0]; 141 | } 142 | if (f[2]) { 143 | // further processing if wanted 144 | // console.log('get' + f[2]); 145 | tableName = Util.lowerInitial(f[2]); 146 | if (tableName in Table) { 147 | value = Table[tableName][value]; 148 | } else { 149 | value = Util.callFunction(f[2], value); 150 | } 151 | } 152 | } 153 | 154 | // save value or function result of value in field 155 | if (k !== 'new_version') { 156 | // but don't save new_version marker, if present 157 | comp[k] = value; 158 | if (verbosity >= 2) { 159 | Log.log('- key: ' + k + '\n- val: ' + value); 160 | if (k === 'code') { 161 | Util.printTable('- code', value); 162 | } 163 | if (verbosity >= 3) { 164 | Log.log('- offset: ' + offset + '\n- size: ' + size); 165 | } 166 | // console.log(); 167 | } 168 | } 169 | offset += size; 170 | } 171 | 172 | return comp; 173 | }, 174 | 175 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 176 | versioned_generic(blob: Uint8Array, offset: number, fields: JSONObject, name: string, group: string, end: number): unknown { 177 | const version: number = blob[offset]; 178 | if (version === 1) { 179 | return this.generic(blob, offset, fields, name, group, end); 180 | } else { 181 | const oldFields = {}; 182 | for (const key in fields) { 183 | if (key === 'new_version') { 184 | continue; 185 | } 186 | if (key === 'code') { 187 | oldFields[key] = (fields['code'] as string).replace(/Code([IFBP]+)/, '256Code$1'); 188 | } else { 189 | oldFields[key] = fields[key]; 190 | } 191 | } 192 | if (verbosity >= 3) { 193 | console.log('oldFields, code changed to:', oldFields['code']); 194 | } 195 | return this.generic(blob, offset, oldFields, name, group, end); 196 | } 197 | }, 198 | 199 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 200 | movement(blob: Uint8Array, offset: number, _: unknown, name: string, group: string, end: number): unknown { 201 | const comp = { 202 | type: name, 203 | group: group 204 | }; 205 | // the special value 0 is because 'old versions of AVS barf' if the id is > 15, so 206 | // AVS writes out 0 in that case, and sets the actual id at the end of the save block. 207 | const effectIdOld = get.UInt32(blob, offset); 208 | let effect = []; 209 | let code; 210 | let hidden: string[]; 211 | if (effectIdOld !== 0) { 212 | if (effectIdOld === 0x7fff) { 213 | let strAndSize: [string, number] | [string, number, string[]] = ['', 0]; 214 | if (blob[offset + config.sizeInt] === 1) { 215 | // new-version marker 216 | strAndSize = get.SizeString(blob, offset + config.sizeInt + 1); 217 | } else { 218 | strAndSize = get.SizeString(blob, offset + config.sizeInt, 256); 219 | } 220 | offset += strAndSize[1]; 221 | code = strAndSize[0]; 222 | if (strAndSize.length > 2) { 223 | hidden = (<[string, number, string[]]>strAndSize)[2]; 224 | } 225 | } else { 226 | if (effectIdOld > 15) { 227 | if (verbosity >= 0) { 228 | Log.error(`Movement: Unknown effect id ${effectIdOld}. This is a known bug.`); 229 | console.log('If you know an AVS version that will display this Movement as anything else but "None", then please send it in!'); 230 | } 231 | effect = Table.movementEffect[0]; 232 | } else { 233 | effect = Table.movementEffect[effectIdOld]; 234 | } 235 | } 236 | } else { 237 | let effectIdNew = 0; 238 | if (offset + config.sizeInt * 6 < end) { 239 | effectIdNew = get.UInt32(blob, offset + config.sizeInt * 6); // 1*config.sizeInt, because of oldId=0, and 5*config.sizeint because of the other settings. 240 | } 241 | effect = Table.movementEffect[effectIdNew]; 242 | } 243 | if (effect && effect.length > 0) { 244 | comp['builtinEffect'] = effect[0]; 245 | } 246 | comp['output'] = get.UInt32(blob, offset + config.sizeInt) ? '50/50' : 'Replace'; 247 | comp['sourceMapped'] = get.Bool(blob, offset + config.sizeInt * 2, config.sizeInt)[0]; 248 | comp['coordinates'] = Table.coordinates[get.UInt32(blob, offset + config.sizeInt * 3)]; 249 | comp['bilinear'] = get.Bool(blob, offset + config.sizeInt * 4, config.sizeInt)[0]; 250 | comp['wrap'] = get.Bool(blob, offset + config.sizeInt * 5, config.sizeInt)[0]; 251 | if (effect && effect.length && effectIdOld !== 1 && effectIdOld !== 7) { 252 | // 'slight fuzzify' and 'blocky partial out' have no script representation. 253 | code = effect[1]; 254 | comp['coordinates'] = effect[2]; // overwrite 255 | } 256 | comp['code'] = code; 257 | if (hidden) { 258 | comp['_hidden'] = hidden; 259 | } 260 | return comp; 261 | }, 262 | 263 | avi(blob: Uint8Array, offset: number): unknown { 264 | const comp = { 265 | type: 'AVI', 266 | group: 'Render', 267 | enabled: get.Bool(blob, offset, config.sizeInt)[0] 268 | }; 269 | const strAndSize = get.NtString(blob, offset + config.sizeInt * 3); 270 | comp['file'] = strAndSize[0]; 271 | comp['speed'] = get.UInt32(blob, offset + config.sizeInt * 5 + strAndSize[1]); // 0: fastest, 1000: slowest 272 | const beatAdd = get.UInt32(blob, offset + config.sizeInt * 3 + strAndSize[1]); 273 | if (beatAdd) { 274 | comp['output'] = '50/50'; 275 | } else { 276 | comp['output'] = get.Map8(blob, offset + config.sizeInt, { 0: 'Replace', 1: 'Additive', 0x100000000: '50/50' }); 277 | } 278 | comp['onBeatAdd'] = beatAdd; 279 | comp['persist'] = get.UInt32(blob, offset + config.sizeInt * 4 + strAndSize[1]); // 0-32 280 | 281 | return comp; 282 | }, 283 | 284 | simple(blob: Uint8Array, offset: number): unknown { 285 | const comp = { 286 | type: 'Simple', 287 | group: 'Render' 288 | }; 289 | const effect = get.UInt32(blob, offset); 290 | if (effect & (1 << 6)) { 291 | comp['audioSource'] = effect & 2 ? 'Waveform' : 'Spectrum'; 292 | comp['renderType'] = 'Dots'; 293 | } else { 294 | switch (effect & 3) { 295 | case 0: // solid analyzer 296 | comp['audioSource'] = 'Spectrum'; 297 | comp['renderType'] = 'Solid'; 298 | break; 299 | case 1: // line analyzer 300 | comp['audioSource'] = 'Spectrum'; 301 | comp['renderType'] = 'Lines'; 302 | break; 303 | case 2: // line scope 304 | comp['audioSource'] = 'Waveform'; 305 | comp['renderType'] = 'Lines'; 306 | break; 307 | case 3: // solid scope 308 | comp['audioSource'] = 'Waveform'; 309 | comp['renderType'] = 'Solid'; 310 | break; 311 | } 312 | } 313 | comp['audioChannel'] = Table.audioChannel[(effect >> 2) & 3]; 314 | comp['positionY'] = Table.positionY[(effect >> 4) & 3]; 315 | comp['colors'] = get.ColorList(blob, offset + config.sizeInt)[0]; 316 | return comp; 317 | } 318 | }; 319 | -------------------------------------------------------------------------------- /src/lib/get.ts: -------------------------------------------------------------------------------- 1 | import { ConvertException } from './util'; 2 | import config from '../config'; 3 | import Log from './log'; 4 | 5 | export default { 6 | Bit(blob: Uint8Array, offset: number, pos: number | number[]): [number, number] { 7 | if ((pos).length) { 8 | if ((pos).length !== 2) { 9 | throw new this.ConvertException(`Invalid Bitfield range ${pos}.`); 10 | } 11 | const mask = (2 << (pos[1] - pos[0])) - 1; 12 | return [(blob[offset] >> pos[0]) & mask, 1]; 13 | } else { 14 | return [(blob[offset] >> (pos)) & 1, 1]; 15 | } 16 | }, 17 | 18 | UInt(blob: Uint8Array, offset: number, size: number): number { 19 | if (!offset) { 20 | offset = 0; 21 | } 22 | if (offset > blob.length - size) { 23 | Log.warn(`WARNING: getUInt: offset overflow ${offset} > ${blob.length - size}`); 24 | return 0; 25 | } 26 | switch (size) { 27 | case 1: 28 | return blob[offset]; 29 | case config.sizeInt: 30 | return this.UInt32(blob, offset); 31 | case config.sizeInt * 2: 32 | return this.UInt64(blob, offset); 33 | default: 34 | throw new ConvertException(`Invalid integer size '${size}', only 1, ${config.sizeInt} and ${config.sizeInt * 2} allowed.`); 35 | } 36 | }, 37 | 38 | UInt32(blob: Uint8Array, offset = 0): number { 39 | if (offset > blob.length - config.sizeInt) { 40 | Log.warn(`WARNING: getUInt32: offset overflow ${offset} > ${blob.length - config.sizeInt}`); 41 | return 0; 42 | } 43 | const array = blob.buffer.slice(blob.byteOffset + offset, blob.byteOffset + offset + config.sizeInt); 44 | try { 45 | return new Uint32Array(array, 0, 1)[0]; 46 | } catch (e) { 47 | if (e instanceof RangeError) { 48 | Log.error(e.stack); 49 | throw new ConvertException(`Invalid offset ${offset} to getUInt32.\nIs this preset very old? Send it in, so we can look at it!`); 50 | } else { 51 | throw e; 52 | } 53 | } 54 | }, 55 | 56 | Int32(blob: Uint8Array, offset = 0): [number, number] { 57 | if (offset > blob.length - config.sizeInt) { 58 | Log.warn(`WARNING: getInt32: offset overflow ${offset} > ${blob.length - config.sizeInt}`); 59 | return [0, config.sizeInt]; 60 | } 61 | const array = blob.buffer.slice(blob.byteOffset + offset, blob.byteOffset + offset + config.sizeInt); 62 | try { 63 | return [new Int32Array(array, 0, 1)[0], config.sizeInt]; 64 | } catch (e) { 65 | if (e instanceof RangeError) { 66 | throw new ConvertException(`Invalid offset ${offset} to getInt32.\nIs this preset very old? Send it in, so we can look at it!`); 67 | } else { 68 | throw e; 69 | } 70 | } 71 | }, 72 | 73 | UInt64(blob: Uint8Array, offset = 0): number { 74 | if (offset > blob.length - config.sizeInt * 2) { 75 | Log.warn(`WARNING: getUInt64: offset overflow ${offset} > ${blob.length - config.sizeInt * 2}`); 76 | return 0; 77 | } 78 | const array = blob.buffer.slice(blob.byteOffset + offset, blob.byteOffset + offset + config.sizeInt * 2); 79 | try { 80 | const two32 = new Uint32Array(array, 0, 2); 81 | return two32[0] + two32[1] * 0x100000000; 82 | } catch (e) { 83 | if (e instanceof RangeError) { 84 | throw new ConvertException(`Invalid offset ${offset} to getUInt64.\nIs this preset very old? Send it in, so we can look at it!`); 85 | } else { 86 | throw e; 87 | } 88 | } 89 | }, 90 | 91 | Float(blob: Uint8Array, offset = 0): [number, number] { 92 | const array = blob.buffer.slice(blob.byteOffset + offset, blob.byteOffset + offset + config.sizeInt); 93 | try { 94 | return [new Float32Array(array, 0, 1)[0], 4]; 95 | } catch (e) { 96 | if (e instanceof RangeError) { 97 | throw new ConvertException(`Invalid offset ${offset} to getFloat.\nIs this preset very old? Send it in, so we can look at it!`); 98 | } else { 99 | throw e; 100 | } 101 | } 102 | }, 103 | 104 | Bool(blob: Uint8Array, offset: number, size: number): [boolean, number] { 105 | const val = size === 1 ? blob[offset] : this.UInt32(blob, offset); 106 | return [val !== 0, size]; 107 | }, 108 | 109 | Boolified(num: number): boolean { 110 | return num === 0 ? false : true; 111 | }, 112 | 113 | SizeString(blob: Uint8Array, offset: number, size?: number): [string, number] | [string, number, string[]] { 114 | let add = 0; 115 | let result = ''; 116 | let getHidden = false; 117 | if (!size) { 118 | size = this.UInt32(blob, offset); 119 | add = config.sizeInt; 120 | } else { 121 | getHidden = config.hiddenStrings; 122 | } 123 | const end = offset + size + add; 124 | let i = offset + add; 125 | let c = blob[i]; 126 | while (c > 0 && i < end) { 127 | result += String.fromCharCode(c); 128 | c = blob[++i]; 129 | } 130 | let hidden: string[] = []; 131 | if (getHidden) { 132 | hidden = this.HiddenStrings(blob, i, end); 133 | } 134 | if (hidden.length === 0) { 135 | return [result, size + add]; 136 | } else { 137 | return [result, size + add, hidden]; 138 | } 139 | }, 140 | 141 | HiddenStrings(blob: Uint8Array, i: number, end: number): string[] { 142 | const nonPrintables: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 127, 129, 141, 143, 144, 157, 173]; 143 | const hidden: string[] = []; 144 | while (i < end) { 145 | let c = blob[i]; 146 | let s = ''; 147 | while (nonPrintables.indexOf(c) < 0 && i < end) { 148 | s += String.fromCharCode(c); 149 | c = blob[++i]; 150 | } 151 | i++; 152 | // mostly of interest might be (lost) code, and thus check for '=' to 153 | // weed out a lot of random uninteresting strings. 154 | // TODO: more sophisticated filter 155 | if (s.length > 4 && s.indexOf('=') >= 0) { 156 | hidden.push(s); 157 | } 158 | } 159 | return hidden; 160 | }, 161 | 162 | NtString(blob: Uint8Array, offset: number): [string, number] { 163 | let result = ''; 164 | let i = offset; 165 | let c = blob[i]; 166 | while (c > 0) { 167 | result += String.fromCharCode(c); 168 | c = blob[++i]; 169 | } 170 | return [result, i - offset + 1]; 171 | }, 172 | 173 | Map1(blob: Uint8Array, offset: number, map: unknown): [string, number] { 174 | return [this.Mapping(map, blob[offset]), 1]; 175 | }, 176 | 177 | Map4(blob: Uint8Array, offset: number, map: unknown): [string, number] { 178 | return [this.Mapping(map, this.UInt32(blob, offset)), config.sizeInt]; 179 | }, 180 | 181 | Map8(blob: Uint8Array, offset: number, map: unknown): [string, number] { 182 | return [this.Mapping(map, this.UInt64(blob, offset)), config.sizeInt * 2]; 183 | }, 184 | 185 | RadioButton(blob: Uint8Array, offset: number, map: unknown[]): [string, number] { 186 | let key = 0; 187 | for (let i = 0; i < map.length; i++) { 188 | const on: number = this.UInt32(blob, offset + config.sizeInt * i) !== 0 ? 1 : 0; 189 | if (on) { 190 | // in case of (erroneous) multiple selections, the last one selected wins 191 | key = on * (i + 1); 192 | } 193 | } 194 | 195 | return [this.Mapping(map, key), config.sizeInt * map.length]; 196 | }, 197 | 198 | Mapping(map: unknown, key: number): string { 199 | const value = map[key]; 200 | if (value === undefined) { 201 | throw new ConvertException(`Map: A value for key '${key}' does not exist.`); 202 | } else { 203 | return value; 204 | } 205 | }, 206 | 207 | // Point, Frame, Beat, Init code fields - reorder to I,F,B,P order. 208 | CodePFBI(blob: Uint8Array, offset: number): [CodeSection, number] { 209 | const map: [string, number][] = [ 210 | ['init', 3], 211 | ['perFrame', 1], 212 | ['onBeat', 2], 213 | ['perPoint', 0] 214 | ]; 215 | return this.CodeSection(blob, offset, map); 216 | }, 217 | 218 | // Frame, Beat, Init code fields - reorder to I,F,B order. 219 | CodeFBI(blob: Uint8Array, offset: number): [CodeSection, number] { 220 | const map: [string, number][] = [ 221 | ['init', 2], 222 | ['perFrame', 1], 223 | ['onBeat', 0] 224 | ]; 225 | return this.CodeSection(blob, offset, map); 226 | }, 227 | 228 | CodeIFBP(blob: Uint8Array, offset: number): [CodeSection, number] { 229 | const map: [string, number][] = [ 230 | ['init', 0], 231 | ['perFrame', 1], 232 | ['onBeat', 2], 233 | ['perPoint', 3] 234 | ]; 235 | return this.CodeSection(blob, offset, map); 236 | }, 237 | 238 | CodeIFB(blob: Uint8Array, offset: number): [CodeSection, number] { 239 | const map: [string, number][] = [ 240 | ['init', 0], 241 | ['perFrame', 1], 242 | ['onBeat', 2] 243 | ]; 244 | return this.CodeSection(blob, offset, map); 245 | }, 246 | 247 | // used by 2.8+ 'Effect List' 248 | CodeEIF(blob: Uint8Array, offset: number): [CodeSection, number] { 249 | const map: [string, number][] = [ 250 | ['init', 0], 251 | ['perFrame', 1] 252 | ]; 253 | const code: [CodeSection, number] = this.CodeSection(blob, offset, map); 254 | return [ 255 | { 256 | enabled: this.Bool(blob, offset, config.sizeInt)[0], 257 | init: code[0]['init'], 258 | perFrame: code[0]['perFrame'] 259 | }, 260 | code[1] 261 | ]; 262 | }, 263 | 264 | // used only by 'Global Variables' 265 | NtCodeIFB(blob: Uint8Array, offset: number): [CodeSection, number] { 266 | const map: [string, number][] = [ 267 | ['init', 0], 268 | ['perFrame', 1], 269 | ['onBeat', 2] 270 | ]; 271 | return this.CodeSection(blob, offset, map, /*nullterminated*/ true); 272 | }, 273 | 274 | // used only by 'Triangle' 275 | NtCodeIFBP(blob: Uint8Array, offset: number): [CodeSection, number] { 276 | const map: [string, number][] = [ 277 | ['init', 0], 278 | ['perFrame', 1], 279 | ['onBeat', 2], 280 | ['perPoint', 3] 281 | ]; 282 | return this.CodeSection(blob, offset, map, /*nullterminated*/ true); 283 | }, 284 | 285 | // the Legacy*-functions are used by ancient versions of 'Super Scope', 'Dynamic Movement', 'Dynamic Distance Modifier', 'Dynamic Shift' 286 | LegacyCodePFBI(blob: Uint8Array, offset: number): [CodeSection, number] { 287 | const map: [string, number][] = [ 288 | ['init', 3], 289 | ['perFrame', 1], 290 | ['onBeat', 2], 291 | ['perPoint', 0] 292 | ]; 293 | return this.CodeSection(blob, offset, map, /*nullterminated*/ false, /*string max length*/ 256); 294 | }, 295 | 296 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 297 | LegacyCodeIFB(blob: Uint8Array, offset: number): [CodeSection, number] { 298 | const map: [string, number][] = [ 299 | ['init', 0], 300 | ['perFrame', 1], 301 | ['onBeat', 2] 302 | ]; 303 | return this.CodeSection(blob, offset, map, /*nullterminated*/ false, /*string max length*/ 256); 304 | }, 305 | 306 | CodeSection(blob: Uint8Array, offset: number, map: [string, number][], nt = false, fixedSize?: number): [CodeSection, number] { 307 | const strings = new Array(map.length); 308 | let totalSize = 0; 309 | let strAndSize: [string, number] | [string, number, string[]]; 310 | let hidden: string[] = []; 311 | for (let i = 0, p = offset; i < map.length; i++, p += strAndSize[1]) { 312 | strAndSize = nt ? this.NtString(blob, p) : this.SizeString(blob, p, fixedSize); 313 | totalSize += strAndSize[1]; 314 | strings[i] = strAndSize[0]; 315 | if (strAndSize.length > 2) { 316 | hidden = hidden.concat((<[string, number, string[]]>strAndSize)[2]); 317 | } 318 | } 319 | const code = {}; 320 | for (let i = 0; i < strings.length; i++) { 321 | code[map[i][0]] = strings[map[i][1]]; 322 | } 323 | if (hidden.length > 0) { 324 | code['_hidden'] = hidden; 325 | } 326 | return [code, totalSize]; 327 | }, 328 | 329 | ColorList(blob: Uint8Array, offset: number): [string[], number] { 330 | const colors = []; 331 | let num = this.UInt32(blob, offset); 332 | const size = config.sizeInt + num * config.sizeInt; 333 | while (num > 0) { 334 | offset += config.sizeInt; 335 | colors.push(this.Color(blob, offset)[0]); 336 | num--; 337 | } 338 | 339 | return [colors, size]; 340 | }, 341 | 342 | ColorMaps(blob: Uint8Array, offset: number): [{ index: number; enabled: boolean; id?: number; fileName?: string; colors: { color: string; position: number }[] }[], number] { 343 | let mapOffset = offset + 480; 344 | const maps: ColorMap[] = []; 345 | const headerSize = 60; // 4B enabled, 4B num, 4B id, 48B filestring 346 | let mi = 0; // map index, might be != i when maps are skipped 347 | for (let i = 0; i < 8; i++) { 348 | const enabled = this.Bool(blob, offset + headerSize * i, config.sizeInt)[0]; 349 | const num = this.UInt32(blob, offset + headerSize * i + config.sizeInt); 350 | const map = this.ColorMap(blob, mapOffset, num); 351 | // check if it's a disabled default {0: #000000, 255: #ffffff} map, and only save it if not. 352 | if (!enabled && map.length === 2 && map[0].color === '#000000' && map[0].position === 0 && map[1].color === '#ffffff' && map[1].position === 255) { 353 | // skip this map 354 | } else { 355 | maps[mi] = { 356 | index: i, 357 | enabled: enabled, 358 | colors: map 359 | }; 360 | if (config.allFields) { 361 | const id = this.UInt32(blob, offset + headerSize * i + config.sizeInt * 2); // id of the map - not really needed. 362 | const mapFile = this.NtString(blob, offset + headerSize * i + config.sizeInt * 3)[0]; 363 | maps[mi]['id'] = id; 364 | maps[mi]['fileName'] = mapFile; 365 | } 366 | mi++; 367 | } 368 | mapOffset += num * config.sizeInt * 3; 369 | } 370 | 371 | return [maps, mapOffset - offset]; 372 | }, 373 | 374 | ColorMap(blob: Uint8Array, offset: number, num: number): Array<{ color: string; position: number }> { 375 | const colorMap = []; 376 | for (let i = 0; i < num; i++) { 377 | const pos = this.UInt32(blob, offset); 378 | const color = this.Color(blob, offset + config.sizeInt)[0]; 379 | offset += config.sizeInt * 3; // there's a 4byte id (presumably) following each color. 380 | colorMap[i] = { color: color, position: pos }; 381 | } 382 | 383 | return colorMap; 384 | }, 385 | 386 | Color(blob: Uint8Array, offset: number): [string, number] { 387 | // Colors in AVS are saved as (A)RGB (where A is always 0). 388 | // Maybe one should use an alpha channel right away and set 389 | // that to 0xff? For now, no 4th byte means full alpha. 390 | const color = this.UInt32(blob, offset).toString(16); 391 | let padding = ''; 392 | for (let i = color.length; i < 6; i++) { 393 | padding += '0'; 394 | } 395 | 396 | return ['#' + padding + color, config.sizeInt]; 397 | }, 398 | 399 | ConvoFilter(blob: Uint8Array, offset: number, dimensions: number[]): unknown { 400 | const size = dimensions[0] * dimensions[1]; 401 | const data = new Array(size); 402 | for (let i = 0; i < size; i++, offset += config.sizeInt) { 403 | data[i] = this.Int32(blob, offset)[0]; 404 | } 405 | const matrix = { width: dimensions[0], height: dimensions[1], data: data }; 406 | 407 | return [matrix, size * config.sizeInt]; 408 | }, 409 | 410 | // 'Text' needs this 411 | SemiColSplit(str: string): unknown | string { 412 | const strings = str.split(';'); 413 | if (strings.length === 1) { 414 | return strings[0]; 415 | } else { 416 | return strings; 417 | } 418 | }, 419 | 420 | BufferNum(code: number): unknown { 421 | if (code === 0) { 422 | return 'Current'; 423 | } 424 | return code; 425 | } 426 | }; 427 | -------------------------------------------------------------------------------- /doc/saveSections.txt: -------------------------------------------------------------------------------- 1 | r_avi.cpp 2 | int pos=0; 3 | PUT_INT(enabled); pos+=4; 4 | PUT_INT(blend); pos+=4; 5 | PUT_INT(blendavg); pos+=4; 6 | strcpy((char *)data+pos, ascName); 7 | pos+=strlen(ascName)+1; 8 | PUT_INT(adapt); pos+=4; 9 | PUT_INT(persist); pos+=4; 10 | PUT_INT(speed); pos+=4; 11 | return pos; 12 | ---------------------------------------- 13 | 14 | 15 | r_blit.cpp 16 | int pos=0; 17 | PUT_INT(scale); pos+=4; 18 | PUT_INT(scale2); pos+=4; 19 | PUT_INT(blend); pos+=4; 20 | PUT_INT(beatch); pos+=4; 21 | PUT_INT(subpixel); pos+=4; 22 | return pos; 23 | ---------------------------------------- 24 | 25 | 26 | r_blur.cpp 27 | int pos=0; 28 | PUT_INT(enabled); pos+=4; 29 | PUT_INT(roundmode); pos+=4; 30 | return pos; 31 | ---------------------------------------- 32 | 33 | 34 | r_bpm.cpp 35 | int pos=0; 36 | PUT_INT(enabled); pos+=4; 37 | PUT_INT(arbitrary); pos+=4; 38 | PUT_INT(skip); pos+=4; 39 | PUT_INT(invert); pos+=4; 40 | PUT_INT(arbVal); pos+=4; 41 | PUT_INT(skipVal); pos+=4; 42 | PUT_INT(skipfirst); pos+=4; 43 | return pos; 44 | ---------------------------------------- 45 | 46 | 47 | r_bright.cpp 48 | int pos=0; 49 | PUT_INT(enabled); pos+=4; 50 | PUT_INT(blend); pos+=4; 51 | PUT_INT(blendavg); pos+=4; 52 | PUT_INT(redp); pos+=4; 53 | PUT_INT(greenp); pos+=4; 54 | PUT_INT(bluep); pos+=4; 55 | PUT_INT(dissoc); pos+=4; 56 | PUT_INT(color); pos+=4; 57 | PUT_INT(exclude); pos+=4; 58 | PUT_INT(distance); pos+=4; 59 | return pos; 60 | ---------------------------------------- 61 | 62 | 63 | r_bspin.cpp 64 | int pos=0; 65 | PUT_INT(enabled); pos+=4; 66 | PUT_INT(colors[0]); pos+=4; 67 | PUT_INT(colors[1]); pos+=4; 68 | PUT_INT(mode); pos+=4; 69 | return pos; 70 | ---------------------------------------- 71 | 72 | 73 | r_bump.cpp 74 | int pos=0; 75 | PUT_INT(enabled); pos+=4; 76 | PUT_INT(onbeat); pos+=4; 77 | PUT_INT(durFrames); pos+=4; 78 | PUT_INT(depth); pos+=4; 79 | PUT_INT(depth2); pos+=4; 80 | PUT_INT(blend); pos+=4; 81 | PUT_INT(blendavg); pos+=4; 82 | save_string(data, pos, code1); 83 | save_string(data, pos, code2); 84 | save_string(data, pos, code3); 85 | PUT_INT(showlight); pos+=4; 86 | PUT_INT(invert); pos+=4; 87 | PUT_INT(oldstyle); pos+=4; 88 | PUT_INT(buffern); pos+=4; 89 | return pos; 90 | ---------------------------------------- 91 | 92 | 93 | r_chanshift.cpp 94 | #define IDC_GBR 1018 95 | #define IDC_BRG 1019 96 | #define IDC_RBG 1020 97 | #define IDC_BGR 1021 98 | #define IDC_GRB 1022 99 | #define IDC_RGB 1183 (actually, 1144 gets saved, go figure) 100 | 101 | typedef struct { 102 | int mode; 103 | int onbeat; 104 | } apeconfig; 105 | 106 | ---------------------------------------- 107 | 108 | 109 | r_clear.cpp 110 | 111 | int pos=0; 112 | PUT_INT(enabled); pos+=4; 113 | PUT_INT(color); pos+=4; 114 | PUT_INT(blend); pos+=4; 115 | PUT_INT(blendavg); pos+=4; 116 | PUT_INT(onlyfirst); pos+=4; 117 | return pos; 118 | ---------------------------------------- 119 | 120 | 121 | r_colorfade.cpp 122 | int pos=0; 123 | PUT_INT(enabled); pos+=4; 124 | PUT_INT(faders[0]); pos+=4; 125 | PUT_INT(faders[1]); pos+=4; 126 | PUT_INT(faders[2]); pos+=4; 127 | PUT_INT(beatfaders[0]); pos+=4; 128 | PUT_INT(beatfaders[1]); pos+=4; 129 | PUT_INT(beatfaders[2]); pos+=4; 130 | return pos; 131 | ---------------------------------------- 132 | 133 | 134 | r_colorreduction.cpp 135 | 136 | memcpy(data, &this->config, sizeof(apeconfig)); 137 | return sizeof(apeconfig); 138 | ---------------------------------------- 139 | 140 | 141 | r_colorreplace.cpp 142 | int pos=0; 143 | PUT_INT(enabled); pos+=4; 144 | PUT_INT(color_clip); pos+=4; 145 | return pos; 146 | ---------------------------------------- 147 | 148 | 149 | r_comment.cpp 150 | int pos=0; 151 | save_string(data,pos,msgdata); 152 | return pos; 153 | ---------------------------------------- 154 | 155 | 156 | r_contrast.cpp 157 | int pos=0; 158 | PUT_INT(enabled); pos+=4; 159 | PUT_INT(color_clip); pos+=4; 160 | PUT_INT(color_clip_out); pos+=4; 161 | PUT_INT(color_dist); pos+=4; 162 | return pos; 163 | ---------------------------------------- 164 | 165 | 166 | r_dcolormod.cpp 167 | int pos=0; 168 | data[pos++]=1; 169 | save_string(data,pos,effect_exp[0]); 170 | save_string(data,pos,effect_exp[1]); 171 | save_string(data,pos,effect_exp[2]); 172 | save_string(data,pos,effect_exp[3]); 173 | PUT_INT(m_recompute); pos+=4; 174 | return pos; 175 | ---------------------------------------- 176 | 177 | 178 | r_ddm.cpp 179 | int pos=0; 180 | data[pos++]=1; 181 | save_string(data,pos,effect_exp[0]); 182 | save_string(data,pos,effect_exp[1]); 183 | save_string(data,pos,effect_exp[2]); 184 | save_string(data,pos,effect_exp[3]); 185 | PUT_INT(blend); pos+=4; 186 | PUT_INT(subpixel); pos+=4; 187 | return pos; 188 | ---------------------------------------- 189 | 190 | 191 | r_defs.cpp 192 | (??? not an effect) 193 | 194 | ---------------------------------------- 195 | 196 | 197 | r_dmove.cpp 198 | int pos=0; 199 | data[pos++]=1; 200 | save_string(data,pos,effect_exp[0]); 201 | save_string(data,pos,effect_exp[1]); 202 | save_string(data,pos,effect_exp[2]); 203 | save_string(data,pos,effect_exp[3]); 204 | PUT_INT(subpixel); pos+=4; 205 | PUT_INT(rectcoords); pos+=4; 206 | PUT_INT(m_xres); pos+=4; 207 | PUT_INT(m_yres); pos+=4; 208 | PUT_INT(blend); pos+=4; 209 | PUT_INT(wrap); pos+=4; 210 | PUT_INT(buffern); pos+=4; 211 | PUT_INT(nomove); pos+=4; 212 | return pos; 213 | ---------------------------------------- 214 | 215 | 216 | r_dotfnt.cpp 217 | int rr; 218 | int pos=0; 219 | int x; 220 | PUT_INT(rotvel); pos+=4; 221 | for (x = 0; x < 5; x ++) 222 | { 223 | PUT_INT(colors[x]); pos+=4; 224 | } 225 | PUT_INT(angle); pos+=4; 226 | rr=(int)(r*32.0f); 227 | PUT_INT(rr); pos+=4; 228 | return pos; 229 | ---------------------------------------- 230 | 231 | 232 | r_dotgrid.cpp 233 | int pos=0,x=0; 234 | PUT_INT(num_colors); pos+=4; 235 | while (x < num_colors) { PUT_INT(colors[x]); x++; pos+=4; } 236 | PUT_INT(spacing); pos+=4; 237 | PUT_INT(x_move); pos+=4; 238 | PUT_INT(y_move); pos+=4; 239 | PUT_INT(blend); pos+=4; 240 | return pos; 241 | ---------------------------------------- 242 | 243 | 244 | r_dotpln.cpp 245 | int rr; 246 | int pos=0; 247 | int x; 248 | PUT_INT(rotvel); pos+=4; 249 | for (x = 0; x < 5; x ++) 250 | { 251 | PUT_INT(colors[x]); pos+=4; 252 | } 253 | PUT_INT(angle); pos+=4; 254 | rr=(int)(r*32.0f); 255 | PUT_INT(rr); pos+=4; 256 | return pos; 257 | ---------------------------------------- 258 | 259 | 260 | r_fadeout.cpp 261 | int pos=0; 262 | PUT_INT(fadelen); pos+=4; 263 | PUT_INT(color); pos+=4; 264 | return pos; 265 | ---------------------------------------- 266 | 267 | 268 | r_fastbright.cpp 269 | int pos=0; 270 | PUT_INT(dir); pos+=4; 271 | return pos; 272 | ---------------------------------------- 273 | 274 | 275 | r_grain.cpp 276 | int pos=0; 277 | PUT_INT(enabled); pos+=4; 278 | PUT_INT(blend); pos+=4; 279 | PUT_INT(blendavg); pos+=4; 280 | PUT_INT(smax); pos+=4; 281 | PUT_INT(staticgrain); pos+=4; 282 | return pos; 283 | ---------------------------------------- 284 | 285 | 286 | r_interf.cpp 287 | rite configuration to data, return length. config data should not exceed 64k. 288 | { 289 | int pos=0; 290 | 291 | PUT_INT(enabled); pos+=4; 292 | PUT_INT(nPoints); pos+=4; 293 | PUT_INT(rotation); pos+=4; 294 | PUT_INT(distance); pos+=4; 295 | PUT_INT(alpha); pos+=4; 296 | PUT_INT(rotationinc); pos+=4; 297 | PUT_INT(blend); pos+=4; 298 | PUT_INT(blendavg); pos+=4; 299 | PUT_INT(distance2); pos+=4; 300 | PUT_INT(alpha2); pos+=4; 301 | PUT_INT(rotationinc2); pos+=4; 302 | PUT_INT(rgb); pos+=4; 303 | PUT_INT(onbeat); pos+=4; 304 | PUT_FLOAT(speed, data, pos); pos+=4; 305 | 306 | return pos; 307 | ---------------------------------------- 308 | 309 | 310 | r_interleave.cpp 311 | C_THISCLASS::save_config(unsigned char *data) // write configuration to data, return length. config data should not exceed 64k. 312 | { 313 | int pos=0; 314 | PUT_INT(enabled); pos+=4; 315 | PUT_INT(x); pos+=4; 316 | PUT_INT(y); pos+=4; 317 | PUT_INT(color); pos+=4; 318 | PUT_INT(blend); pos+=4; 319 | PUT_INT(blendavg); pos+=4; 320 | PUT_INT(onbeat); pos+=4; 321 | PUT_INT(x2); pos+=4; 322 | PUT_INT(y2); pos+=4; 323 | PUT_INT(beatdur); pos+=4; 324 | return pos; 325 | ---------------------------------------- 326 | 327 | 328 | r_invert.cpp 329 | int pos=0; 330 | PUT_INT(enabled); pos+=4; 331 | return pos; 332 | ---------------------------------------- 333 | 334 | 335 | r_linemode.cpp 336 | int pos=0; 337 | PUT_INT(newmode); pos+=4; 338 | return pos; 339 | 340 | ---------------------------------------- 341 | 342 | 343 | r_list.cpp (Effect List /additional/ config) 344 | int pos=0; 345 | PUT_INT(use_code); pos+=4; 346 | save_string(data,pos,effect_exp[0]); 347 | save_string(data,pos,effect_exp[1]); 348 | return pos; 349 | 350 | ---------------------------------------- 351 | 352 | 353 | r_mirror.cpp 354 | rite configuration to data, return length. config data should not exceed 64k. 355 | { 356 | int pos=0; 357 | PUT_INT(enabled); pos+=4; 358 | PUT_INT(mode); pos+=4; 359 | PUT_INT(onbeat); pos+=4; 360 | PUT_INT(smooth); pos+=4; 361 | PUT_INT(slower); pos+=4; 362 | return pos; 363 | ---------------------------------------- 364 | 365 | 366 | r_mosaic.cpp 367 | int pos=0; 368 | PUT_INT(enabled); pos+=4; 369 | PUT_INT(quality); pos+=4; 370 | PUT_INT(quality2); pos+=4; 371 | PUT_INT(blend); pos+=4; 372 | PUT_INT(blendavg); pos+=4; 373 | PUT_INT(onbeat); pos+=4; 374 | PUT_INT(durFrames); pos+=4; 375 | return pos; 376 | ---------------------------------------- 377 | 378 | 379 | r_multidelay.cpp 380 | int pos=0; 381 | PUT_INT(mode); 382 | pos+=4; 383 | PUT_INT(activebuffer); 384 | pos+=4; 385 | if (creationid == 1) 386 | { 387 | for (int i=0;i<6;i++) 388 | { 389 | PUT_INT((int)usebeats[i]); 390 | pos+=4; 391 | PUT_INT(delay[i]); 392 | pos+=4; 393 | } 394 | } 395 | return pos; 396 | ---------------------------------------- 397 | 398 | 399 | r_multiplier.cpp 400 | 401 | memcpy(data, &this->config, sizeof(apeconfig)); 402 | return sizeof(apeconfig); 403 | ---------------------------------------- 404 | 405 | 406 | r_nfclr.cpp 407 | int pos=0; 408 | PUT_INT(color); pos+=4; 409 | PUT_INT(blend); pos+=4; 410 | PUT_INT(nf); pos+=4; 411 | return pos; 412 | ---------------------------------------- 413 | 414 | 415 | r_onetone.cpp 416 | int pos=0; 417 | PUT_INT(enabled); pos+=4; 418 | PUT_INT(color); pos+=4; 419 | PUT_INT(blend); pos+=4; 420 | PUT_INT(blendavg); pos+=4; 421 | PUT_INT(invert); pos+=4; 422 | return pos; 423 | ---------------------------------------- 424 | 425 | 426 | r_oscring.cpp 427 | int pos=0,x=0; 428 | PUT_INT(effect); pos+=4; 429 | PUT_INT(num_colors); pos+=4; 430 | while (x < num_colors) { PUT_INT(colors[x]); x++; pos+=4; } 431 | PUT_INT(size); pos+=4; 432 | PUT_INT(source); pos+=4; 433 | return pos; 434 | ---------------------------------------- 435 | 436 | 437 | r_oscstar.cpp 438 | int pos=0,x=0; 439 | PUT_INT(effect); pos+=4; 440 | PUT_INT(num_colors); pos+=4; 441 | while (x < num_colors) { PUT_INT(colors[x]); x++; pos+=4; } 442 | PUT_INT(size); pos+=4; 443 | PUT_INT(rot); pos+=4; 444 | return pos; 445 | ---------------------------------------- 446 | 447 | 448 | r_parts.cpp 449 | int pos=0; 450 | PUT_INT(enabled); pos+=4; 451 | PUT_INT(colors); pos+=4; 452 | PUT_INT(maxdist); pos+=4; 453 | PUT_INT(size); pos+=4; 454 | PUT_INT(size2); pos+=4; 455 | PUT_INT(blend); pos+=4; 456 | return pos; 457 | ---------------------------------------- 458 | 459 | 460 | r_picture.cpp 461 | rite configuration to data, return length. config data should not exceed 64k. 462 | { 463 | int pos=0; 464 | PUT_INT(enabled); pos+=4; 465 | PUT_INT(blend); pos+=4; 466 | PUT_INT(blendavg); pos+=4; 467 | PUT_INT(adapt); pos+=4; 468 | PUT_INT(persist); pos+=4; 469 | strcpy((char *)data+pos, ascName); 470 | pos+=strlen(ascName)+1; 471 | PUT_INT(ratio); pos+=4; 472 | PUT_INT(axis_ratio); pos+=4; 473 | return pos; 474 | ---------------------------------------- 475 | 476 | 477 | r_rotblit.cpp 478 | int pos=0; 479 | PUT_INT(zoom_scale); pos+=4; 480 | PUT_INT(rot_dir); pos+=4; 481 | PUT_INT(blend); pos+=4; 482 | PUT_INT(beatch); pos+=4; 483 | PUT_INT(beatch_speed); pos+=4; 484 | PUT_INT(zoom_scale2); pos+=4; 485 | PUT_INT(beatch_scale); pos+=4; 486 | PUT_INT(subpixel); pos+=4; 487 | return pos; 488 | ---------------------------------------- 489 | 490 | 491 | r_rotstar.cpp 492 | int pos=0,x=0; 493 | PUT_INT(num_colors); pos+=4; 494 | while (x < num_colors) { PUT_INT(colors[x]); x++; pos+=4; } 495 | return pos; 496 | ---------------------------------------- 497 | 498 | 499 | r_scat.cpp 500 | int pos=0; 501 | PUT_INT(enabled); pos+=4; 502 | return pos; 503 | ---------------------------------------- 504 | 505 | 506 | r_shift.cpp 507 | ng(data,pos,effect_exp[1]); 508 | save_string(data,pos,effect_exp[2]); 509 | PUT_INT(blend); pos+=4; 510 | PUT_INT(subpixel); pos+=4; 511 | return pos; 512 | ---------------------------------------- 513 | 514 | 515 | r_simple.cpp 516 | int pos=0,x=0; 517 | PUT_INT(effect); pos+=4; 518 | PUT_INT(num_colors); pos+=4; 519 | while (x < num_colors) { PUT_INT(colors[x]); x++; pos+=4; } 520 | return pos; 521 | ---------------------------------------- 522 | 523 | 524 | r_sscope.cpp 525 | int x=0; 526 | int pos=0; 527 | data[pos++]=1; 528 | save_string(data,pos,effect_exp[0]); 529 | save_string(data,pos,effect_exp[1]); 530 | save_string(data,pos,effect_exp[2]); 531 | save_string(data,pos,effect_exp[3]); 532 | PUT_INT(which_ch); pos+=4; 533 | PUT_INT(num_colors); pos+=4; 534 | while (x < num_colors) { PUT_INT(colors[x]); x++; pos+=4; } 535 | PUT_INT(mode); pos+=4; 536 | return pos; 537 | ---------------------------------------- 538 | 539 | 540 | r_stack.cpp 541 | pos+=4; 542 | PUT_INT(adjblend_val); pos+=4; 543 | return pos; 544 | ---------------------------------------- 545 | 546 | 547 | r_stars.cpp 548 | 549 | int pos=0; 550 | PUT_INT(enabled); pos+=4; 551 | PUT_INT(color); pos+=4; 552 | PUT_INT(blend); pos+=4; 553 | PUT_INT(blendavg); pos+=4; 554 | PUT_FLOAT(WarpSpeed, data, pos); pos+=4; 555 | PUT_INT(MaxStars_set); pos+=4; 556 | PUT_INT(onbeat); pos+=4; 557 | PUT_FLOAT(spdBeat, data, pos); pos+=4; 558 | PUT_INT(durFrames); pos+=4; 559 | return pos; 560 | ---------------------------------------- 561 | 562 | 563 | r_svp.cpp 564 | 565 | int pos=0; 566 | memcpy(data+pos,m_library,MAX_PATH); 567 | pos+=MAX_PATH; 568 | return pos; 569 | ---------------------------------------- 570 | 571 | 572 | r_text.cpp 573 | 574 | int pos=0; 575 | PUT_INT(enabled); pos+=4; 576 | PUT_INT(color); pos+=4; 577 | PUT_INT(blend); pos+=4; 578 | PUT_INT(blendavg); pos+=4; 579 | PUT_INT(onbeat); pos+=4; 580 | PUT_INT(insertBlank); pos+=4; 581 | PUT_INT(randomPos); pos+=4; 582 | PUT_INT(valign); pos+=4; 583 | PUT_INT(halign); pos+=4; 584 | PUT_INT(onbeatSpeed); pos+=4; 585 | PUT_INT(normSpeed); pos+=4; 586 | memcpy(data+pos, &cf, sizeof(cf)); 587 | pos+=sizeof(cf); 588 | memcpy(data+pos, &lf, sizeof(lf)); 589 | pos+=sizeof(lf); 590 | if (text) 591 | { 592 | int l=strlen(text)+1; 593 | PUT_INT(l); pos+=4; 594 | memcpy(data+pos, text, strlen(text)+1); 595 | pos+=strlen(text)+1; 596 | } 597 | else 598 | { PUT_INT(0); pos+=4;} 599 | PUT_INT(outline); pos+=4; 600 | PUT_INT(outlinecolor); pos+=4; 601 | PUT_INT(xshift); pos+=4; 602 | PUT_INT(yshift); pos+=4; 603 | PUT_INT(outlinesize); pos+=4; 604 | PUT_INT(randomword); pos+=4; 605 | PUT_INT(shadow); pos+=4; 606 | 607 | return pos; 608 | ---------------------------------------- 609 | 610 | 611 | r_timescope.cpp 612 | 613 | int pos=0; 614 | PUT_INT(enabled); pos+=4; 615 | PUT_INT(color); pos+=4; 616 | PUT_INT(blend); pos+=4; 617 | PUT_INT(blendavg); pos+=4; 618 | PUT_INT(which_ch); pos+=4; 619 | PUT_INT(nbands); pos+=4; 620 | return pos; 621 | ---------------------------------------- 622 | 623 | 624 | r_trans.cpp 625 | int pos=0; 626 | 627 | // the reason this is 15, and not REFFECT_MAX, is because old versions of AVS barf 628 | // if effect is > 15, so we put 0, and at the end put the new value 629 | if (effect > 15 && effect != 32767) 630 | { 631 | PUT_INT(0); 632 | pos += 4; 633 | } 634 | else 635 | { 636 | PUT_INT(effect); 637 | pos+=4; 638 | } 639 | if (effect == 32767) 640 | { 641 | int l=strlen(effect_exp.get())+1; 642 | data[pos++]=1; 643 | PUT_INT(l); 644 | pos+=4; 645 | memcpy(data+pos,effect_exp.get(),strlen(effect_exp.get())+1); 646 | pos+=strlen(effect_exp.get())+1; 647 | } 648 | PUT_INT(blend); pos+=4; 649 | PUT_INT(sourcemapped); pos+=4; 650 | PUT_INT(rectangular); pos+=4; 651 | PUT_INT(subpixel); pos+=4; 652 | PUT_INT(wrap); pos+=4; 653 | 654 | // see note on '15' above =) 655 | if (effect > 15 && effect != 32767) 656 | { 657 | PUT_INT(effect); 658 | pos+=4; 659 | } 660 | return pos; 661 | ---------------------------------------- 662 | 663 | 664 | r_transition.cpp 665 | (not really an effect, no save section) 666 | ---------------------------------------- 667 | 668 | 669 | r_unkn.cpp (not really applicable, since we have no "unknown", only "not yet implemented") 670 | int pos=0; 671 | // char s[1024]=""; 672 | // for (int x = 0 ;x < configdata_len; x ++) 673 | // wsprintf(s+strlen(s),"%X,",configdata[x]); 674 | // MessageBox(NULL,s,"saving config",0); 675 | memcpy(data+pos,configdata,configdata_len); 676 | pos+=configdata_len; 677 | return pos; 678 | ---------------------------------------- 679 | 680 | 681 | r_videodelay.cpp 682 | int pos=0; 683 | PUT_INT((int)enabled); 684 | pos+=4; 685 | PUT_INT((int)usebeats); 686 | pos+=4; 687 | PUT_INT((unsigned int)delay); 688 | pos+=4; 689 | return pos; 690 | ---------------------------------------- 691 | 692 | 693 | r_water.cpp 694 | int pos=0; 695 | PUT_INT(enabled); pos+=4; 696 | return pos; 697 | ---------------------------------------- 698 | 699 | 700 | r_waterbump.cpp 701 | int pos=0; 702 | PUT_INT(enabled); pos+=4; 703 | PUT_INT(density); pos+=4; 704 | PUT_INT(depth); pos+=4; 705 | PUT_INT(random_drop); pos+=4; 706 | PUT_INT(drop_position_x); pos+=4; 707 | PUT_INT(drop_position_y); pos+=4; 708 | PUT_INT(drop_radius); pos+=4; 709 | PUT_INT(method); pos+=4; 710 | return pos; 711 | ---------------------------------------- 712 | --------------------------------------------------------------------------------