---
title: "fade(to:duration:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/audiomixgroup/fade(to:duration:)"
---

# fade(to:duration:)

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

## Declaration

```swift
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.
