Old 3rd November 2004, 21:47   #1
Epsylon
Junior Member
 
Epsylon's Avatar
 
Join Date: Jul 2004
Location: Lithuania, Vilnius
Posts: 49
Exclamation Need help with Vis script

I've tried to make a custom visualization bar with the following code (the bar AnimatedLayer has 10 frames):

#include <lib/std.mi>

global AnimatedLayer bar;
global Int avr;
global Timer t;

System.onScriptUnloading(){}

System.onScriptLoaded(){
group n_group = getScriptGroup();
bar = n_group.findobject("vis.nine.bar");
avr = system.getVisBand(1,39);

t = new Timer;
t.setDelay(10);
t.start();
}

t.onTimer(){
if (!bar.isPlaying())
bar.setStartFrame(avr);
avr = system.getVisBand(1,39);
bar.setEndFrame(system.getVisBand(1,39));
bar.play();
}

,but all the bar does is jump up to frame 2. Is it because of the value getVisBand returns or is the script wrong? Please help out.
Epsylon is offline   Reply With Quote
Old 4th November 2004, 10:38   #2
-=RoNtZ=-
Major Dude
 
-=RoNtZ=-'s Avatar
 
Join Date: Feb 2002
Location: Universe > Milkyway > Sol > Earth > Europe > Germany > Bavaria > Near Nuremberg
Posts: 1,346
Send a message via ICQ to -=RoNtZ=- Send a message via AIM to -=RoNtZ=- Send a message via Yahoo to -=RoNtZ=-
i don'T get what you're trying in the timer.
first of all, there are { }-brackets missing around the "if".
i'D try it otherwise:

t.ontimer() {
if (system.getStatus() == 1) {
avr = system.getVisBand(1,39);
bar.gotoFrame(avr*(255/bar.getLength()));
}
}

though i'm not totally sure if that's working. has been a while since i was working with framed vises.

Frozen skins: Gravestone Betaskins: Mushroom ::-:: The Claw
In development: TechnodropFinished: Draculas Helmet (<-- still waiting for some color themes!) ::-:: Hal's eye
-=RoNtZ=- is offline   Reply With Quote
Old 4th November 2004, 12:19   #3
SLoB
Major Dude
 
SLoB's Avatar
 
Join Date: Jul 2003
Location: UK
Posts: 1,316
you could always add the result to your songticker as a debug if unsure of the results
SLoB is offline   Reply With Quote
Old 4th November 2004, 13:19   #4
-=RoNtZ=-
Major Dude
 
-=RoNtZ=-'s Avatar
 
Join Date: Feb 2002
Location: Universe > Milkyway > Sol > Earth > Europe > Germany > Bavaria > Near Nuremberg
Posts: 1,346
Send a message via ICQ to -=RoNtZ=- Send a message via AIM to -=RoNtZ=- Send a message via Yahoo to -=RoNtZ=-
do you mean him or me?

Frozen skins: Gravestone Betaskins: Mushroom ::-:: The Claw
In development: TechnodropFinished: Draculas Helmet (<-- still waiting for some color themes!) ::-:: Hal's eye
-=RoNtZ=- is offline   Reply With Quote
Old 4th November 2004, 19:45   #5
SLoB
Major Dude
 
SLoB's Avatar
 
Join Date: Jul 2003
Location: UK
Posts: 1,316
lol
its his script
but its a good idea boshing a quick value into the songticker for any1
SLoB is offline   Reply With Quote
Old 4th November 2004, 20:03   #6
-=RoNtZ=-
Major Dude
 
-=RoNtZ=-'s Avatar
 
Join Date: Feb 2002
Location: Universe > Milkyway > Sol > Earth > Europe > Germany > Bavaria > Near Nuremberg
Posts: 1,346
Send a message via ICQ to -=RoNtZ=- Send a message via AIM to -=RoNtZ=- Send a message via Yahoo to -=RoNtZ=-
*G* yes it is, but i also posted one
i do, sometimes, but at the moment even this doesn't help *getting sick*

Frozen skins: Gravestone Betaskins: Mushroom ::-:: The Claw
In development: TechnodropFinished: Draculas Helmet (<-- still waiting for some color themes!) ::-:: Hal's eye
-=RoNtZ=- is offline   Reply With Quote
Old 9th November 2004, 19:03   #7
Epsylon
Junior Member
 
Epsylon's Avatar
 
Join Date: Jul 2004
Location: Lithuania, Vilnius
Posts: 49
quick info

Quote:
first of all, there are { }-brackets missing around the "if".
Silly me, of course they are.
Anyway I figured out how to make the .getVisBand command work properly.
It's a bit odd really, because the best result for a 10-framed vis I got was when I divided the value getVisBand returned by 12.75 (not 25.5, as first expected).
Oh and another thing, you need to group several frequencies of bands together for each band and try to return an average value, 'cause specific bands have a tendency to stay on zero while those beside them are hoppin'.
This is bizzare, but at least working.
Epsylon is offline   Reply With Quote
Old 9th November 2004, 19:31   #8
-=RoNtZ=-
Major Dude
 
-=RoNtZ=-'s Avatar
 
Join Date: Feb 2002
Location: Universe > Milkyway > Sol > Earth > Europe > Germany > Bavaria > Near Nuremberg
Posts: 1,346
Send a message via ICQ to -=RoNtZ=- Send a message via AIM to -=RoNtZ=- Send a message via Yahoo to -=RoNtZ=-
don'T use the visbands, use "system.getleftvu(){}", this is always a bit higher than the highest peak of the visbands.and just one value ;D

Frozen skins: Gravestone Betaskins: Mushroom ::-:: The Claw
In development: TechnodropFinished: Draculas Helmet (<-- still waiting for some color themes!) ::-:: Hal's eye
-=RoNtZ=- 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