Jump to content

Experimenting with Visualisation presets


Recommended Posts

For those interested in .milk visualisations and keen to learn about how to create nice effects,

As this is a first release, I would appreciate it if you can let me have some feedback, either here or via email

the attached app allows you to

- load a .milk text file from your predefined folder

- make changes to parameters on the fly

- immediately check the effect in Poweramp

- revert to the original .milk file or save the changes

- push a .milk file to Poweramp so it is available in the app

Requirements:

- set up a default folder with your preferred .milk text files 

 you can find some here.

 

Although lot of the details may look like black art, some parameters are easily identified but here are some with explanation

# NAME       WRITABLE?  RANGE  DESCRIPTION
#   ----       ---------  -----  -----------
#   zoom           yes    >0     controls inward/outward motion.  0.9=zoom out 10% per frame, 1.0=no zoom, 1.1=zoom in 10%
#   zoomexp        yes    >0     controls the curvature of the zoom; 1=normal
#   rot            yes           controls the amount of rotation.  0=none, 0.1=slightly right, -0.1=slightly clockwise, 0.1=CCW
#   warp           yes    >0     controls the magnitude of the warping; 0=none, 1=normal, 2=major warping...
#   cx             yes    0..1   controls where the center of rotation and stretching is, horizontally.  0=left, 0.5=center, 1=right
#   cy             yes    0..1   controls where the center of rotation and stretching is, vertically.  0=top, 0.5=center, 1=bottom
#   dx             yes           controls amount of constant horizontal motion; -0.01 = move left 1% per frame, 0=none, 0.01 = move right 1%
#   dy             yes           controls amount of constant vertical motion; -0.01 = move up 1% per frame, 0=none, 0.01 = move down 1%
#   sx             yes    >0     controls amount of constant horizontal stretching; 0.99=shrink 1%, 1=normal, 1.01=stretch 1%
#   sy             yes    >0     controls amount of constant vertical stretching; 0.99=shrink 1%, 1=normal, 1.01=stretch 1%
#   wave_mode      yes    0,1,2,3,4,5,6,7  controls which of the 8 types of waveform is drawn
#   wave_x         yes    0..1   position of the waveform: 0 = far left edge of screen, 0.5 = center, 1 = far right
#   wave_y         yes    0..1   position of the waveform: 0 = very bottom of screen, 0.5 = center, 1 = top
#   wave_r         yes    0..1   amount of red color in the wave (0..1),
#   wave_g         yes    0..1   amount of green color in the wave (0..1)
#   wave_b         yes    0..1   amount of blue color in the wave (0..1)
#   wave_a         yes    0..1   opacity of the wave (0..1) [0=transparent, 1=opaque]
#   wave_mystery   yes    -1..1  what this parameter does is a mystery.  (honestly, though, this value does different things for each waveform; for example, it could control angle at which the waveform was drawn.)
#   wave_usedots   yes    0/1    if 1, the waveform is drawn as dots (instead of lines)
#   wave_thick     yes    0/1    if 1, the waveform's lines (or dots) are drawn with double thickness
#   wave_additive  yes    0/1    if 1, the wave is drawn additively, saturating the image at white
#   wave_brighten  yes    0/1    if 1, all 3 r/g/b colors will be scaled up until at least one reaches 1.0
#   ob_size        yes    0..0.5 thickness of the outer border drawn at the edges of the screen every frame
#   ob_r           yes    0..1   amount of red color in the outer border
#   ob_g           yes    0..1   amount of green color in the outer border
#   ob_b           yes    0..1   amount of blue color in the outer border
#   ob_a           yes    0..1   opacity of the outer border (0=transparent, 1=opaque)
#   ib_size        yes    0..0.5 thickness of the inner border drawn at the edges of the screen every frame
#   ib_r           yes    0..1   amount of red color in the inner border
#   ib_g           yes    0..1   amount of green color in the inner border
#   ib_b           yes    0..1   amount of blue color in the inner border
#   ib_a           yes    0..1   opacity of the inner border (0=transparent, 1=opaque)
#   mv_r           yes    0..1   amount of red color in the motion vectors
#   mv_g           yes    0..1   amount of green color in the motion vectors
#   mv_b           yes    0..1   amount of blue color in the motion vectors
#   mv_a           yes    0..1   opacity of the motion vectors (0=transparent, 1=opaque)
#   mv_x           yes    0..64  the number of motion vectors in the X direction
#   mv_y           yes    0..48  the number of motion vectors in the Y direction
#   mv_l           yes    0..5   the length of the motion vectors (0=no trail, 1=normal, 2=double...)
#   mv_dx          yes    -1..1  horizontal placement offset of the motion vectors
#   mv_dy          yes    -1..1  vertical placement offset of the motion vectors
#   decay          yes    0..1   controls the eventual fade to black; 1=no fade, 0.9=strong fade, 0.98=recommended
#   gamma          yes    >0     controls display brightness; 1=normal, 2=double, 3=triple, etc.
#   echo_zoom      yes    >0     controls the size of the second graphics layer
#   echo_alpha     yes    >0     controls the opacity of the second graphics layer; 0=transparent (off), 0.5=half-mix, 1=opaque
#   echo_orient    yes    0,1,2,3 selects an orientation for the second graphics layer.  0=normal, 1=flip on x, 2=flip on y, 3=flip on both
#   darken_center  yes    0/1    if 1, help keeps the image from getting too bright by continually dimming the center point
#   wrap           yes    0/1    sets whether or not screen elements can drift off of one side and onto the other
#   invert         yes    0/1    inverts the colors in the image
#   brighten       yes    0/1    brightens the darker parts of the image (non-linear; square root filter)
#   darken         yes    0/1    darkens the brighter parts of the image (non-linear; squaring filter)
#   solarize       yes    0/1    emphasizes mid-range colors
#   monitor        yes    any    set this value for debugging your preset code; if you hit the 'N' key,
#                                  the value of 'monitor' will be posted in the upper-right corner of milkdrop.
#                                   for example, setting "monitor = q3;" would let you keep an eye on q3's value.
#
#   time           NO     >0     retrieves the current time, in seconds, since MilkDrop started running
#   fps            NO     >0     retrieves the current framerate, in frames per second.
#   frame          NO            retrieves the number of frames of animation elapsed since the program started
#   progress       NO     0..1   progress through the current preset; if preset was just loaded, this is closer to 0; if preset is about to end, this is closer to 1.
#                                  -note that if Scroll Lock is on, 'progress' will freeze!
#
#   bass           NO     >0     retrieves the current amount of bass.  1 is normal; below ~0.7 is quiet; above ~1.3 is loud bass
#   mid            NO     >0       -same, but for mids (middle frequencies)
#   treb           NO     >0       -same, but for treble (high) frequencies
#   bass_att       NO     >0     retrieves an attenuated reading on the bass, meaning that it is damped in time and doesn't change so rapidly.
#   mid_att        NO     >0       -same, but for mids (middle frequencies)
#   treb_att       NO     >0       -same, but for treble (high) frequencies
#   meshx          NO     8-128  tells you the user's mesh size in the X direction.  always an integer value.
#   meshy          NO     6-96   tells you the user's mesh size in the Y direction.  always an integer value.
#   pixelsx        NO     16-4096 width of the viz window, in pixels.  If Canvas Stretch is on, this is the pre-stretched size.  (same as "texsize.x" for shaders)
#   pixelsy        NO     16-4096 height of the viz window, in pixels.  If Canvas Stretch is on, this is the pre-stretched size.  (same as "texsize.y" for shaders)
#   aspectx        NO     >0     multiply an x-coordinate by this to make the preset look the same at any aspect (window height:width) ratio.
#                                  -value: if widescreen, 1; if window is tall, h/w.
#  aspecty        NO     >0     multiply a y-coordinate by this to make the preset look the same at any aspect (window height:width) ratio.
#                                  -value: if widescreen, w/h; if window is tall, 1.
 #
#  blur1_min      yes    0..1   Normally these are set to 0 (min) and 1 (max).
#   blur2_min      yes    0..1   You can clamp the values in the blur texture to a tighter
#   blur3_min      yes    0..1     range, though.
#   blur1_max      yes    0..1   This will increase the precision in the blur textures,
#   blur2_max      yes    0..1     but you run the risk of clamping values to your min/max.
#   blur3_max      yes    0..1   If you use the GetBlur1() .. GetBlur3() functions to sample
#   blur1_edge_darken yes 0..1     the blur texture, they will automatically "unpack" the
#                                  values for you in the end!
#
#   q1             yes    any    } Used to carry values along a chain
#   q2             yes    any    }  from the preset init code,
#   q3             yes    any    }  to the preset per-frame code, then on
#   q4             yes    any    }    to the preset per-vertex code;
#   q5             yes    any    }    or to the custom shape per-frame code,
#   q6             yes    any    }    or to the custom wave per-frame code,
#   q7             yes    any    }      then to the custom wave per-vertex code;
#   ...                          }    or to the [pixel] shader code.
#   q31            yes    any    } Click here to see a diagram for the Q vars.
#   q32            yes    any    }

 

 

flyingdutchman_vis.apk

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...