<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "PHASE",
  "identifier" : "/documentation/PHASE/PHASECurveType",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "PHASE"
    ],
    "preciseIdentifier" : "c:@E@PHASECurveType"
  },
  "title" : "PHASECurveType"
}
-->

# PHASECurveType

Options that apply a mathematical function to an input value.

```
enum PHASECurveType
```

## Overview

PHASE applies curves in several places across the framework:

- A [`PHASEEnvelopeSegment`](/documentation/PHASE/PHASEEnvelopeSegment) object represents one curved portion of an envelope’s graph.
- The [`PHASEGroup`](/documentation/PHASE/PHASEGroup) class applies a curve type to its sounds by fading its volume with the [`fadeGain(gain:duration:curveType:)`](/documentation/PHASE/PHASEGroup/fadeGain(gain:duration:curveType:)) function, and to its rate, with [`fadeRate(rate:duration:curveType:)`](/documentation/PHASE/PHASEGroup/fadeRate(rate:duration:curveType:)).
- Each [`PHASEGroupPresetSetting`](/documentation/PHASE/PHASEGroupPresetSetting) applies a curve to control a setting’s rate of change.

### Apply a Curve as a Rate of Change

In most cases, PHASE applies curves to output a rate of change. For example, an  envelope segment’s [`curveType`](/documentation/PHASE/PHASEEnvelopeSegment/curveType) determines where along the segment’s domain the y-value changes more quickly. The following figure compares all the curves’ rate of change by plotting their input over the range `(0,0)` to `(1,1)`.

![A certesian graph plots all curve types for comparison. The graph encompases the first cartesian quadrant, where each curve begins at coordinate (0,0) and ends at coordinate (1,1). The linear curve plots in a straight line between the two coordinates. An arc that occupies the furthest area from the linear line to the upper left is the inverse cube curve. The next furthest arc from the linear line to the upper left is the inverse squared curve. And the third-furthest arc from the linear line to the upper left is the inverse sine curve. An arc that occupies the furthest area from the linear line to the lower right is the cube curve. The next furthest arc from the linear line to the lower right is the squared curve. And the third-furthest arc from the linear line to the lower right is the sine curve. The sigmoid and inverse sigmoid curves occupy the central area of the graph and center on top of the linear line. The sigmoid curve shapes like the letter S and begins by extending more quickly in the X direction. The inverse sigmoid curve shapes like an inverted letter S and begins by extending more quickly in the Y direction.](images/com.apple.phase/media-3887371@2x.png)

## Topics

### Types

[`case linear`](/documentation/PHASE/PHASECurveType/linear)

A curve that increases uniformly with its input.

[`case squared`](/documentation/PHASE/PHASECurveType/squared)

A curve that increases at a rate that squares its input.

[`case inverseSquared`](/documentation/PHASE/PHASECurveType/inverseSquared)

A curve that increases at a rate of one divided by the input’s square.

[`case cubed`](/documentation/PHASE/PHASECurveType/cubed)

A curve that increases at a rate that cubes its input.

[`case inverseCubed`](/documentation/PHASE/PHASECurveType/inverseCubed)

A curve that increases at a rate of one divided by the input’s cube.

[`case sine`](/documentation/PHASE/PHASECurveType/sine)

A sine curve.

[`case inverseSine`](/documentation/PHASE/PHASECurveType/inverseSine)

An inverse sine curve.

[`case sigmoid`](/documentation/PHASE/PHASECurveType/sigmoid)

A sigmoid curve.

[`case inverseSigmoid`](/documentation/PHASE/PHASECurveType/inverseSigmoid)

An inverse sigmoid curve.

[`case holdStartValue`](/documentation/PHASE/PHASECurveType/holdStartValue)

A curve that equals its start value for the entire duration.

[`case jumpToEndValue`](/documentation/PHASE/PHASECurveType/jumpToEndValue)

A curve that equals its end value for the entire duration.

### Initializers

[`init?(rawValue: Int)`](/documentation/PHASE/PHASECurveType/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)