http://wiki.winamp.com/api.php?action=feedcontributions&user=JenniferBlack&feedformat=atomWinamp Developer Wiki - User contributions [en]2024-03-29T13:50:33ZUser contributionsMediaWiki 1.22.3http://wiki.winamp.com/wiki/Modern_Skin:_Non-Rect_PlayerModern Skin: Non-Rect Player2011-07-17T13:58:19Z<p>JenniferBlack: </p>
<hr />
<div>Creating a Modern Skin --> [[Modern Skin: Intro|Intro]] --> [[Modern Skin: Winamp 2 to W3+|Winamp 2 to Winamp 3+]] --> [[Modern Skin: Simple Skin Tutorial|Simple Skin Tutorial]] --> [[Modern Skin: XML Intro|XML Intro]] --> [[Modern Skin: Simple Skin Tutorial (Continued)|Simple Skin Tutorial (Continued)]] --> [[Modern Skin: Container| Container]] --> [[Modern Skin: Group|Group]] --> [[Modern Skin: Relative Positioning| Relative Positioning]] --> [[Modern Skin: Complex Skin|Complex Skin]] --> [[Modern Skin: Non-Rect Player| Non-Rect Player]] --> [[Modern Skin: Layer Composition| Layer Composition]] --> [[Modern Skin: Alpha Channels| Alpha Channels]] --> [[Modern Skin: Animatedlayer|Animatedlayer]] --> [[Modern Skin: Snap Points|Snap Points]] --> [[Modern Skin: Drawers|Drawers]] --> [[Modern Skin: Skin Scripting| Skin Scripting]] --> [[Modern Skin: Drawer Scripting| Drawer Scripting]] --> [[Modern Skin: Animating a Skin|Animating a Skin]] --> [[Modern Skin: Maki Overview| Maki Overview]] --> [[Main_Page#Glossary_of_Terms|Glossary]]<br />
<br />
<br />
==Introduction==<br />
<br />
Modern Winamp skins bring forth unprecedented flexibility and power to skinning. You are no longer confined to simple rectangular shapes; in fact any shape is possible. Just take a look at these awesome examples. In addition, Winamp3 has been revamped so that any part of the user interface is skinnable.<br />
<br />
You should notice that while the shapes are different, the X and Y coordinate system still applies. The (0,0) coordiante starts at the upper-left corner. The x-coordinate increases at you move to the right and <span class="plainlinks">[http://www.diamondlinks.net/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">link building</span>] the y-coordinate increases as you move down.<br />
<br />
While the shape of the image can be anything you want, the image itself remains in rectangular form. What happens is that the back ground of the image is transparent; therefore <span class="plainlinks">[http://www.proposable.com/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">proposal software</span>] all you see is the shape that you intend to show. To produce the complex designs that you see below, you must overlay many images on top of the each other. To do this, you must use layers. Layer composition is covered in the next section.<br />
<br />
<br />
[[Image:Non-rect mad.png]]<br />
<br />
<br />
[[Image:Non-rect boxer.png]]<br />
<br />
==Complex Tutorial Modern Skin - The Break Down==<br />
<br />
Complex Tutorial Skin is composed of these parts:<br />
<br />
Everything from Simple Tutorial Modern Skin<br />
A second container: "complex"<br />
Within the "complex" container, a layout called "normal".<br />
<br />
* Group #1: "complex.circle" - to illustrate Layer Composition (Section 3.2)<br />
* Group #2: "complex.circle2" - to illustrate Alpha Channel (Section 3.3)<br />
* Group #3: "complex.circle3" - to illustrate Drawer (Section 3.6 and 4.1)<br />
* Group #4: "complex.circle4" - to illustrate Animated Layer (Section 3.4)<br />
* Group #5: "complex.circle5" - to illustrate Animating Skin (Section 4.2) <br />
<br />
Concepts such as container, layout and group were explained in Section 2. Please refer to them.<br />
<br />
<br />
[[Image:Complexskin_diag.png]]<br />
<br />
<br />
<br />
==Player.XML - Part 1: SimpleTutorialXML.xml==<br />
<br />
<br />
When you open player.xml file for the "Complex Tutorial" skin, you noticed that it has been changed from the one from "Simple Tutorial" skin. We have made changes to it to illustrate new concepts for this section. Part one of the file (line 1-7) gives a brief description of the file and tells you that the components from Simple Tutorial has been moved into a different file: SimpleTutorialXML.xml. We used an <include > tag to incorporate all of the Simple Tutorial's functionalities into our current skin.<br />
<br />
<br />
[[Image:Complex playerxml 1.png]]<br />
<br />
<br />
<br />
<br />
==Player.XML - Part 2: Graphic Elements==<br />
<br />
<br />
[[Image:Triangle-clickme.png]] [[Image:Blue-vis-layer.png]] [[Image:Yellowcircle-arrow.png]] [[Image:Background.png]]<br />
<br />
[[Image:Blue-circle.png]] [[Image:Red-circle.png]] [[Image:Triangle.png]] [[Image:Numfont1.png]]<br />
<br />
<br />
This are the graphics that I've used in creating complex Tutorial skin. One thing to notice is that we like to use PNG file format. Please also use that format too. The graphics files are the parts that we're going to use for our skin. The following are XML code linking graphics to elements. Element definition was covered in last section.<br />
<br />
<br />
[[Image:Complex playerxml 2.png]]</div>JenniferBlackhttp://wiki.winamp.com/wiki/Modern_Skin:_Non-Rect_PlayerModern Skin: Non-Rect Player2011-07-17T13:50:28Z<p>JenniferBlack: /* Introduction */</p>
<hr />
<div>Creating a Modern Skin --> [[Modern Skin: Intro|Intro]] --> [[Modern Skin: Winamp 2 to W3+|Winamp 2 to Winamp 3+]] --> [[Modern Skin: Simple Skin Tutorial|Simple Skin Tutorial]] --> [[Modern Skin: XML Intro|XML Intro]] --> [[Modern Skin: Simple Skin Tutorial (Continued)|Simple Skin Tutorial (Continued)]] --> [[Modern Skin: Container| Container]] --> [[Modern Skin: Group|Group]] --> [[Modern Skin: Relative Positioning| Relative Positioning]] --> [[Modern Skin: Complex Skin|Complex Skin]] --> [[Modern Skin: Non-Rect Player| Non-Rect Player]] --> [[Modern Skin: Layer Composition| Layer Composition]] --> [[Modern Skin: Alpha Channels| Alpha Channels]] --> [[Modern Skin: Animatedlayer|Animatedlayer]] --> [[Modern Skin: Snap Points|Snap Points]] --> [[Modern Skin: Drawers|Drawers]] --> [[Modern Skin: Skin Scripting| Skin Scripting]] --> [[Modern Skin: Drawer Scripting| Drawer Scripting]] --> [[Modern Skin: Animating a Skin|Animating a Skin]] --> [[Modern Skin: Maki Overview| Maki Overview]] --> [[Main_Page#Glossary_of_Terms|Glossary]]<br />
<br />
<br />
==Introduction==<br />
<br />
Modern Winamp skins bring forth unprecedented flexibility and power to skinning. You are no longer confined to simple rectangular shapes; in fact any shape is possible. Just take a look at these awesome examples. In addition, Winamp3 has been revamped so that any part of the user interface is skinnable.<br />
<br />
You should notice that while the shapes are different, the X and Y coordinate system still applies. The (0,0) coordiante starts at the upper-left corner. The x-coordinate increases at you move to the right and <span class="plainlinks">[http://www.diamondlinks.net/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">link building</span>] the y-coordinate increases as you move down.<br />
<br />
While the shape of the image can be anything you want, the image itself remains in rectangular form. What happens is that the back ground of the image is transparent; therefore all you see is the shape that you intend to show. To produce the complex designs that you see below, you must overlay many images on top of the each other. To do this, you must use layers. Layer composition is covered in the next section.<br />
<br />
<br />
[[Image:Non-rect mad.png]]<br />
<br />
<br />
[[Image:Non-rect boxer.png]]<br />
<br />
==Complex Tutorial Modern Skin - The Break Down==<br />
<br />
Complex Tutorial Skin is composed of these parts:<br />
<br />
Everything from Simple Tutorial Modern Skin<br />
A second container: "complex"<br />
Within the "complex" container, a layout called "normal".<br />
<br />
* Group #1: "complex.circle" - to illustrate Layer Composition (Section 3.2)<br />
* Group #2: "complex.circle2" - to illustrate Alpha Channel (Section 3.3)<br />
* Group #3: "complex.circle3" - to illustrate Drawer (Section 3.6 and 4.1)<br />
* Group #4: "complex.circle4" - to illustrate Animated Layer (Section 3.4)<br />
* Group #5: "complex.circle5" - to illustrate Animating Skin (Section 4.2) <br />
<br />
Concepts such as container, layout and group were explained in Section 2. Please refer to them.<br />
<br />
<br />
[[Image:Complexskin_diag.png]]<br />
<br />
<br />
<br />
==Player.XML - Part 1: SimpleTutorialXML.xml==<br />
<br />
<br />
When you open player.xml file for the "Complex Tutorial" skin, you noticed that it has been changed from the one from "Simple Tutorial" skin. We have made changes to it to illustrate new concepts for this section. Part one of the file (line 1-7) gives a brief description of the file and tells you that the components from Simple Tutorial has been moved into a different file: SimpleTutorialXML.xml. We used an <include > tag to incorporate all of the Simple Tutorial's functionalities into our current skin.<br />
<br />
<br />
[[Image:Complex playerxml 1.png]]<br />
<br />
<br />
<br />
<br />
==Player.XML - Part 2: Graphic Elements==<br />
<br />
<br />
[[Image:Triangle-clickme.png]] [[Image:Blue-vis-layer.png]] [[Image:Yellowcircle-arrow.png]] [[Image:Background.png]]<br />
<br />
[[Image:Blue-circle.png]] [[Image:Red-circle.png]] [[Image:Triangle.png]] [[Image:Numfont1.png]]<br />
<br />
<br />
This are the graphics that I've used in creating complex Tutorial skin. One thing to notice is that we like to use PNG file format. Please also use that format too. The graphics files are the parts that we're going to use for our skin. The following are XML code linking graphics to elements. Element definition was covered in last section.<br />
<br />
<br />
[[Image:Complex playerxml 2.png]]</div>JenniferBlackhttp://wiki.winamp.com/wiki/Visual_DeveloperVisual Developer2011-07-15T06:48:58Z<p>JenniferBlack: /* AVS Unleashed */</p>
<hr />
<div>{{Template:NavBar}}<br />
<br />
==What is a Visualization?==<br />
Visualizers or Visualization Plugins are dynamic add-ons that produce images, colors, and textures that change based elements of the music being played. Winamp offers two primary visualization plugins ([[Visual_Developer#AVS_Unleashed | AVS]] & [[Visual_Developer#Milk_Drop_Unleashed | MilkDrop]]) allowing you to create different presets. If you’re feeling invincible, you can even attempt to create your own visualization plugin or you can stay platform. There are many [http://www.winamp.com/plugins/browse/1 visualization plugins] available which users have generated.<br />
<br />
==What is a Preset?==<br />
Presets are outputs of a visualization platform. You can customize the visualizers and get any effect you want. Many users have uploaded such presets in [http://www.winamp.com/plugins/browse/11 Winamp.com]<br />
<br />
==AVS Unleashed==<br />
AVS is the mother of all Winamp visualization plug-ins. It lets the user build a countless number of custom visualizations from an ever-expanding library of effects. AVS supports windowed/fullscreen rendering, preset customization, module stacking, skinnable windows, support for Sonique visual plug-ins, and a ton of other features. AVS is now bundled with all versions of Winamp after v2.6, so everyone can get a taste of its visual sonic goodness.<br />
<br />
===Module References===<br />
Below is some information on AVS modules. WVS is our codename for <span class="plainlinks">[http://www.gumball-machine.com/vending-machines.html <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">vending machines</span>] our global mind control device. With it we shall overtake the world. And have another excuse to take mind-altering substances.<br />
<br />
Currently information about the superscope module is here. It uses all kinds of math stuff. Justin is so smart. You can look here for more general information about making presets.<br />
<br />
====Superscope Reference====<br />
<br />
The superscope allows you to create your own designs.<br />
<br />
To have multiple statements on one line, use a semicolon (;) to delimit the statement. Use parenthesis '( and )' if you are unsure about precedence.<br />
<br />
'''Fields:'''<br />
<br />
{| Border="1"<br />
!Field !! Description<br />
|-<br />
|init || set initial variable values here<br />
|-<br />
|point || This is where the shape of the superscope is defined<br />
|-<br />
|frame || Used to define movement and transformations<br />
|-<br />
|beat || Expression that gets evaluated on the beat<br />
|-<br />
|}<br />
<br />
'''Operators:'''<br />
<br />
{| Border = "1"<br />
!Operator !! Description<br />
|-<br />
|= || assign<br />
|-<br />
|'+,-,/,*' || 'plus, minus, divide, multiply'<br />
|-<br />
|| || convert to integer, and do bitwise or<br />
|-<br />
|& || convert to integer, and do bitwise and<br />
|-<br />
|% || convert to integer, and get remainder<br />
|-<br />
|}<br />
<br />
'''Variables:'''<br />
<br />
{| Border = "1"<br />
!Variables !! Description<br />
|-<br />
|n || number of points to render (set in Init, Beat or Frame)<br />
|-<br />
|x || x coordinate, between -1 and 1<br />
|-<br />
|y || y coordinate, between -1 and 1<br />
|-<br />
|i || position of the scope (0..1). The point position.<br />
|-<br />
|v || value at point i (-1..1)<br />
|-<br />
|b || 1 if beat. 0 for no beat. Used for beat changes<br />
|-<br />
|w || width of screen<br />
|-<br />
|h || height of screen<br />
|-<br />
|red || red value. (0..1). Set this variable to set red value.<br />
|-<br />
|green || green value. (0..1) Set this variable to set green value.<br />
|-<br />
|blue || blue value. (0..1) Set this variable to set blue value.<br />
|-<br />
|t, d || variables commonly used for movement<br />
|-<br />
|}<br />
<br />
'''Functions:'''<br />
{| Border = "1"<br />
!Variables !! Description<br />
|-<br />
|abs(var)|| returns the absolute value of 'var'<br />
|-<br />
|sin(var) || returns the sine of the angle var (expressed in radians)<br />
|-<br />
|cos(var) || returns the cosine of the angle var<br />
|-<br />
|tan(var) || returns the tangent of the angle var<br />
|-<br />
|asin(var) || returns the arcsine of var<br />
|-<br />
|acos(var) || returns the arccosine of var<br />
|-<br />
|atan(var) || returns the arctangent of var<br />
|-<br />
|sqr(var) || returns the square of var<br />
|-<br />
|sqrt(var) || returns the square root of var<br />
|-<br />
|pow(var, var2)|| returns var to the power of var2<br />
|-<br />
|log(var) || returns the log base of var<br />
|-<br />
|log10(var) || returns the log base 10 of var<br />
|-<br />
|sign(var) || returns the sign of var or 0<br />
|-<br />
|min(var, var2)|| returns the smallest value<br />
|-<br />
|max(var, var2) || returns the greatest value<br />
|-<br />
|sigmoid(var, var2)|| returns sigmoid function value of x=var (var2=constraint)<br />
|-<br />
|rand(var) || returns a random value between 0 and var<br />
|-<br />
|band(var, var2)|| boolean and, returns 1 if var and var2 are != 0<br />
|-<br />
|bor(var, var2) || boolean or, returns 1 if var or var2 is != 0<br />
|-<br />
|bnot(var) || boolean not, returns 1 if var == 0 or 0 if var ! = 0<br />
|-<br />
|if(cond, vartrue, varfalse) || if condition is nonzero, returns valtrue, otherwise returns valfalse<br />
|-<br />
|equal(var, var2) || returns 1 if var=var2, else 0<br />
|-<br />
|above(var, var2) || returns 1 if var > var2, else 0<br />
|-<br />
|below(var, var2)|| returns 1 if var<var2, else 0<br />
|-<br />
|}<br />
jjjjjjjj<br />
<br />
===Making Presets===<br />
We are going to attempt to reproduce a simple version of one of my favorite presets: Lone's "No way to go". Successful presets usually start off with one or more Render Modules, and then have a number of Trans Modules added to subtly manipulate the effect. Lone's preset is no exception. Again, before we start, make sure that you have both Winamp and AVS installed:<br />
# Start Winamp and AVS<br />
# Right-click in the AVS window, and select AVS Editor<br />
# In the Editor window, click on Preset. A drop-down menu appears<br />
# Click on New. This creates a new blank preset<br />
# Click on Main. The option to Clear every frame should appear in the right window. If enabled, this will paint the screen black at the beginning of each frame, erasing the previous one. For this preset, leave this option unchecked<br />
# We will now add Effect Modules to this presets. Click on +, then click on Render, then click on Moving Particle. New options should appear in the right half of the window<br />
# Click on the white box labeled "color". A whole new color window should pop up<br />
# Click on a basic color (it helps the effect if it isn't a "pure" color, like orange or purple). Now click OK. The color box should now be the same color that you chose<br />
# Make sure the Onbeat Sizechange option is enabled<br />
# A moving blob of color is a bit interesting, but it could be better. We will now alter how that Moving Particle is displayed by adding some Trans Modules<br />
# Click +, then click Trans, then click Water<br />
# Click +, then click Trans, then click Blur<br />
# Click +, then click Trans, then click Movement. A new list of effects should appear in the right half of the window. Click on sunburster<br />
<br />
Congratulations, we have replicated Lone's Preset! You can also drag an included Effect Module up or down the list to play with sequencing. I hope that you have realized by now that ANY permutation of the existing Modules or setting modification will result in a new effect! Keep experimenting!<br />
<br />
====Advanced Tactics====<br />
<br />
After creating a few original presets, it is natural to want even more options and control. AVS now has a very powerful tool: Effect Lists. To use an Effect List simply as an organizational tool is to squander its potential. The idea is that everything in an effect list gets rendered into a separate buffer before being added to its parent buffer. You now have the power to create completely separate effects off screen, manipulate them freely, possibly blending them together, all before finally displaying the final effect in one shot.<br />
#Open AVS Editor#Create a new preset<br />
#Click on Main, then disable the Clear every frame option<br />
#Click on +, then on Effect List to add an Effect List<br />
#In the Effect List options, make sure the Enabled and Clear every frame check boxes are checked. For the Input blend mode, select Ignore. For the Output blend mode, select Subtractive Blend 1<br />
#Click on +, then on Trans, then on Mosaic<br />
#Click on +, then on Render, then on Simple<br />
#Click on Main, to stop adding to the Effect list<br />
#Click on +, then on Trans, then Fadeout<br />
#In the Fadeout options, Click on the Fade to Color Box, and select a nice red color#Click on +, then on Render, then on Bass Spin<br />
<br />
If you have followed the instructions faithfully, you should get an effect tree that looks like this:<br />
<br />
'''Main'''<br />
* Render / Bass Spin<br />
* Trans / Fadeout<br />
'''Effects List'''<br />
* Render / Simple<br />
* Trans / Mosaic<br />
<br />
That having been done, let's examine this preset:<br />
A Bass Spin is placed into the main parent buffer.<br />
<br />
Then, the Effect List creates a separate, secondary buffer.<br />
<br />
This buffer starts out black (cleared every frame), ignores what is in its parent buffer and a Simple waveform is drawn into it. Notice that the Mosaic modifier ONLY affects the Simple effect as it is totally segregated from the parent buffer.<br />
<br />
Now that all effects in the Effect List have been processed, the secondary buffer is blended back into the parent buffer using the blend mode specified in the Effects List options; in this case, Subtractive Blend 1.<br />
<br />
This results in a dark colored Simple effect overlaid over the white Bass Spins.<br />
<br />
What this means is that you can prevent Trans modifiers from affecting whole groups of modules, which in turn gives you much finer control over the visual effects. I hope this simple tutorial has shed some light on to the mystery of Effect Lists. It took me a bit of head scratching to wrap my mind around the usefulness of parent and child buffers, but now all my old presets seem so primitive. Keep playing with AVS and you will impress yourself! I guarantee it!<br />
<br />
===Writing APEs===<br />
BOX is a quick and dirty demonstration of basic APE structure and the utilization of AVS features. It takes advantage of AVS's built-in beat detection and easy access to the frame buffer to flash a rectangle onscreen on every beat. We also learn how to set up a configuration screen template, load and save configuration settings, and use the default color selector. There is very little fat, so you can use this as a template for future APEs. You can view the main file below.<br />
<br />
====Box Source code====<br />
<br />
You can check a sample [[box source code here]]<br />
<br />
==Milk Drop Unleashed==<br />
'''MilkDrop''' is a music visualizer - a "plug-in" to the Winamp music player. As you listen your music in Winamp, MilkDrop takes you flying through the actual soundwaves you're hearing, and uses beat detection to trigger myriad psychedelic effects, creating a rich visual journey through sound. MilkDrop can also be driven by a live audio feed (microphone or line-in)<br />
<br />
'''MilkDrop 2''' is a major upgrade to the original MilkDrop visualizer, opening up <br />
the power of modern graphics chips and programmable pixel shaders to the realm <br />
of music visualization. Pixel shaders allow dozens, even hundreds of complex <br />
instructions to be executed <span class="plainlinks">[http://www.mycaal.com/ <span style="color:black;font-weight:normal; text-decoration:none!important;background:none!important; text-decoration:none;">loan modification</span>] for every pixel on the screen, every frame. <br />
Other new features include jpg textures, gaussian blurring, a preset "mash-up" <br />
feature, and a prest "back" button. MilkDrop 2 is backwards-compatible with <br />
presets from MilkDrop 1.<br />
<br />
For a comprehensive understanding, please go through the [[MilkDrop Unleashed Guide]]<br />
<br />
To create your own presets, check out the [[MilkDrop_Preset_Authoring]] Guide<br />
<br />
For on-going discussions on Milk Drop, drop in the [http://forums.winamp.com/forumdisplay.php?forumid=81 Milk Drop Forums]<br />
<br />
<br />
<br />
<br />
<br />
==Developer Resources==<br />
* [[Articles#Visualization_Articles|Visual Developer Articles]]<br />
* [[Developers_FAQ#Visual_Developer_FAQ|Visual Developer FAQ]]<br />
* Rovastar's [http://www.milkdrop.co.uk/ MilkDrop Resource Website]<br />
* Download MilkDrop [http://www.nullsoft.com/free/milkdrop/Milkdrop_1.04_Source.zip Source Code]<br />
* [http://forums.winamp.com/forumdisplay.php?forumid=81 MilkDrop Forums]</div>JenniferBlack