Variable turbo rate with analog control
Variable turbo rate with analog control
I would like to make my analog stick to tap repeatedly a key, and the farther I push the stick the faster the key is tapped.
I tried to do it by inserting pauses of different lengths with distance zones, but I'm a bit confused and it does not work.
How would I do that ?
I tried to do it by inserting pauses of different lengths with distance zones, but I'm a bit confused and it does not work.
How would I do that ?
Re: Variable turbo rate with analog control
Well, I finally managed to have something.
I missed the keytaptime parameter, which was important.
I did the following :
- set keytaptime to 0.01s
- set turbo to 0.20s
- then my sequence is the following :
| key | pause 0.19 |
| distance 25% | key | pause 0.09 | key | pause 0.09 |
| distance 50% | key | pause 0.04 | key | pause 0.04 | key | pause 0.04 | key | pause 0.04 |
| distance 75% | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 |
Now it seems that I have :
5Hz for <25%
10Hz for <50%
20Hz for <75%
50Hz maximum
It works ! The minimum rate is fixed by the turbo rate, and the maximum is 50Hz which is sufficient I think.
But do you have a better way of doing this ? (simple to write and more progressive for example)
I missed the keytaptime parameter, which was important.
I did the following :
- set keytaptime to 0.01s
- set turbo to 0.20s
- then my sequence is the following :
| key | pause 0.19 |
| distance 25% | key | pause 0.09 | key | pause 0.09 |
| distance 50% | key | pause 0.04 | key | pause 0.04 | key | pause 0.04 | key | pause 0.04 |
| distance 75% | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 | key | pause 0.01 |
Now it seems that I have :
5Hz for <25%
10Hz for <50%
20Hz for <75%
50Hz maximum
It works ! The minimum rate is fixed by the turbo rate, and the maximum is 50Hz which is sufficient I think.
But do you have a better way of doing this ? (simple to write and more progressive for example)
-
- Xpadder Xpert
- Posts: 2437
- Joined: 09 Feb 2010, 16:41
- Location: Germany
- Contact:
Re: Variable turbo rate with analog control
Good solution for that.
In principle I had this idea already too, but I lost every time the desire to bring it to an working end since I need a longer key tap time. I guess I have to calculate that before tinkling around.
With the most recent version of Xpadder you could use 0.00s Pauses to assign more key presses in this time. Also the last Pause in every Distance Zone isn't really necessary. except for the first one, there is one Pause necessary to make it a Sequence. But it doesn't has to so long, 0.01s is enough.
The reason for that is, if the Sequence it's end nothing will be pressed until the next turbo button press.
But at least this looks 100% clean.
In principle I had this idea already too, but I lost every time the desire to bring it to an working end since I need a longer key tap time. I guess I have to calculate that before tinkling around.
With the most recent version of Xpadder you could use 0.00s Pauses to assign more key presses in this time. Also the last Pause in every Distance Zone isn't really necessary. except for the first one, there is one Pause necessary to make it a Sequence. But it doesn't has to so long, 0.01s is enough.
The reason for that is, if the Sequence it's end nothing will be pressed until the next turbo button press.
But at least this looks 100% clean.
Re: Variable turbo rate with analog control
Yep I forgot to tell, the sum of each cycle makes 0.20s, i.e. the repeat time for the turbo.
After some testing it seems that 50Hz is too fast, the game (IL-2 1946) has a weird behaviour at full rate. I will replace the full rates by full and 0 positions.
(moreover I saw that you moved the topic, thank you)
After some testing it seems that 50Hz is too fast, the game (IL-2 1946) has a weird behaviour at full rate. I will replace the full rates by full and 0 positions.
(moreover I saw that you moved the topic, thank you)
-
- Xpadder Xpert
- Posts: 2437
- Joined: 09 Feb 2010, 16:41
- Location: Germany
- Contact:
Re: Variable turbo rate with analog control
This is something that seems to be from game to game different.
Some games act like there would a continuous key press with high turbo rate. Others act exactly like the key press really is and I had others that refuse to work with turbos and such fast sequences anyway.
BTW: I didn't moved it, only mods can do that. I guess the thank due to SGTCableDog.
Some games act like there would a continuous key press with high turbo rate. Others act exactly like the key press really is and I had others that refuse to work with turbos and such fast sequences anyway.
BTW: I didn't moved it, only mods can do that. I guess the thank due to SGTCableDog.
-
- Xpadder Xpert
- Posts: 2437
- Joined: 09 Feb 2010, 16:41
- Location: Germany
- Contact:
Re: Variable turbo rate with analog control
Here an example profile for racing game, inclusively the idea with the binary system form hazard763-fv here.
For Xbox360pad or any other controller with analog triggers.
The pulsing have to adjusted to the respective game. Also, S (left trigger) will not be pulsed.
For Xbox360pad or any other controller with analog triggers.
Code: Select all
;--- Xpadder Profile Data ---
DataType=Profile
Version=2011.03.24
Name=(Pasted Profile Pulsing example)
KeyTapTime=8
Set1StickDeadZones=1,64
Set1Stick1RightSlots=PAUSE 0.10s,DISTANCE ZONE 25%,D,PAUSE 0.00s,D,PAUSE 0.48s,DISTANCE ZONE 25%,D,PAUSE 0.00s,D,PAUSE 0.16s,D,PAUSE 0.00s,D,PAUSE 0.16s,DISTANCE ZONE 25%,D,PAUSE 0.00s,D,PAUSE 0.00s,D,PAUSE 0.00s,D,PAUSE 0.00s,D,PAUSE 0.00s,D,PAUSE 0.00s,D,PAUSE 0.00s,D
Set1Stick1RightTurbo=1
Set1Stick1RightTurboRate=64
Set1Stick1LeftSlots=PAUSE 0.10s,DISTANCE ZONE 25%,A,PAUSE 0.00s,A,PAUSE 0.48s,DISTANCE ZONE 25%,A,PAUSE 0.00s,A,PAUSE 0.16s,A,PAUSE 0.00s,A,PAUSE 0.16s,DISTANCE ZONE 25%,A,PAUSE 0.00s,A,PAUSE 0.00s,A,PAUSE 0.00s,A,PAUSE 0.00s,A,PAUSE 0.00s,A,PAUSE 0.00s,A,PAUSE 0.00s,A
Set1Stick1LeftTurbo=1
Set1Stick1LeftTurboRate=64
Set1TriggerLeftSlots=S
Set1TriggerRightSlots=PAUSE 0.10s,DISTANCE ZONE 10%,W,PAUSE 0.24s,W,PAUSE 0.24s,DISTANCE ZONE 40%,W,PAUSE 0.08s,W,PAUSE 0.08s,W,PAUSE 0.08s,W,DISTANCE ZONE 40%,W,PAUSE 0.00s,W,PAUSE 0.00s,W,PAUSE 0.00s,W,PAUSE 0.00s,W,PAUSE 0.00s,W,PAUSE 0.00s,W,PAUSE 0.00s,W
Set1TriggerRightTurbo=1
Set1TriggerRightTurboRate=64
Last edited by Primal Fear on 26 Mar 2011, 01:46, edited 4 times in total.
-
- Posts: 3
- Joined: 19 Jan 2011, 20:14
Re: Variable turbo rate with analog control
Nice of you to put so much effort in it. But I have to say that it still does what it shouldn't: It just starts blinking the moment I tip the trigger and doesn't change the frequency when I hit the 100 per cent. It's just blinking. Only question: You have a newer version of Xpadder than I can find on the server. Is there a new behavior in that one?
-
- Xpadder Xpert
- Posts: 2437
- Joined: 09 Feb 2010, 16:41
- Location: Germany
- Contact:
Re: Variable turbo rate with analog control
I use the current Nightly Build and forgot to change the version. Now I have changed that, so you can use this profile with the latest stable release.hazard763-fv wrote:You have a newer version of Xpadder than I can find on the server.
There should be nothing different with this.hazard763-fv wrote:But I have to say that it still does what it shouldn't: It just starts blinking the moment I tip the trigger and doesn't change the frequency when I hit the 100 per cent. ...Is there a new behavior in that one?
I guess what you mean is how oft the button is getting green. But thats not the actual key press, it only shows the turbo rate that cannot change. Each turbo button press triggers a Sequence with one or more key presses.
If you open the Xpadder settings and click on the left side on "Keyboard", you find a keyboard test.
Activate the check-box "Test Enabled" and then trigger this assignment to see how it really works.
-
- Posts: 6
- Joined: 20 Mar 2011, 07:49
Re: Variable turbo rate with analog control
Thanx Primal Fear for the great example
At first I was put down by the sluggishness of the controls when turning from side to side. As you already pointed out here it has to do with XPadder having to complete the cycles when moving to another zone the cycle when turning from side to side on a stick. (Maybe triggers work better though.)
I've attempted to fix the issue somewhat by shortening the length of the cycles from 64ms to 16ms and having keytap time at 4 ms. Should work well as long as the game's update cycle is faster than 25 updates per second. Any decently running game should have fps > 25/s and the update cycle shouldn't be tied to the fps anyhow if they coded it correctly.
I also added more control by having 4 zones giving 25%, 50%, 75%, 100%.
Another tweak was eliminating the pause in the 25% zone since it is unnecessary (the rate in this zone is equal to the turbo rate). Removing the pause probably further improved the responsiveness when moving from this zone to another one. (Hmm... no this tweak didn't have any effect at all. My bad.)
Hope someone finds the tweaks usefull. Here's the code:
As I found out later (after som thinking)... in order to correctly calibrate the percentages when it comes to steering a car:
KeyTapTime = The time it takes for the car's wheel to turn from straight to full turn, divided by 2.
The Turbo rate = KeyTapTime * 4
PAUSE 0.04 should be replaced by Pause X.XX <- value of KeyTapTime should go here.
Unfortunately, after calibrating this the length of the cycles are so long that turning from side to side gives a tremendous delay. And all of my tweaking efforts are useless.
The code might work with accelerating and breaking with triggers though.
I'll be waiting for the SlotMachine or code something on my own.
If I manage to get something to work I might post it here.
BR
/Sam
At first I was put down by the sluggishness of the controls when turning from side to side. As you already pointed out here it has to do with XPadder having to complete the cycles when moving to another zone the cycle when turning from side to side on a stick. (Maybe triggers work better though.)
I've attempted to fix the issue somewhat by shortening the length of the cycles from 64ms to 16ms and having keytap time at 4 ms. Should work well as long as the game's update cycle is faster than 25 updates per second. Any decently running game should have fps > 25/s and the update cycle shouldn't be tied to the fps anyhow if they coded it correctly.
I also added more control by having 4 zones giving 25%, 50%, 75%, 100%.
Another tweak was eliminating the pause in the 25% zone since it is unnecessary (the rate in this zone is equal to the turbo rate). Removing the pause probably further improved the responsiveness when moving from this zone to another one. (Hmm... no this tweak didn't have any effect at all. My bad.)
Hope someone finds the tweaks usefull. Here's the code:
Code: Select all
;--- Xpadder Profile Data ---
DataType=Profile
Version=2010.11.17
Name=Pulsing example
KeyTapTime=4
Set1Stick1RightSlots=PAUSE 0.01s,DISTANCE ZONE 8%,D,DISTANCE ZONE 22%,D,PAUSE 0.00s,D,PAUSE 0.04s,PAUSE 0.04s,DISTANCE ZONE 23%,D,PAUSE 0.00s,D,PAUSE 0.00s,D,PAUSE 0.04s,DISTANCE ZONE 22%,D,PAUSE 0.00s,D,PAUSE 0.00s,D,PAUSE 0.00s,D
Set1Stick1RightTurbo=1
Set1Stick1RightTurboRate=16
Set1Stick1LeftSlots=PAUSE 0.01s,DISTANCE ZONE 8%,A,DISTANCE ZONE 22%,A,PAUSE 0.00s,A,PAUSE 0.04s,PAUSE 0.04s,DISTANCE ZONE 23%,A,PAUSE 0.00s,A,PAUSE 0.00s,A,PAUSE 0.04s,DISTANCE ZONE 22%,A,PAUSE 0.00s,A,PAUSE 0.00s,A,PAUSE 0.00s,A
Set1Stick1LeftTurbo=1
Set1Stick1LeftTurboRate=16
Set1TriggerLeftSlots=PAUSE 0.01s,DISTANCE ZONE 8%,W,DISTANCE ZONE 22%,W,PAUSE 0.00s,W,PAUSE 0.04s,PAUSE 0.04s,DISTANCE ZONE 23%,W,PAUSE 0.00s,W,PAUSE 0.00s,W,PAUSE 0.04s,DISTANCE ZONE 22%,W,PAUSE 0.00s,W,PAUSE 0.00s,W,PAUSE 0.00s,W
Set1TriggerLeftTurbo=1
Set1TriggerLeftTurboRate=16
Set1TriggerRightSlots=PAUSE 0.01s,DISTANCE ZONE 8%,S,DISTANCE ZONE 22%,S,PAUSE 0.00s,S,PAUSE 0.04s,PAUSE 0.04s,DISTANCE ZONE 23%,S,PAUSE 0.00s,S,PAUSE 0.00s,S,PAUSE 0.04s,DISTANCE ZONE 22%,S,PAUSE 0.00s,S,PAUSE 0.00s,S,PAUSE 0.00s,S
Set1TriggerRightTurbo=1
Set1TriggerRightTurboRate=16
KeyTapTime = The time it takes for the car's wheel to turn from straight to full turn, divided by 2.
The Turbo rate = KeyTapTime * 4
PAUSE 0.04 should be replaced by Pause X.XX <- value of KeyTapTime should go here.
Unfortunately, after calibrating this the length of the cycles are so long that turning from side to side gives a tremendous delay. And all of my tweaking efforts are useless.
The code might work with accelerating and breaking with triggers though.
I'll be waiting for the SlotMachine or code something on my own.
If I manage to get something to work I might post it here.
BR
/Sam
Last edited by sammorling on 22 Mar 2011, 14:56, edited 1 time in total.
-
- Posts: 6
- Joined: 20 Mar 2011, 07:49
Re: Variable turbo rate with analog control
Doh! The sluggishness is still too high.
I'll be waiting for the slotmachine you mentioned in another thread.
/Sam
I'll be waiting for the slotmachine you mentioned in another thread.
/Sam
-
- Xpadder Xpert
- Posts: 2437
- Joined: 09 Feb 2010, 16:41
- Location: Germany
- Contact:
Re: Variable turbo rate with analog control
This Pause in the first Distance was necessary to abort the sequence that was triggered before.
I practice this isn't absolutely reliable since it is usual to let snap back the stick, so this Distance Zone will not be triggered in every case. Also there is a problems if switching directly between two directions. It happens regulary that Xpadder repeats the Sequence of the released direction ever and ever again until you handle to cause this bug again.
So I currently only use this together with the Set selection in games where the character can only run. Set1 contains the normal movement and Set2 only the slow, pulsed movement. Now just another button to switch the Set and it works absolutely reliable.
For racing games this is of course no solution.
SlotMachine should make it possible to have this correctly working.
I practice this isn't absolutely reliable since it is usual to let snap back the stick, so this Distance Zone will not be triggered in every case. Also there is a problems if switching directly between two directions. It happens regulary that Xpadder repeats the Sequence of the released direction ever and ever again until you handle to cause this bug again.
So I currently only use this together with the Set selection in games where the character can only run. Set1 contains the normal movement and Set2 only the slow, pulsed movement. Now just another button to switch the Set and it works absolutely reliable.
For racing games this is of course no solution.
SlotMachine should make it possible to have this correctly working.
-
- Posts: 6
- Joined: 20 Mar 2011, 07:49
Re: Variable turbo rate with analog control
Yep! The delay occurs when i turn the wheel from one side to another. For some reason it pauses in the middle for up to 1 full cycle (turbo cycle). In its current state it might be good enough for triggers used as acceleration and break. For steering it simply doesn't switch from side to side fast enough.
I'm a bit disappointed since I bought XPadder for this specific feature and as far as I could tell from the part of the forum I was able to access befor purchasing XPadder it could handle it.
Guess I'll have to code my own solution or wait for the slot machine. If I manage to create something on my own I guess I can post it here for others to use.
BR
/Sam
I'm a bit disappointed since I bought XPadder for this specific feature and as far as I could tell from the part of the forum I was able to access befor purchasing XPadder it could handle it.
Guess I'll have to code my own solution or wait for the slot machine. If I manage to create something on my own I guess I can post it here for others to use.
BR
/Sam
-
- Xpadder Xpert
- Posts: 2437
- Joined: 09 Feb 2010, 16:41
- Location: Germany
- Contact:
Re: Variable turbo rate with analog control
Sorry for the few days delays, I was ill last days.
The only problem I have with my profile (I made one change: Dead Zone to 1% and instead the first Distance Zone with the Pause to 25%, to replace it) is that Xpadder has somehow a small delay before triggering the next Sequence. And that means that there is a small delay before steering, which is absolutely not tolerable in racing games. Without that problem it would be quiet good for racing games.
If the game that you want to play supports Xinput (Xbox360 pad) there is another solution. This program emulates Xinput with any controller.
The only problem I have with my profile (I made one change: Dead Zone to 1% and instead the first Distance Zone with the Pause to 25%, to replace it) is that Xpadder has somehow a small delay before triggering the next Sequence. And that means that there is a small delay before steering, which is absolutely not tolerable in racing games. Without that problem it would be quiet good for racing games.
If the game that you want to play supports Xinput (Xbox360 pad) there is another solution. This program emulates Xinput with any controller.
-
- Posts: 6
- Joined: 20 Mar 2011, 07:49
Re: Variable turbo rate with analog control
Thanx for the tip.
However I already use X360ce for a racing game requiring XBox 360 controllers and it works great... But for the rest of my games that don't require XBox360 controllers or have working analog steering for some reason I need another solution. That's why I was interested in XPadder because I thought it could handle it.
BR
/Sam
However I already use X360ce for a racing game requiring XBox 360 controllers and it works great... But for the rest of my games that don't require XBox360 controllers or have working analog steering for some reason I need another solution. That's why I was interested in XPadder because I thought it could handle it.
BR
/Sam