WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Winamp fast forward script using roll (how to repeat?)

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
View previous topic :: View next topic  
Author Message
phresh



Joined: 18 Feb 2007
Posts: 4

Digg It
PostPosted: Sun Feb 18, 2007 11:23 pm    Post subject: Winamp fast forward script using roll (how to repeat?)

Basically I want to set the wiimote roll function to repeat the fast forward function in winamp. I've got ffwd set to the F1 key which when held continuously fast forwards. At the moment i've got the remote to ffwd once when it's tilted but cannot get it to repeat itself. I suspect its something very simple but my trial and error technique hasn't got me any closer yet!

Ideally this could work like a jog wheel, wheras the further the tilt the faster the fast forward. I assume you could do this by specifying variable for 10 - 30, 31 - 60, 61 - 90 degree angles that then repeat the key that is set in the program.

Any help, or a pointer to a similar script appreciated.
Back to top
View user's profile Send private message
TylerK



Joined: 18 Dec 2006
Posts: 384
Location: Springfield, IL

Digg It
PostPosted: Sun Feb 18, 2007 11:37 pm    Post subject:

Probably something like this:
Code:
if (Wiimote.Roll > 20) then
  F1 = true
  wait 60 ms;
  F1 = false
endif

Or for the basis of a "fast forward speed relative to roll" script, try something like this:
Code:

var.deadzone = 10 // amount the roll most be over before anything happens

var.speedRange = 1.5

if (Wiimote.Roll > var.deadzone) then
  var.waitTime = Round(Wiimote.Roll) * var.speedRange
  F1 = true
  wait var.waitTime ms;
  F1 = false
endif
Back to top
View user's profile Send private message
phresh



Joined: 18 Feb 2007
Posts: 4

Digg It
PostPosted: Sun Feb 18, 2007 11:55 pm    Post subject:

first one works a treat, as always I was trying the very simple with something far too complicated Rolling Eyes

cheers
Back to top
View user's profile Send private message
phresh



Joined: 18 Feb 2007
Posts: 4

Digg It
PostPosted: Mon Feb 19, 2007 12:46 am    Post subject:

just tried your second suggestion which works great once you reverse the maths so that it speeds up the more your roll.

Here's what it looks like now;

Code:

var.deadzone = 10 // amount the roll most be over before anything happens

var.speedRange = 1.5

if (Wiimote.Roll > var.deadzone) then
  var.waitTime = 1 / (Round(Wiimote.Roll) * var.speedRange)
  F1 = true
  wait var.waitTime ms;
  F1 = false
endif


Thanks for the help tyler, just thought i'd this for the hard of maths.
Back to top
View user's profile Send private message
TylerK



Joined: 18 Dec 2006
Posts: 384
Location: Springfield, IL

Digg It
PostPosted: Mon Feb 19, 2007 2:13 am    Post subject:

Ha, that totally slipped by me! Unless it's something really crazy complicated I don't even bother testing out the scripts I write anymore.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group