<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PHASE",
  "identifier" : "/documentation/PHASE/PHASEEnvelopeDistanceModelParameters",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "PHASE"
    ],
    "preciseIdentifier" : "c:objc(cs)PHASEEnvelopeDistanceModelParameters"
  },
  "title" : "PHASEEnvelopeDistanceModelParameters"
}
-->

# PHASEEnvelopeDistanceModelParameters

A graph of points and curves that shapes the volume of a sound over distance.

```
class PHASEEnvelopeDistanceModelParameters
```

## Overview

This class provides an envelope that the app configures to dissipate the volume of a source’s sound with distance. The envelope describes a graph that the app configures using points and curves, where the input value is the distance between a sound source and the listener, and the output value is the sound’s volume.

### Dissipate Sound by Using an Envelope

The framework interprets this class’s envelope as a *gain curve*, which determines the sound’s volume over a distance. An envelope offers more precise control over sound dissipation than a geometric [`rolloffFactor`](/documentation/PHASE/PHASEGeometricSpreadingDistanceModelParameters/rolloffFactor). For example, the following code defines slow sound dissipation followed by a sharp decrease:

```swift
var envelopeSegments : [PHASEEnvelopeSegment]!
envelopeSegments.append(PHASEEnvelopeSegment(endPoint: simd_make_double2(6.0, 1.0),
 curveType: PHASECurveType.sigmoid))
envelopeSegments.append(PHASEEnvelopeSegment(endPoint: simd_make_double2(9.0, 0.0),
 curveType:PHASECurveType.inverseCubed))
let distanceModelEnvelope = PHASEEnvelope(startPoint: simd_make_double2(0.0, 0.125),
 segments:envelopeSegments)

let piecewiseModel = PHASEEnvelopeDistanceModelParameters(envelope: distanceModelEnvelope!)

spatialMixer.distanceModelParameters = piecewiseModel
```

## Topics

### Creating the Distance Model Parameters

[`-  initWithEnvelope:`](/documentation/PHASE/PHASEEnvelopeDistanceModelParameters/init(envelope:))

Creates the distance model parameters with an envelope.

### Shaping the Volume Over a Distance

[`envelope`](/documentation/PHASE/PHASEEnvelopeDistanceModelParameters/envelope)

An envelope that shapes sound dissipation over distance.

## Relationships

### Conforms To

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

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

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

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

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

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

### Inherits From

[`PHASEDistanceModelParameters`](/documentation/PHASE/PHASEDistanceModelParameters)

---

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)