<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ForceFeedback",
  "identifier" : "/documentation/ForceFeedback/FFENVELOPE",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Force Feedback"
    ],
    "preciseIdentifier" : "c:@S@FFENVELOPE"
  },
  "title" : "FFENVELOPE"
}
-->

# FFENVELOPE

Used by the FFEFFECT structure to specify the optional envelope parameters for an effect.

```
struct FFENVELOPE
```

## Overview

The sustain level for the envelope is represented by the **dwMagnitude** member of the FFPERIODIC structure and the **lMagnitude** member of the FFCONSTANTFORCE structure. The sustain time is represented by **dwDuration** member of the FFEFFECT structure

## Topics

### Initializers

[`init()`](/documentation/ForceFeedback/FFENVELOPE/init())

[`init(dwSize: DWORD, dwAttackLevel: DWORD, dwAttackTime: DWORD, dwFadeLevel: DWORD, dwFadeTime: DWORD)`](/documentation/ForceFeedback/FFENVELOPE/init(dwSize:dwAttackLevel:dwAttackTime:dwFadeLevel:dwFadeTime:))

### Instance Properties

[`var dwAttackLevel: DWORD`](/documentation/ForceFeedback/FFENVELOPE/dwAttackLevel)

Amplitude for the start of the envelope, relative to the baseline, in the range from 0 through 10,000. If the effect’s type-specific data does not specify a baseline, the amplitude is relative to 0.

[`var dwAttackTime: DWORD`](/documentation/ForceFeedback/FFENVELOPE/dwAttackTime)

The time, in microseconds, to reach the sustain level.

[`var dwFadeLevel: DWORD`](/documentation/ForceFeedback/FFENVELOPE/dwFadeLevel)

Amplitude for the end of the envelope, relative to the baseline, in the range from 0 through 10,000. If the effect’s type-specific data does not specify a baseline, the amplitude is relative to 0.

[`var dwFadeTime: DWORD`](/documentation/ForceFeedback/FFENVELOPE/dwFadeTime)

The time, in microseconds, to reach the fade level.

[`var dwSize: DWORD`](/documentation/ForceFeedback/FFENVELOPE/dwSize)

Size, in bytes, of this structure. This member must be initialized before the structure is used.

## Relationships

### Conforms To

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)