<!--
{
  "documentType" : "article",
  "framework" : "PHASE",
  "identifier" : "/documentation/PHASE/sound-event-nodes",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Sound Event Nodes"
}
-->

# Sound Event Nodes

Objects that connect to form a hierarchical tree of audio actions.

## Discussion

To play sound, your app assembles a hieararchical structure of audio *nodes* that determine which sound to play at the moment. A tree with two sampler nodes branching from a switch node plays only one sampler, depending on your app’s state. You set the control logic in advance that specifies the conditions upon which the switch node toggles. To play the same audio consistently, create a tree with a single sampler node.

To invoke the tree, create a sound event that references the tree and call [`start(completion:)`](/documentation/PHASE/PHASESoundEvent/start(completion:)) on the sound event.

## Topics

### Audio-Providing Nodes

[`class PHASESamplerNodeDefinition`](/documentation/PHASE/PHASESamplerNodeDefinition)

A node that plays complete audio data.

[`enum PHASEPlaybackMode`](/documentation/PHASE/PHASEPlaybackMode)

Loop options for audio playback.

[`class PHASEPushStreamNodeDefinition`](/documentation/PHASE/PHASEPushStreamNodeDefinition)

A node that plays a sequence of audio buffers.

[`class PHASEPushStreamNode`](/documentation/PHASE/PHASEPushStreamNode)

An audio stream you manage to provide a sound buffer data.

[`struct PHASEPushStreamBufferOptions`](/documentation/PHASE/PHASEPushStreamBufferOptions)

Options that inform PHASE of an audio-stream buffer’s playback priority.

[`enum PHASECalibrationMode`](/documentation/PHASE/PHASECalibrationMode)

Calibration options for sound pressure level.

[`class PHASEGeneratorNodeDefinition`](/documentation/PHASE/PHASEGeneratorNodeDefinition)

A base class for nodes that provide audio data to generate sound.

### Control Nodes

[`class PHASESwitchNodeDefinition`](/documentation/PHASE/PHASESwitchNodeDefinition)

A node that passes invocation to only one of its child nodes.

[`class PHASERandomNodeDefinition`](/documentation/PHASE/PHASERandomNodeDefinition)

A sound event node that invokes one of its child nodes at random.

[`class PHASEBlendNodeDefinition`](/documentation/PHASE/PHASEBlendNodeDefinition)

A node that smoothly fades between the audio of its child nodes.

[`class PHASEContainerNodeDefinition`](/documentation/PHASE/PHASEContainerNodeDefinition)

A node that plays all its children at the same time.



---

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)