Old 5th December 2007, 18:00   #1
E-Trance
Senior Member
 
Join Date: Oct 2005
Location: Russia
Posts: 164
Send a message via ICQ to E-Trance
Lightbulb Smooth VU meter MAKI

This script is to smoothly animate an analog-style VU meter. Based on rotation of layer. The main advantage is new method of calculation of intermediate frames. There is no difference in time to turn the needle by 5 degrees or to turn it by 50 degrees. It is more close to realistic look than any method of animation using AnimatedLayer. Usage described in vu.m file. See it in the example skin attached here.

(meaningless ) screenshot of the example skin:


Was also used here
Attached Files
File Type: wal vutest.wal (18.9 KB, 1737 views)
E-Trance is offline   Reply With Quote
Old 5th December 2007, 22:34   #2
RandomCarpet
Senior Member
 
RandomCarpet's Avatar
 
Join Date: Sep 2002
Location: BG
Posts: 265
Nice.
I have been experimenting with visualizations that use layer rotation (the rotationlayer.m library as a base), but in my case that method turned out to be much more CPU intensive than the AnimatedLayer approach. Your test skin's CPU usage is insignificant, did you somehow improve the rotationlayer.m rotation algorithm?

Latest skin: fCrcl
RandomCarpet is offline   Reply With Quote
Old 6th December 2007, 12:02   #3
E-Trance
Senior Member
 
Join Date: Oct 2005
Location: Russia
Posts: 164
Send a message via ICQ to E-Trance
May be I did. But I think that graphics optimization is more important for efficient CPU usage. There also could be some idle frames in your method (these was in old version of my method).
E-Trance is offline   Reply With Quote
Old 11th December 2007, 21:19   #4
Michgelsen
Major Dude
 
Michgelsen's Avatar
 
Join Date: Oct 2003
Location: Netherlands
Posts: 1,416
Very interesting! I tried the same thing once, building an analog vu with layerfx, but lost interest. I'm more into the led VUs.
Since VUs are the only reason why I once started skinning, I'm always eager to see how others build them. I like your approach. However, they miss the realistic feel and I think I know why: the direction changes are evenly fast to the left and to the right. To have a realistic feel to it, you need the needle to react almost instantaneously to the beats, but then have a slow decay. Your VU can be flipped horizontally and still look the same, or so it seems. Fix that, and you built the greatest analog vu ever.
I hope you can do something with my constructive criticism.
Michgelsen is offline   Reply With Quote
Old 11th December 2007, 21:27   #5
E-Trance
Senior Member
 
Join Date: Oct 2005
Location: Russia
Posts: 164
Send a message via ICQ to E-Trance
You're right. Thanks a lot! I already thought about and will try to make it more realistic
E-Trance is offline   Reply With Quote
Old 11th December 2007, 21:38   #6
Michgelsen
Major Dude
 
Michgelsen's Avatar
 
Join Date: Oct 2003
Location: Netherlands
Posts: 1,416
Great! Make sure to upload the improved version here.
Michgelsen is offline   Reply With Quote
Old 11th December 2007, 22:28   #7
fille1000
Member
 
Join Date: Apr 2007
Posts: 63
Wow! It looks really good already, but I agree that it could me bade a little more realistic. If you could make this a vis-plugin it would be great!
fille1000 is offline   Reply With Quote
Old 12th December 2007, 02:04   #8
QuadHeliX
Major Dude
 
QuadHeliX's Avatar
 
Join Date: Jan 2003
Location: Washington State
Posts: 1,133
Sweetness! would like to use this in some skins at SC.
QuadHeliX is offline   Reply With Quote
Old 12th December 2007, 09:39   #9
martin.deimos
Android/UI Development
 
martin.deimos's Avatar
 
Join Date: Sep 2004
Location: Bavaria
Posts: 1,242
Send a message via ICQ to martin.deimos Send a message via AIM to martin.deimos Send a message via Yahoo to martin.deimos
common quad, push a nice layout for this

WebSite: www.skinconsortium.com - Community for Userinterface Design & Coding
Skins: Click Here
martin.deimos is offline   Reply With Quote
Old 12th December 2007, 13:50   #10
E-Trance
Senior Member
 
Join Date: Oct 2005
Location: Russia
Posts: 164
Send a message via ICQ to E-Trance
Here is an update (v1.1):
Animation code rewritten. Now more realistic, more accurate and more flexible
  • Separate motion speed when rising and when falling down
  • Really accurate turning. Will turn exactly beetween 20 and 160 degrees if you define 70 as a limit etc.
  • Four new modes - Exponential, Hybrid (Exp+Lin), Hybrid (Log+Lin) and Logarithmic (v1.0 - Linear only)
  • Ability to turn whole "VU-engine" by any angle and to invert its direction
