adryzz / CustomFilter

Use any expression as a tablet driver filter!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CustomFilter

The best OpenTabletDriver filter to ever grace this planet!

Total Download Count

Allows you to use any mathematical expression that can be evaluated to a number as a filtering stage!

Uses AngouriMath to automatically compile your expressions into code at runtime, to achieve the best performance possible.

All the math is done on complex numbers, but the end result is just the real part of it

Simple mode

image

The Simple Mode is the fastest but is limited in the number of samples you can use. Here's the supported parameters for both expressions:

x = The X coordinate

y = The Y coordinate

p = The pressure

tx = The tilt X component

ty = The tilt Y component

d = The hover distance

lx = The last X coordinate

ly = The last Y coordinate

lp = The last pressure

ltx = The last tilt X component

lty = The last tilt Y component

ld = The last hover distance

mx = Max X coordinate

my = Max Y coordinate

mp = Max pressure

cx = Last computed X coordinate

cy = Last computed Y coordinate

cp = Last computed pressure

Example: EMA smoothing

image

Multi-Sample mode (broken and disabled by default)

image

The Multi-Sample mode is slower than the Simple Mode, but it allows for more complex expressions.

It will automatically store the last n samples from your tablet, so that you can retrieve them with ease.

(e.g. the last X axis sample will be saved as x0, the one before as x1 and so on, same goes with the Y axis).

Remember to tell the filter how many samples you are going to use, as storing more than what's needed will slow down execution.

As always, other than the last samples we've just seen, you can always access these values:

  • x = The X coordinate.
  • y = The Y coordinate.
  • mx = The max X coordinate.
  • my = The max Y coordinate.

About

Use any expression as a tablet driver filter!


Languages

Language:C# 100.0%