| View previous topic :: View next topic |
| Author |
Message |
phresh
Joined: 18 Feb 2007 Posts: 4
Digg It |
Posted: 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 |
|
 |
TylerK

Joined: 18 Dec 2006 Posts: 384 Location: Springfield, IL
Digg It |
Posted: 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 |
|
 |
phresh
Joined: 18 Feb 2007 Posts: 4
Digg It |
Posted: 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
cheers |
|
| Back to top |
|
 |
phresh
Joined: 18 Feb 2007 Posts: 4
Digg It |
Posted: 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 |
|
 |
TylerK

Joined: 18 Dec 2006 Posts: 384 Location: Springfield, IL
Digg It |
Posted: 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 |
|
 |
|