---
title: "addSubtree(_:switchValue:)"
framework: phase
role: symbol
role_heading: Instance Method
path: "phase/phaseswitchnodedefinition/addsubtree(_:switchvalue:)"
---

# addSubtree(_:switchValue:)

Adds a child node with the given switch value.

## Declaration

```swift
func addSubtree(_ subtree: PHASESoundEventNodeDefinition, switchValue: String)
```

## Parameters

- `subtree`: The child node, which itself can contain a hierarchical tree of descendent nodes.
- `switchValue`: The meta parameter value that invokes the subtree child node.

## See Also

### Managing Child Nodes

- [switchMetaParameterDefinition](phase/phaseswitchnodedefinition/switchmetaparameterdefinition.md)