Also fixed needle in example skin (it was raised by 10 "superfluous" pixels)

The only and a insignificant problem is non-true logarithmic mode. It's just emulated by another function (square root) because there are no logarithmic functions in freeform skin engine for maki.

VU's modes (logarithmic is only to compare with its analogue):
Attached Files
File Type: wal vutest.wal (22.4 KB, 554 views)

Last edited by E-Trance; 12th December 2007 at 14:13.
E-Trance is offline   Reply With Quote
Old 12th December 2007, 17:23   #11
martin.deimos
Android/UI Development
 
martin.deimos's Avatar
 
Join Date: Sep 2004
Location: Bavaria
Posts: 1,242
Send a message via ICQ to martin.deimos Send a message via AIM to martin.deimos Send a message via Yahoo to martin.deimos
lemme know which logarithmic function you'll need and i will add it for 5.51

WebSite: www.skinconsortium.com - Community for Userinterface Design & Coding
Skins: Click Here
martin.deimos is offline   Reply With Quote
Old 12th December 2007, 17:52   #12
E-Trance
Senior Member
 
Join Date: Oct 2005
Location: Russia
Posts: 164
Send a message via ICQ to E-Trance


This should be a logarithm of an arbitrary base if possible:
double log(double val, double base);

Or (if it's impossible) a natural logarithm (because it is almost in any library):
double ln(double val);
E-Trance is offline   Reply With Quote
Old 12th December 2007, 17:56   #13
martin.deimos
Android/UI Development
 
martin.deimos's Avatar
 
Join Date: Sep 2004
Location: Bavaria
Posts: 1,242
Send a message via ICQ to martin.deimos Send a message via AIM to martin.deimos Send a message via Yahoo to martin.deimos
as soon 5.51 is out i will update WaSDP
and it will hold:
log10 --> logarithm to base 10
ln --> logarithm to base e (logarithmus naturalis)

you can creaty any log you want by using this:

log(double arg, double base) = ln(double arg) / ln(double base)

WebSite: www.skinconsortium.com - Community for Userinterface Design & Coding
Skins: Click Here
martin.deimos is offline   Reply With Quote
Old 12th December 2007, 18:40   #14
SLoB
Major Dude
 
SLoB's Avatar
 
Join Date: Jul 2003
Location: UK
Posts: 1,316
looks cool with the various modes!!
I'll have to play with this idea in the rotational viz in Azenis.
Although this type of analog vu meter doesnt really cope with grouping of lots of needles, thats also another method of grouping vu levels to keep lots of meters moving smoothly too.
SLoB is offline   Reply With Quote
Old 12th December 2007, 19:55   #15
E-Trance
Senior Member
 
Join Date: Oct 2005
Location: Russia
Posts: 164
Send a message via ICQ to E-Trance
Thank you Martin!

Here is an another update. This is the version adapted for AnimatedLayer. Uses the same methods of animation as previously. The script can process any number of frames. Look at the example skin - both 64-frames and 13-frames animations are moving simultaneously. You can even compare 255-frames AnimatedLayer with the 10-frames one - they will have equal motion speed anyway.

Screenshot of the example skin
Attached Files
File Type: wal vutest2.wal (11.5 KB, 657 views)
E-Trance is offline   Reply With Quote
Old 29th December 2007, 15:15   #16
Michgelsen
Major Dude
 
Michgelsen's Avatar
 
Join Date: Oct 2003
Location: Netherlands
Posts: 1,416
I've been away for a while, but damn this is awesome! That last 64 frame version especially.
Response to beats is great, smoothness is great, CPU usage is low=great, overall superb!
Michgelsen is offline   Reply With Quote
Old 31st December 2007, 13:57   #17
Michgelsen
Major Dude
 
Michgelsen's Avatar
 
Join Date: Oct 2003
Location: Netherlands
Posts: 1,416
I found this trick the best part of the whole thing:
PHP Code:
if (chlev levellevel += ((chlev level)/steps_up); 
This is the part that causes the decay to not be determined by the number of frames and make the VU decay slowly when the difference is small, while at the same time keeping it fast when the difference is large. Really clever.

I have a question though. Do any of you play .flac files frequently? If so, do you notice a little bit of lag on the VUs? I have the feeling that something in the flac plugin causes the timer of the VU to be disturbed. mp3s don't cause this behaviour. Just curious whether anybody noticed this too.
Michgelsen is offline   Reply With Quote
Old 6th October 2008, 16:56   #18
bodhicoyote
Junior Member
 
Join Date: Sep 2008
Posts: 37
Re: Smooth VU meter MAKI

Quote:
Originally posted by E-Trance
Was also used here
[Image] [/B]
Total noob here. Would you please also post the EPS skin, so I can see how you incorporated the VU meters? Many thanks!
bodhicoyote is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump