diff options
| author | MmAaXx500 <viktor.balogh45@gmail.com> | 2024-08-20 23:16:55 +0200 |
|---|---|---|
| committer | MmAaXx500 <viktor.balogh45@gmail.com> | 2024-08-22 20:58:18 +0200 |
| commit | ef17e25c92d252be192ecf1c291ee7586ef9a5e7 (patch) | |
| tree | ed9b7911ca0a45f5e9e8a33b41783f3dee379c95 /docs | |
| parent | ca9f0bd3a9d4173731df8e4c760bf650ddd5c827 (diff) | |
| download | hid-tmff2-ef17e25c92d252be192ecf1c291ee7586ef9a5e7.tar.gz hid-tmff2-ef17e25c92d252be192ecf1c291ee7586ef9a5e7.zip | |
envelope documentation
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/FFBEFFECTS.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/FFBEFFECTS.md b/docs/FFBEFFECTS.md index a88b55b..3e90475 100644 --- a/docs/FFBEFFECTS.md +++ b/docs/FFBEFFECTS.md @@ -938,6 +938,52 @@ magnitude + offset + phase + period + envelope + duration + offset: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ``` +## Envelope + +Envelope related parameters are the same across all the effects. The only +difference is which effect specific parameters are used during the calculations. + +Damper, Friction, Inertia, and Spring do not support envelope. + +### attack length + +between 0 and 65535 + +On Windows, it has a minimum value depending on how far is the target from the +attack/fade level. This means that in case of an envelope that goes from zero +to max has the minimum length of 256ms. + +```length = abs((effectval * 32768 / effectmax - level) / 128)``` + +`effectval` is the current value of an effect specific parameter + +`effectmax` is the maximum value of `effectval` + +`level` is the current value of the attack/fade level + +Used parameters for each effect: + +| Effect | Parameter | +|----------|-----------| +| Constant | Strength | +| Periodic | Magnitude | +| Ramp | Slope | + +### attack level + +between 0 and 32764 + +### fade length + +between 0 and 65535 + +Uses the same calculation as attack length. + +### fade level + +between 0 and 32764 + + ## PS4 Input `rdesc` ``` ff00.0021 = 0 |
