PDA

View Full Version : Smart Play in Winamp



Ron
October 13th, 2002, 04:55 PM
!= doesn't work ? I'm not sure did you try <> also ?

Ron
October 13th, 2002, 04:55 PM
What Girder version are you using ?

Ron
October 13th, 2002, 04:55 PM
The problem is this discussion uses GVMS ( Girder 3.2.4 < ) the girder version on the frontpage (3.2.5preX) uses Lua as the scripting language, that means you'll need to change the statements a little:

If you are using Variable Manipulation script in Girder 3.2.5preX +



result = &#40;pptemp == 0&#41;

Ron
October 13th, 2002, 04:55 PM
I have no idea what you are talking about. Upload a SMALL and relevant portion of the GML file so we can have a look.

Ron
October 13th, 2002, 04:55 PM
Looks like you are trying to create a toggle by two means at the same time.

1. By using States
2. By using info from the winamp Sendmessage

Solve: remove the states settings on the play and pause command.

(remove means set them to statecount = 1 )

GoldServe
October 13th, 2002, 04:55 PM
Works Great!
I extended it a little further. Just a tad!

Smart Play
|_> Check Status
|_> If Stopped -> Play
|_> If Playing -> Pause
|_> If Paused -> Pause

If anyone wants to know how this was accomplished, you can post a message here!

ombre42
October 13th, 2002, 04:55 PM
Thanks to the new "Save Result in Girder Register" feature in SendMessage 1.51, you can now avoid restarting the song in Winamp by hitting the play button on your remote.
In your winamp group, create a new multicommand called "Smart Play" or something
In that multigroup add these 2 commands:
"Test Play Status" - Select the sendmessage plugin and use the settings (Msg#=1024,wP=0,iP=104,save result to reg 1) and Target Class=Winamp 1.x (of course)
"If stopped or paused play" - Girder Action/Check Reg (Register=1,Icon/Device="==1",on the second "browse" button, browse to your previous play command)

Then learn event on the "smart play" multigroup-i.e. press play button

Remove the event string for your play function (right click - "Clear Event String")

If you want to look into doing more fancy things like this with Winamp functions that return int's check out http://www.winamp.com/nsdn/winamp2x/dev/sdk/FRONTEND.H
and remember WM_WA_IPC = WM_USER = 1024

Kevin
_________________
Girder rulez! What can't it do?
**I use X-10 Univ.Remote(UR47A) and PC Rcv.(MR26a)via Gen. Serial Plg. under WinXP

<font size=-1>[ This Message was edited by: ombre42 on 2002-01-25 11:40 ]</font>

ombre42
October 13th, 2002, 04:55 PM
nope <>1 does not working either, but I didn't know jack about using the registers. The second target command is for when the expression evaluates to false (didn't know that). I hope the girder action section gets filled in on the online help soon, probably would reduce support via forums. btw, <> is from Delphi, and inherited from Pascal?
I'm going to edit the post at the top now. Ron you rule. I don't know how you find the time to respond to sooo many posts.

Kevin

ombre42
October 13th, 2002, 04:55 PM
nice!! note to others on GoldServe's setup-remember Winamp's Pause is a toggle(confused me at first).
That eliminates the need for a pause button (good for all those PB remote and homead IR getups).
GoldServe-you could do that quicker by condensing the last three commands into one:
test reg with '==0'
->True(top browse button) goto Play
->False(bottom browse button) goto Pause

Kevin
_________________
Girder rulez! What can't it do?
**I use X-10 Univ.Remote(UR47A) and PC Rcv.(MR26a)via Gen. Serial Plg. under WinXP

<font size=-1>[ This Message was edited by: ombre42 on 2002-01-25 16:31 ]</font>

NaKeD
October 13th, 2002, 04:55 PM
well hello there everybody

i have the girder 3.2.4 and i tried to do the above...
it didnt go so well so i came up to a work relative: :D

instead of:


