<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/AudioMixGroup/fade(to:duration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation13AudioMixGroupV4fade2to8durationySd_SdtF"
  },
  "title" : "fade(to:duration:)"
}
-->

# fade(to:duration:)

Transitions the gain to a value over a time interval using a linear curve.

```
mutating func fade(to gain: Audio.Decibel, duration: TimeInterval)
```

## Parameters

`gain`

The overall level for audio from a group after the fade is complete.

`duration`

The duration of the fade in seconds.

---

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)