---
title: "init(pasteboard:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nssound/init(pasteboard:)"
---

# init(pasteboard:)

Initializes the receiver with data from a pasteboard. The pasteboard should contain a type returned by NSSound. NSSound expects the data to have a proper magic number, sound header, and data for the formats it supports.

## Declaration

```swift
init?(pasteboard: NSPasteboard)
```

## Parameters

- `pasteboard`: The pasteboard containing the audio data with which the receiver is to be initialized. The pasteboard must contain a type returned by doc://com.apple.appkit/documentation/AppKit/NSSound. The contained data must have a proper magic number, sound header, and data for the formats the NSSound class supports.

## Return Value

Return Value Initialized NSSound instance.

## See Also

### Creating Sounds

- [canInit(with:)](appkit/nssound/caninit(with:).md)
- [init(contentsOfFile:byReference:)](appkit/nssound/init(contentsoffile:byreference:).md)
- [init(contentsOf:byReference:)](appkit/nssound/init(contentsof:byreference:).md)
- [init(data:)](appkit/nssound/init(data:).md)
