From ef17e25c92d252be192ecf1c291ee7586ef9a5e7 Mon Sep 17 00:00:00 2001 From: MmAaXx500 Date: Tue, 20 Aug 2024 23:16:55 +0200 Subject: envelope documentation --- docs/FFBEFFECTS.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'docs') 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 -- cgit v1.3