"Test Play Status" - Select the sendmessage plugin and use the settings (Msg#=1024,wP=0,iP=104,save result to reg 1) and Target Class=Winamp 1.x (of course)

i used the following:
Msg#=1024,wP=0,iP=104,save result to reg myevent

after that, instead of:


"If stopped or paused play" - Girder Action/Check Reg (Register=1,Icon/Device="==1",on the second "browse" button, browse to your previous play command)

i used the following:
"If stopped or paused play" - Girder Action/Variable Manipulation Script (Icon/Device="comp = (myevent == 0);"), on the first "browse" button, browse to your previous play command, on the second "browse" button, browse to your previous pause command.

that's it! it's working fine and i love it.
it toggle between play/pause in one button.

hope i help someone out there, enjoy...

phinsman
October 13th, 2002, 04:55 PM
Hey...

Just wanted to thank you for the Play/Pause (all of you...)

However, I only got NaKeD's method to work. The register methods didn't work for me either.

Thanks!
Dale

kop48
October 13th, 2002, 04:55 PM
hmmm i cant get this to work... I tried naked's method, but it only ever goes to pause :(:(..

BTW I'm a girder newbie, so I'm trying to figure out how to use this program :D
Here's what I did:
Setup a MG called p/p
Gave it an eventstring (my play pause button on Creative RM=900)
Created a command called TestStat with SendMessage set to:
Message No: 1024
wP: 0
iP: 104
Save: pptemp
Then cre8ed a new command called ExecCom with settings:
Girder -> Var Man Script ->
set first to my play command
second to my pause command
and set script to:
comp = (pptemp == 0);

But it only ever goes to pause :(:(
The only other way I've managed to get this to work is to create a MG with two commands, play and pause each with state ends of 2 and one starting on 1 and the other on 2. But if winamp is stopped, then i need to press it twice to get it to play, so I'd much rahter doing it this way... It would be much appreciated if some1 could give us a hand wid this...

I know this forum is only for tips, but since this was directly relating to this, then i simply replied to it. If you dont like it, then feel free to move it to general forum.. :D

kop48
October 13th, 2002, 04:55 PM
the latest on front page.....
actually... i havent tried it with that.. i was using the one before it when i tried this :S:S:S
/me shoots himself in the head :S

kop48
October 13th, 2002, 04:55 PM
ahhh makes much more sense now ... ;) thanx for that :D much appreciated

kop48
October 13th, 2002, 04:55 PM
hmmm now, it switches between pause and my Exec Command and I have to press it twice for it to work :S It stitches fine tho

Ok what it does it switches between ExecCom, pause, ExecCom, play, ExecCom everytime i press the button (as in step by step, not all @ once :P) I'm guessing this is something to do with how Girder handles and checks the variable, but I don't get why it just stops @ exec, it SHOULD go to either or of the commands.... maybe a bug? or maybe im an idiot :)

kop48
October 13th, 2002, 04:55 PM
ok i didnt bother to explain myself here cause i was simply following on from the previous posts... The test stat command is called TestStat and that queries Winamp for the play state. The next command cre8ed was ExecCom, which tested the variable that SendMessage popped out and executed either a play command (send x to winamp) or pause command (send c to winamp) using a GVM. However, it doesnt switch between the two as it should:
First press: starts to play WA
2nd: does nothing, but Girder shows the the command executed was ExecCom (From above)
3rd: pauses
4th: execom
5th: play

and heres the file as well

kop48
October 13th, 2002, 04:55 PM
lol!!! i forgot i'd left them on from before... im an idiot :D:D:D:

thanx for that :D

debennett2
February 4th, 2003, 01:49 PM
Out of curiousity, what graphical interface are you guys using in order to control winamp? I'd like to setup something from my PC to my TV much like what I do when I record video/audio and playback on the TV (Using Snapstream and girder). The problem being that there is little out there that I can find that is usable. What I need is something that is completely functional in girder and is big enough to provide feedback to a television.

Also, on another note, I am currently using an X10 RF serial device..this is limiting me in many ways and I would love to get a serially-attached IR device to replace it. I do however need something that I can add at least 25 feet of self-made serial cable to in order for ir to be effective in the livingroom (I plan to make it out of CAT5). Is there an IR deivce that will work under long spans like that? I'd love to setup my Pronto (which requires IR) to get a better and girlfriend/wife-friendly interface incorporated. Any help would be greatly appreciated. Thanks!

Liickdude
April 3rd, 2003, 11:42 AM
I am trying to figure out something that is maybe a little different from this but it sounds like you guys are the ones to ask. I want to control the Equalizer in winamp using only up/down/left/right buttons on the remote. I would like to be able to move forward and backward through the bands with left/right keys on the remote, and move the sliders with the up/down on whatever band I have selected. This is proving to be beyond my non-existent programming skills. has anyone done this, can you post or send me a .gml Thanks in advance! ':wink:'

heecrak
April 3rd, 2003, 10:02 PM
hey liickdude, let me know when you figure this one out :D

heecrak
April 3rd, 2003, 11:09 PM
this kinda looks like the same idea:
http://www.girder.nl/phpBB2/viewtopic.php?t=4057

nulleman
April 24th, 2003, 01:06 PM
I've tried some of the tips in this thread but nothing work for me. Maybe I'm doing it wrong, thats why I need some help now.

I'm using girder 3.2.8
The 2 tips I've tested without positive result is these two:
1.
"Test Play Status" - Select the sendmessage plugin and use the settings (Msg#=1024,wP=0,iP=104,save result to reg 1) and Target Class=Winamp 1.x (of course)
"If stopped or paused play" - Girder Action/Check Reg (Register=1,Icon/Device="==1",on the second "browse" button, browse to your previous play command)

2.
Msg#=1024,wP=0,iP=104,save result to reg myevent
"If stopped or paused play" - Girder Action/Variable Manipulation Script (Icon/Device="comp = (myevent == 0);"), on the first "browse" button, browse to your previous play command, on the second "browse" button, browse to your previous pause command.


One problem that I have is that I dont know how I would write the script in the script editor. Is it everything inside these tags?<(Icon/Device="comp = (myevent == 0);")> I'm getting an error then, i does not accept the / between Icon and Device.

Please help me

Liickdude
July 9th, 2003, 12:33 PM
Holy cow, it works! I actually figured this out.....
Girder making sense......fog lifting......getting clearer....

I think I can actually master this thing if given enough time. I think I even know how to do the EQ controls though simple up/down/left/right using enable and disable multigroups. Girder is even cooler once you start to figure it out. :wink:

Cadish
December 22nd, 2003, 03:29 PM
Can any1 just make a .gml file? I can't get it to work... :oops:

Cadish
December 23rd, 2003, 02:08 AM
The problem is: when i use for Icon/Device "==1", it always use Pause. And if I use for Icon/Device "==0", it always use Play... :(

PS * I'm using Winamp5
* The method of NakeD doesn't work neither

thracx
December 24th, 2003, 09:52 PM
I also cannot get this 'SmartPlay' function to work. I have tried basically everything that I can see from this thread, and from what I can gather, the problem is with Winamp always returning a 1 from our SendMessage save (the variable in the variable display always remains the same, no matter what status Winamp is in).

I am using Girder 3.2.9b, WinXP Pro SP1, and Winamp 5.01. The last post in this thread with a problem also is using Winamp 5, perhaps that is the culprit?

thracx
December 29th, 2003, 05:26 PM
I got 'SmartPlay' to work (finally) using the 'Variable Manipulation Script' method described earlier. I had lots of problems (I am using Winamp 5.01, WinXP, Girder 3.2.9b), but managed to get it to work after installing Winamp 2.91 and testing with that. After I got it to work in 2.91, I loaded up 5.01 and it worked...

I remember at least one person wanted a file, so a .gml file is available at:
http://mason.gmu.edu/~tfemino/Files/GirderSettings.rar

Edit: The above URL has changed.

Please post your results from using my .gml file. The file includes all the Girder code for my MS Office Keyboard, WinFast Remote Control, and for Winamp (2.x & 5.01...). If all you want is SmartPlay, you can find it under:
"Office Keyboard" -> "Left Panel" -> "Copy - SmartPlay"

Edit: Notice - The above location has changed.

Please note that the 'Play' and 'Pause' commands below the SmartPlay MultiGroup are REQUIRED for SmartPlay to work (unless you change it, of course).

Thanks to GoldServe, NaKeD, ombre42, RonB, and the others who helped in this thread!

Santa
December 29th, 2003, 06:00 PM
thracx I just tried your group out it didn't do anything at first, but when I removed the send only send to first match in the target settings, for the play and pause commands, and wupti it worked for me :)

But thx for making the group, it was much easier than to read alll the other posts :)

thracx
December 29th, 2003, 06:29 PM
thracx I just tried your group out it didn't do anything at first, but when I removed the send only send to first match in the target settings, for the play and pause commands, and wupti it worked for me :)



Yeah, I've noticed that it doesn't always work (for example, sometimes when I start up Winamp, I have to click on it at least once before it will start to work, then it works regardless of anything [at least for me it does] )



But thx for making the group, it was much easier than to read alll the other posts :)

Exactly why I posted it! Having the group is a much better starting point than white space..

Cadish
December 30th, 2003, 02:09 AM
Ok, it works (after a few changes...)!! Tnx a lot!!!

thracx
January 1st, 2004, 11:41 AM
Ok, it works (after a few changes...)!! Tnx a lot!!!

Great! One thing though, try to give details of what you needed to change to get it to work. That way, others can use your posts as a reference in case they need to do modifications too. Thanks, and H N Y!

Cadish
January 1st, 2004, 11:58 AM
I had to disable 'Only send to first match'...

thracx
January 4th, 2004, 02:22 PM
I have updated my file. If you are having problems with SmartPlay, re-download my settings file. This new file also contains all my other settings (such as some for a 'Winamp Loader') that some of you may like.

c2
January 27th, 2004, 09:16 AM
actually your file is down :(
would be great if you could reup it or send me via mail (ramsch@doomlocks.de) because i don't get it done :(

i got it to pause and resume, but i don't know how to make it start playing when stopped... :roll:

thracx
January 27th, 2004, 12:31 PM
actually your file is down :(

Sorry - thanks for the heads up - it's fixed now.

c2
January 27th, 2004, 02:22 PM
thanks alot!
works fine now :D

tss
February 11th, 2004, 02:35 PM
Thanks for this thread!

It helped me build SmartPause for Winamp 5. I use it when I get incoming calls on Skype to automatically pause Winamp. It works around the problem that Winamp pause really is play/pause toggle. Instead the SmartPause I built from your help now only pauses if there is actually something playing, so it doesn't accidentally play music in winamp if it for some reason was stopped.

Now I just have to figure out how to do the same for WMP.

BaudBandit
July 5th, 2004, 04:39 PM
Thanks!!!

Works great for me.

I customized the OSD to display three different OSD messages:
- "Play" when WinAmp State was stopped before
- "Pause"
- "Playing continued" when WinAmp State was paused before

Works like a charm ...
Arne

djniek
June 13th, 2005, 10:27 AM
Baudbanit, can you tell me your configuration?
I tried it too but I can't get it to work.
The sendmessage thing works because I see the variable being defined in the variables window, but then the check reg. fails:
girder > check reg. (register 1,icon/device "==1",) and then the first browse button: pause and second: play.
Whatever I do, it always start playing and won't pause.
The variables are correctly set, but ther seems to be something wrong with the condition check.

Treetop
June 18th, 2005, 09:57 PM
djniek,

Check out the DVDSpy plug-in.

djniek
June 19th, 2005, 03:21 AM
Thanks for the tip but I already got it to work with a lot of trial and error.
First make two commands for play and pause and give them Girder events "play" and "pause" :-)
Next make a multigroup with two commands.
The first is a sendmessage: message number=1024;wP=0;iP=104;save result to girder var=playing.
The next command of the multigroup is a variable manipulation script:

if playing == 1 then
TriggerEvent&#40;"Pause",18&#41;
else TriggerEvent&#40;"Play",18&#41;
end

This did the trick for me.

achrome
April 24th, 2006, 09:12 PM
somehow i can't find the sendmessage 1.51 plugin initially mentioned at the beginning of this thread...

that is the only thing i would need to be completely satisfied with my remote control of winamp...

::adam::

::edit:: nevermind, i got it all working smoothly. except only thing now is that girder 3.29 seems to crash when inactive for long periods of time. any suggestions?? ::edit::

Override
May 4th, 2006, 10:50 AM
Hi. I've tried all the ways that you show here to make work the play/pause command in winamp, but I'm still having the same problem. Really the problem seems to be, that Girder doesn't receives IR signals. When I send the command for the first time, it works, and I can see girder receiving data from the IR. When I try to resume playing after paused, Girder don't receives any signal. It works again after I press pause button in winamp with the mouse. Note that it only occurs if winamp is paused, because if I pause winamp with the mouse, girder don't receives IR signal, but if it's playing, it works all OK. Note too that if I try in girder "test command" it works all ok!!

I'm using Girder 3.3.7, WinLirc2girder plugin with a Vivanco universal remote, WinXP pro SP2, Winamp 5.21

Any comment would be helpful.
Thanks in advance, and sorry if my english isn't too good.