<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/AUParameterNode/token(byAddingParameterObserver:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:objc(cs)AUParameterNode(im)tokenByAddingParameterObserver:"
  },
  "title" : "token(byAddingParameterObserver:)"
}
-->

# token(byAddingParameterObserver:)

Adds an observer for a single parameter or all parameters in a group.

```
func token(byAddingParameterObserver observer: @escaping AUParameterObserver) -> AUParameterObserverToken
```

## Parameters

`observer`

A block called after the value of a parameter has changed.

## Return Value

A token which can be passed to the [`removeParameterObserver(_:)`](/documentation/AudioToolbox/AUParameterNode/removeParameterObserver(_:)) or [`setValue(_:originator:)`](/documentation/AudioToolbox/AUParameter/setValue(_:originator:)) methods.

## Discussion

An audio unit view can use an observer to be notified of changes to a single parameter or all parameters in a group. These callbacks are throttled so as to limit the rate of redundant notifications in the case of frequent changes to a single parameter.

This block is called in an arbitrary thread context and it is responsible for thread-safety. It must not make any calls to add or remove other observers, including itself, as this will deadlock.

An audio unit should interact with the parameter node via the [`implementorValueObserver`](/documentation/AudioToolbox/AUParameterNode/implementorValueObserver) and [`implementorValueProvider`](/documentation/AudioToolbox/AUParameterNode/implementorValueProvider) properties.

---

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)