Old 27th November 2002, 18:44   #201
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
O, you did? Oh, well, the last post went to waste.
BTW this is the 200th post!!
hammerhead is offline   Reply With Quote
Old 1st December 2002, 14:38   #202
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Ok everyone, I have started making yet another script. I probably have everything wrong, because I did not have any other scripts to find code actions from, as I think this is the first of its kind. Can someone please help?
(it is to rotate a whole group)
code:

#include "../../../lib/std.mi"

Global Button rotateBtn;
Global Boolean rotateDown;
Global Group rotateDraw;

System.onScriptLoaded()
{
rotateDraw = System.getContainer("main").getLayout("normal").getObject("rotate.gp");
rotateBtn = getObject("rotate.button");
}

rightBtn.OnLeftClick()
{
onClick.rotateBtn {
rotateDraw.RotateDegrees(120); //The amount of degrees to rotate on the click of the button
}



thanks,
hh
hammerhead is offline   Reply With Quote
Old 1st December 2002, 17:55   #203
Da_Pipe
Senior Member
 
Join Date: Sep 2002
Location: Home
Posts: 317
Send a message via ICQ to Da_Pipe Send a message via Yahoo to Da_Pipe
code:
#include "../../../lib/std.mi"

Global Button rotateBtn;
Global Boolean rotateDown;
Global Group rotateDraw;

System.onScriptLoaded()
{
rotateDraw = System.getContainer("main").getLayout("normal").getObject("rotate.gp");
rotateBtn = getObject("rotate.button");
}

rotateBtn.onLeftClick()
{
rotateDraw.RotateDegrees(120); //The amount of degrees to rotate on the click of the button
}



here is what it should look like, but the red highlighted action doesn't exist, to my knowledge.

hammerhead, this is just a suggestion but why don't you look in std.mi when you start a script to see if what you are "coding" is even code?

Blah!
Da_Pipe is offline   Reply With Quote
Old 1st December 2002, 18:29   #204
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
hmmm... sorry, I didnt even know std.mi contained that!
hammerhead is offline   Reply With Quote
Old 1st December 2002, 18:45   #205
Da_Pipe
Senior Member
 
Join Date: Sep 2002
Location: Home
Posts: 317
Send a message via ICQ to Da_Pipe Send a message via Yahoo to Da_Pipe
i just thought it might help you if you would look. when i start to code i have std.mi open, RhinoTrip's site , and any examples i can find. it make it easier to code if you can find what you're looking for and how to use it.

Blah!
Da_Pipe is offline   Reply With Quote
Old 12th December 2002, 20:57   #206
Digitalhigh
Guest
 
Posts: n/a
Okay, so, we've all seen the clever little script for MMD3 that does the snazzy vis. I was wondering if somebody felt like coding something a little simpler, something that reads the vu meter and then sets the alpha of a designated layer accordingly? The result desired is just a layer that flashes to the music. Like in hammerhead's moonkore skin, only done without those godforsaken anims. Anybody? Anybody at all??
  Reply With Quote
Old 12th December 2002, 22:36   #207
xenosomething
Major Dude
 
xenosomething's Avatar
 
Join Date: Sep 2002
Location: ?
Posts: 1,473
Quote:
Originally posted by Digitalhigh
Okay, so, we've all seen the clever little script for MMD3 that does the snazzy vis. I was wondering if somebody felt like coding something a little simpler, something that reads the vu meter and then sets the alpha of a designated layer accordingly? The result desired is just a layer that flashes to the music. Like in hammerhead's moonkore skin, only done without those godforsaken anims. Anybody? Anybody at all??

layer.setalpha(system.getleftvumeter());


would that work?
xenosomething is offline   Reply With Quote
Old 12th December 2002, 22:52   #208
Digitalhigh
Guest
 
Posts: n/a
It looks right, but my biggest question is that of the scale on the VU? What's the max value? If it's 255, then that should work. What would trigger it tho? Set a variable that is equal to the current VU setting, and then have it compare that value to the VU itself?

if (vuvalue != getleftvumeter()){
layer.setalpha(system.getleftvumeter());
}

I'm thinking a timer is needed somewhere too? Does this look remotely correct?
  Reply With Quote
Old 12th December 2002, 23:31   #209
xenosomething
Major Dude
 
xenosomething's Avatar
 
Join Date: Sep 2002
Location: ?
Posts: 1,473
max vu meter is 255 for each side(left/right)


timer.setdelay(30);


system.onplay()
{timer.start();}

system.onstop()
{timer.stop();
layer.setalpha(255);
}


timer.ontime()
{layer.setalpha(system.getleftvumeter();}


that seems about right.
xenosomething is offline   Reply With Quote
Old 12th December 2002, 23:36   #210
Hollow
Major Dude
 
Hollow's Avatar
 
Join Date: Oct 2001
Location: Baker Lab, Ithaca NY
Posts: 1,128
Send a message via AIM to Hollow
You should stop the timer on pause and start it on resume as well. There is no reason to keep checking if its paused.

The moon is made of cheese.
Oh for some tasty moon cheese.
www.redtetrahedron.org
Hollow is offline   Reply With Quote
Old 13th December 2002, 00:42   #211
Thrasher
Junior Member
 
Thrasher's Avatar
 
Join Date: Dec 2002
Location: Campbell, California
Posts: 11
Send a message via AIM to Thrasher Send a message via Yahoo to Thrasher
Smile Re: Drawer

Quote:
Drawer
Thanks for the scripts. I had very little trouble getting the drawer script to work, and I am (very very very) fresh to wa3 skinning (less than three days).

Anyway... I have a toggle button and want it to control an EQ drawer. I need to implement the following functionality.

1. Clicking toggles drawer.
2. Button toggle state stays in sync with drawer (e.g closed=image open=downImage)

Here is my button xml:
-------------
[XML] <togglebutton id="Eq" x="227" y="50" image="btn.player.winCall.eq" downImage="btn.down.player.winCall.eq" activeImage="btn.down.player.winCall.eq" tooltip="Equalizer" action="player.main.eq.onLeftButtonUp" param="Eq" />[/XML]
-------------

As you can see I made a feeble attempt at defining an action in my button. Would this work if I defined the function as extern and recompiled drawer.m?

I admit I am completely lost... <user error>
Thrasher is offline   Reply With Quote
Old 13th December 2002, 04:12   #212
Thrasher
Junior Member
 
Thrasher's Avatar
 
Join Date: Dec 2002
Location: Campbell, California
Posts: 11
Send a message via AIM to Thrasher Send a message via Yahoo to Thrasher
Quote:
Originally posted by lakitu42
[B]There's some scripts here as well. They're not precompiled or ready to use, but people should learn some basic stuff...
Hey I just figured out how to make it even easier to compile.

From Internet Explorer, right click on a .m file
Choose "open with"
Then find mc.exe

Then whenever you need to compile your scripts just choose "open with"|"mc" from the explorer right click menu.

Winamp should have given this program an icon...
Thrasher is offline   Reply With Quote
Old 13th December 2002, 04:56   #213
Thrasher
Junior Member
 
Thrasher's Avatar
 
Join Date: Dec 2002
Location: Campbell, California
Posts: 11
Send a message via AIM to Thrasher Send a message via Yahoo to Thrasher
Re: Mute script

I'm not sure how you might fix this (or if you care to).

If mute is activated while you shut down the player, the volume gets saved as zero. Then when you launch the player the volume is zero but the mute is not on and the old volume setting is lost.

Really, it's nothing, but I thought I'd share. :hee:

P.S. frisbeemonkey -> I'm starting to figure this out (thanks to you)... Thank you for all your hard work. I was pretty annoyed at the winamp NSDN site, they should recommend the forums to all users in each of those little holes on the site. Hopefully someday they'll find some nice way to organize all those stray (sometimes punishing) thoughts.
Thrasher is offline   Reply With Quote
Old 15th December 2002, 17:29   #214
ezkiel
Senior Member
 
ezkiel's Avatar
 
Join Date: Dec 2002
Location: Israel
Posts: 188
Send a message via AIM to ezkiel
would you be able to make a dock and undock script for us fellas?
ezkiel is offline   Reply With Quote
Old 16th December 2002, 01:18   #215
thepyr0x
Major Dude
 
thepyr0x's Avatar
 
Join Date: Oct 2001
Location: At my house in a city in Canada
Posts: 1,336
I know how you could fix that mute problem
something to the effect of this
code:

System.OnScriptUnloaded {
Set.Volume = savedvolume
savepref = mute on
}
System.OnScriptLoaded {
if (pref(mute) = on) {
mute = on
}
}


hope that isn't too incoherent for you
I don't know maki too well

thepyr0x is offline   Reply With Quote
Old 16th December 2002, 20:14   #216
Thrasher
Junior Member
 
Thrasher's Avatar
 
Join Date: Dec 2002
Location: Campbell, California
Posts: 11
Send a message via AIM to Thrasher Send a message via Yahoo to Thrasher
Quote:
Originally posted by ezkiel
would you be able to make a dock and undock script for us fellas?
If you are talking about snappoints...

In the object you want to "dock" to just type
code:

<snappoint id="round" x="97" y="21">


replacing x and y coordinates with the snappoints for your components. Replace the id with something that makes sense for you. Then do the exact same for the second object. Be sure that the id's for objects that can snap into place are the same in both components.

It automatically creates docking along those coordinate lines.

Is that what you were looking for...

For a better explanation see (http://www.winamp.com/nsdn/winamp3x/...appoints.jhtml)
Thrasher is offline   Reply With Quote
Old 16th December 2002, 20:26   #217
Thrasher
Junior Member
 
Thrasher's Avatar
 
Join Date: Dec 2002
Location: Campbell, California
Posts: 11
Send a message via AIM to Thrasher Send a message via Yahoo to Thrasher
Re: Re: Drawer

Quote:
Originally posted by Thrasher

I have a toggle button and want it to control an EQ drawer. I need to implement the following functionality....
I modified drawer.m ... I defined a button variable and found it in the script (EqBtn) then
code:

...
// Find button in main group
EqBtnGrp = getScriptGroup().getParentLayout().getObject("main");
EqBtn1 = EqBtnGrp.getObject("eqBtn1");
// Define function to handle the click
EqBtn1.onLeftButtonUp(int x,int y) {
// if toggle button
// Insert toggle code here
// Open/Close Drawer
Drawer.onLeftButtonUp(x,y);
}
...



One thing to watch out for. If you load your drawer group in your conatiner definition before you load the main group and drawer.maki is defined in the drawer group, the script won't see it... I had to change the script and point DrawerGrp to

code:

DrawerGrp = getScriptGroup().getParentLayout().getObject("player.main.eq");



Then I declared the script after all three groups.

To toggle the button when the drawer is closed I added the following line to Drawer.onLeftButtonUp open and close sections respectively.

code:

// open
EqBtn1.setActivated(1);


code:

// close
EqBtn1.setActivated(0);



Anything I forgot? This seems to work perfectly. Thanks again frisbeemonkey for the original drawer script. i couldn't have started scripting without your help.

Last edited by Thrasher; 16th December 2002 at 22:52.
Thrasher is offline   Reply With Quote
Old 20th December 2002, 14:59   #218
KornBizkitNyAz
Member
 
KornBizkitNyAz's Avatar
 
Join Date: Nov 2002
Location: BKLYN WHAT WHAT!
Posts: 65
Send a message via AIM to KornBizkitNyAz
how do i make a vis. a diffrent object? not like in mmd but like we do with volume n seek. just a diff image?
KornBizkitNyAz is offline   Reply With Quote
Old 22nd December 2002, 03:39   #219
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Welcome to the forums, Thrasher. Glad you were able to figure out your drawer problem, sorry I haven't been around in awhile. Good catch on the mute script, I didn't even think of that. I think the best fix would be to set the volume back to where it was when the script unloads if mute is still on. Saving the mute status and the volume wouldn't help if you were switching to a skin without a mute button.

ezkiel, what do you mean by a docking script. If you want to set where things dock together, Thrasher was right, use snap-points. If you want to make two things dock when neither are the main player, look for a docking script by Gonzotek that did something like that. If you want a script that triggers an event when two things dock or undock, I think you are out of luck. As far as I have been able to tell, dock() and undock() don't do anything in 488.

KornBizkit, you can either make a custom vis like in MMD or change the colors of the built-in vis. Unfortunately you cannot change the image any other way.
Hope this helps,
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 24th December 2002, 17:57   #220
Digitalhigh
Guest
 
Posts: n/a
Quote:
Originally posted by KornBizkitNyAz
how do i make a vis. a diffrent object? not like in mmd but like we do with volume n seek. just a diff image?
My god, can you type normally, or are half of the vowels broken on your keyboard or something? Posting in computer ebonics is so 1980's.
  Reply With Quote
Old 25th December 2002, 00:54   #221
Roberto Cuellar
Senior Member
 
Roberto Cuellar's Avatar
 
Join Date: Sep 2002
Location: Santa Cruz, Bolivia
Posts: 243
i'm using the animated volume control script and i don't know is there's a default number of frames in the animated layer or i can make the number of frames that i want, this thread is very helpfull
Roberto Cuellar is offline   Reply With Quote
Old 27th December 2002, 03:09   #222
Roberto Cuellar
Senior Member
 
Roberto Cuellar's Avatar
 
Join Date: Sep 2002
Location: Santa Cruz, Bolivia
Posts: 243
i search this thread and i think that a circular animated seek is not in the colection of scripts so i was wondering if anyone know how to to one???
Roberto Cuellar is offline   Reply With Quote
Old 27th December 2002, 05:13   #223
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Both the animated seek and the seek-using-regions scripts can be used to achieve this. I'd suggest the region script. To make it circular, your gradient map should be done to look like the attached picture. Make it the same height and width of your seek graphic. The region script was made by Da_Pipe and is on page 5 of this thread.
Attached Images
File Type: png circlemap.png (715 Bytes, 798 views)
frisbeemonkey is offline   Reply With Quote
Old 27th December 2002, 05:29   #224
iPlayTheSpoons
Major Dude
 
iPlayTheSpoons's Avatar
 
Join Date: Aug 2001
Location: SJSU
Posts: 1,030
Send a message via AIM to iPlayTheSpoons
hey frisbee....i was wondering if there were anyway i could persuade you too make an animted eqalizer script. i saw the ideas posted a while back, but those just run an animation based on a slider, where as i need one that uses regions. i looked through the volume.m to see if i could figure it out, but this is a little much for me. it just needs to use one animation/map 10 times. i hope you can help me out (massive credits on the new skin!!)
iPlayTheSpoons is offline   Reply With Quote
Old 27th December 2002, 06:01   #225
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Yeah, I could do that. It may be awhile, not gonna be able to spend much time at my computer over the next couple of weeks. The volume script is a good place to start, though. It would really just be a combination of the eq and volume scripts. If you want it really soon, I'd say take a stab at it yourself(although I always recommend that anyways,) otherwise, I'll get to it as soon as I can.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 27th December 2002, 06:54   #226
iPlayTheSpoons
Major Dude
 
iPlayTheSpoons's Avatar
 
Join Date: Aug 2001
Location: SJSU
Posts: 1,030
Send a message via AIM to iPlayTheSpoons
awsome...il try, but thanks!
iPlayTheSpoons is offline   Reply With Quote
Old 10th January 2003, 16:15   #227
mrrabbit
Junior Member
 
Join Date: Oct 2001
Posts: 13
Send a message via ICQ to mrrabbit
Hi

I am currently trying to make a skin of my own and in my skin i have a vumeter and i tried the script that DirtyLowMoFo put up and it works fine. However i would like to know how to remove the flicker.

I never used MAKI before so still trying to learn what functions exist

I know C++ well so that's no problem.

Any ideas what to add?

heres the script:

code:

//beat meter demo by DirtyLowMoFo
//for Winamp3

#include "../../../lib/std.mi"

Global Layer vislayerleft, vislayerright;
Global Timer vistimer;
Global Map vismap;

System.onScriptUnloading() {
delete vistimer;
}

System.onScriptLoaded() {

vistimer = new Timer;
vistimer.setDelay(50);
vistimer.start();
l = new Region;
Group visgroup = getScriptGroup();
vislayerleft = visgroup.findObject("lights.left");
vislayerright = visgroup.findObject("lights.right");

vismap = new Map;
vismap.loadMap("bm.region");

}

vistimer.onTimer() {
region l = new Region;
region r = new Region;

r.loadFromMap(vismap, getLeftVuMeter(), 1);
l.loadFromMap(vismap, getRightVuMeter(), 1);
vislayerleft.setRegion(l);
vislayerright.setRegion(r);
delete r;
delete l;
}



BTW nice topic frisbeemonkey extremely usefull for us new
mrrabbit is offline   Reply With Quote
Old 10th January 2003, 18:37   #228
chenzen
Junior Member
 
chenzen's Avatar
 
Join Date: Nov 2002
Location: outer space.
Posts: 19
Send a message via ICQ to chenzen
hi mrrabbit,

you could have a look at my vu-script (based on dirtylomofo's), the script is located on page 5 of this thread and called toggle-vu.zip

well i did a bargraph-style vu and put three layers with older values of the vu on top of each other (with decreasing alphas..), if you want to have a meter-like vu than you just have to collect more values of the vu, add them up, divide by the number of values and put this to the graphics. it should smoothen the display quite a lot. (it worked with the bargraph..)
chenzen is offline   Reply With Quote
Old 10th January 2003, 22:41   #229
mrrabbit
Junior Member
 
Join Date: Oct 2001
Posts: 13
Send a message via ICQ to mrrabbit
Smile

Hi

*sigh* server crashed on me while i submitted my post, oh well here goes again

I tested your script and it works fine on MP3 files, however WMA seems to be a bit dodgy both the vu-meter will flick and go dsync for about 5 sec or so.

Looked through the script and saw no alpha values of any kind, no "alpha decreasing" as u stated in ur post? Maybe i got the wrong version.

Anyway is there a way to debug scripts in runtime? or debug them at all, i feel sitting with the mc correcting line by line takes a while

BTW i like the error message you get in Winamp when there is an error in the script. Brings back old memories when i was still using my Amiga 500

Thanks!

//Mattias
mrrabbit is offline   Reply With Quote
Old 11th January 2003, 18:38   #230
chenzen
Junior Member
 
chenzen's Avatar
 
Join Date: Nov 2002
Location: outer space.
Posts: 19
Send a message via ICQ to chenzen
mrrabbit,

your're right about the alpha-decreasing. well, in some way. being a photographer my natural tool is photoshop, so i did the alpha-stuff in the graphics. (thanks to the winamp-crew for using the PNG-format!)

the desync might be a dataflow/calculation problem, the VU consumes quite some cpu-power (almost 80% on my P2-400), so if the cpu has to haul all the WMA-data through at the same time, winamp might give the priority to the music. which is okay i think.
i haven't had that problem yet because i don't listen to WMA on winamp.
chenzen is offline   Reply With Quote
Old 11th January 2003, 22:56   #231
mrrabbit
Junior Member
 
Join Date: Oct 2001
Posts: 13
Send a message via ICQ to mrrabbit
Oh now i see the alpha feature, it was the damn WMA that did it

Winamp use 10% of my 2Ghz P4 so CPU power is no problem for me.

Thanks for the tips, though i think Winamp has slight problems with the WMA format, some files won't play and some will only play when doubleclicked from desktop , i guess its Microsofts lack of support , afterall its their format .
mrrabbit is offline   Reply With Quote
Old 13th January 2003, 03:09   #232
Vica
Major Dude
 
Vica's Avatar
 
Join Date: Sep 2001
Location: St. Vincent & the Grenadines
Posts: 872
Send a message via ICQ to Vica Send a message via AIM to Vica Send a message via Yahoo to Vica
Spectrum LayerVis

This is a demo made out of a mod I made for a skin. Its basicly a combination of the old vis from Mercury and Russ's Visdata library. It works just like a regular vis but now you can reduce the number of bars to as many as you want (instead of 18) unfortunately it has no fade out and thats the only drawback.

Peace.
Attached Files
File Type: wal spectrum layervis.wal (18.9 KB, 792 views)


Website: Template vbulletin skins by exaltic.com[size=0.75]
Skins/Coding: D-Shock, Nebular, Triton [/size]
Vica is offline   Reply With Quote
Old 13th January 2003, 17:36   #233
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Cool! What do you mean by no fadeout? Ah yes, I see now. Cant you make another vis with a delay under it to bypass this? and can you control the senctivity?
hammerhead is offline   Reply With Quote
Old 14th January 2003, 19:03   #234
Bizzeh
Forum Pirate
Beta Team
 
Bizzeh's Avatar
 
Join Date: Oct 2001
Posts: 2,032
should have posted this in here, but i didnt , check botom of this post
Bizzeh is offline   Reply With Quote
Old 15th January 2003, 16:51   #235
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
cool thx
hammerhead is offline   Reply With Quote
Old 15th January 2003, 18:07   #236
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Da_pipe, are you sure there isnt a problem with your regionvolume script? I've been trying to get it to work, but to no avail...
(obviously not gurus, more like gfx working badly)
Thanks,
-hh
hammerhead is offline   Reply With Quote
Old 15th January 2003, 18:19   #237
Da_Pipe
Senior Member
 
Join Date: Sep 2002
Location: Home
Posts: 317
Send a message via ICQ to Da_Pipe Send a message via Yahoo to Da_Pipe
It was working ok when i posted it. no else has said anything about problems. did you get the one with the fixes? http://forums.winamp.com/attachment....&postid=773576
i'm not sure, if you want i'll take a look at it. i'm pm you my e-mail.

Blah!
Da_Pipe is offline   Reply With Quote
Old 16th January 2003, 13:34   #238
Da_Pipe
Senior Member
 
Join Date: Sep 2002
Location: Home
Posts: 317
Send a message via ICQ to Da_Pipe Send a message via Yahoo to Da_Pipe
There is an error in the Volume Using Regions. when it loads the map it's trying to load the wrong one. the problem is:
volMap.loadMap("player.shade.map.volume")
it should be
volMap.loadMap("player.map.volume");.
Sorry about the error, i should have seen it earlier.

Hammerhead, i e-mailed you back.

Blah!
Da_Pipe is offline   Reply With Quote
Old 16th January 2003, 16:23   #239
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Thanks da_pipe!
hammerhead is offline   Reply With Quote
Old 16th January 2003, 18:12   #240
PJay Tycy
Senior Member
 
Join Date: Jan 2002
Posts: 252
If you want to check which settings you need for your layer fx to work properly, or you just want to test it fast, you can use the addon I wrote for it.

For more info, check this thread:
http://forums.winamp.com/showthread....hreadid=121551


PJay
PJay Tycy 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