---
title: "fadeGain(gain:duration:curveType:)"
framework: phase
role: symbol
role_heading: Instance Method
path: "phase/phasegroup/fadegain(gain:duration:curvetype:)"
---

# fadeGain(gain:duration:curveType:)

Adjusts the volume of the sounds in a group gradually.

## Declaration

```swift
func fadeGain(gain: Double, duration: Double, curveType: PHASECurveType)
```

## Parameters

- `gain`: The target volume.
- `duration`: The total time to complete the volume adjustment. The framework scales this value by doc://com.apple.phase/documentation/PHASE/PHASEEngine/unitsPerSecond.
- `curveType`: A selection that specifies a mathematical curve that shapes the volume adjustment over time.

## See Also

### Conrolling Loudness

- [gain](phase/phasegroup/gain.md)
