Exception in Core Loop

Post Reply
Glooper
Posts: 4
Joined: 13 Sep 2012, 19:09

Exception in Core Loop

Post by Glooper »

Hi Jonathan,

I get this error when two macros containing delays are assigned to a trigger with a Distance parameter. The left trigger is Z+ and the right is RZ+, and I'm using the latest build. The tutorial example works perfectly - as do any macros without timings, but it all goes wrong when I add a Pause or Hold to either sequence.

With this in mind, I have a request for the next version: is it possible to add a feature that accelerates and decelerates macro timings in accordance to a trigger-hold percentage?

A macro example:

ArrowDown Hold
XpadderPause 0.50
SpaceBar 0.50
XpadderPause 0.50
ArrowDown Release
XpadderPause 0.50
KeyUp 0.50
XpadderPause 0.50
Loop While Held

And then the ability to assign a trigger-hold value to loop the above, with a deeper press causing acceleration, and a lighter press causing deceleration. Or you could have the trigger run your default loop until X trigger percentage, with accel or decel thereafter. The amount of speed variance would be assigned by a user-set tolerance value.

(I hope I'm explaining this okay; it's getting complex!)

I could assign my 0.50 timings to a trigger at 50%, falling to 0.10 at 100%, and raising to 1.00 with the trigger below 10%. On-the-fly timings matched to your trigger-hold, basically. I think this would be an amazing feature, and you'd be the first one to create it.

Thanks for a great program!
Last edited by Glooper on 14 Sep 2012, 19:15, edited 1 time in total.

Primal Fear
Xpadder Xpert
Posts: 2437
Joined: 09 Feb 2010, 16:41
Location: Germany
Contact:

Re: Exception in Core Loop

Post by Primal Fear »

You have probably caused this bug.
I have posted two profiles here that have a gradient turbo in three/four steps. That should work for your assignment too but you have to keep this bug in mind, so every part divided by a Hold Zone Slot (or an Cycle Stop) needs to have the same Distance Zone Slots.

Edit: That should do it.
The times that I used are much below your example, (basically 0.02s instead 0.50s), so you have a much lower delay when releasing the trigger or switching between different distances.

Code: Select all

;--- Xpadder Profile Data ---
DataType=Profile
Version=2012.05.01
Name=
Set1TriggerLeftSlots=TAP TIME 0.02s,Arrow Down,PAUSE 0.00s,Arrow Down,Space,PAUSE 0.00s,Arrow Down,PAUSE 0.02s,Arrow Up,DISTANCE ZONE 50%,Arrow Down,PAUSE 0.00s,Arrow Down,Space,PAUSE 0.00s,Arrow Down,PAUSE 0.02s,Arrow Up,DISTANCE ZONE 40%,Arrow Down,PAUSE 0.00s,Arrow Down,Space,PAUSE 0.00s,Arrow Down,PAUSE 0.02s,Arrow Up,CYCLE STOP,PAUSE 0.01s,DISTANCE ZONE 40%,PAUSE 0.01s,DISTANCE ZONE 50%,PAUSE 0.01s,CYCLE STOP,PAUSE 0.01s,DISTANCE ZONE 40%,PAUSE 0.01s,DISTANCE ZONE 50%,Arrow Down,PAUSE 0.00s,Space,Arrow Down,PAUSE 0.00s,Arrow Down,PAUSE 0.02s,Arrow Up,CYCLE STOP,PAUSE 0.01s,DISTANCE ZONE 40%,Arrow Down,PAUSE 0.00s,Space,Arrow Down,PAUSE 0.00s,Arrow Down,PAUSE 0.02s,Arrow Up,DISTANCE ZONE 50%,PAUSE 0.01s,CYCLE STOP,PAUSE 0.01s,DISTANCE ZONE 40%,PAUSE 0.01s,DISTANCE ZONE 50%,Arrow Down,PAUSE 0.00s,Space,Arrow Down,PAUSE 0.00s,Arrow Down,PAUSE 0.02s,Arrow Up
Set1TriggerLeftTurbo=1

Glooper
Posts: 4
Joined: 13 Sep 2012, 19:09

Re: Exception in Core Loop

Post by Glooper »

Amazing! Thanks a lot, Primal.

I'll have to enter your code to gain a full understanding of how it all performs in action, but that looks great. Like Columbo, I've just one more question! When moving the trigger to a new Distance zone, can the sequence you were on be made to complete before the new Distance sequence begins?

EDIT

I think the Pause step answers my question. Sequences with Pause naturally run to completion, don't they? Because there are times when I'd like to avoid overlapping sequences. It's only Hold that stops your sequence upon release of the key? So I've been confusing Xpadder by combining Hold and Distance, because Hold is constant, yet Distance is trying to switch. Possibly. :?:
Last edited by Glooper on 14 Sep 2012, 22:22, edited 1 time in total.

Primal Fear
Xpadder Xpert
Posts: 2437
Joined: 09 Feb 2010, 16:41
Location: Germany
Contact:

Re: Exception in Core Loop

Post by Primal Fear »

If this is one Sequence,
ArrowDown Hold
XpadderPause 0.50
SpaceBar0.50
XpadderPause 0.50
ArrowDown Release
XpadderPause 0.50
KeyUp 0.50
XpadderPause 0.50
Loop While Held
...it will work that way.

Edit: Sequences will not inevitably be executed completely, they will be aborted if a new Hold or Release Zone is triggered or if you press the button again. However this assignment always waits for the next pulse of the turbo, which means there is always enough time to execute one Sequence completely (except you decrease the turbo delay under 0.10s)

Glooper
Posts: 4
Joined: 13 Sep 2012, 19:09

Re: Exception in Core Loop

Post by Glooper »

Ah, okay. That was just an example of a sequence.

I'm not at home right now so I can't test anything, but I'll wait until I've had another go at it before I bother you again. I should be able to get there with your code help. Are Pause timings ignored with Distance, then? If you want to run each different sequence back-to-back, I mean, with no overlap.

So if I had...
Arrow Down
Pause 0.10
Arrow Up
For one Distance, and...
Arrow Down
Pause 0.20
Arrow Up
For another, would Xpadder always end on Arrow Up and begin on Arrow Down every time I engage the opposite Distance? Thanks again, Primal.

Primal Fear
Xpadder Xpert
Posts: 2437
Joined: 09 Feb 2010, 16:41
Location: Germany
Contact:

Re: Exception in Core Loop

Post by Primal Fear »

Yes, if you configure the turbo delay to at least 0.30 respectively 0.40 seconds (the duration of a keypress is 0.10s if you didn't place a light key tap time slot somewhere before it).

Post Reply

Return to “Other questions”