<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vDSP/formWindow(usingSequence:result:isHalfWindow:)-9dls5",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate4vDSPO10formWindow13usingSequence6result06isHalfD0yAC0dF0O_xzSbtAA0A13MutableBufferRzSf7ElementRtzlFZ"
  },
  "title" : "formWindow(usingSequence:result:isHalfWindow:)"
}
-->

# formWindow(usingSequence:result:isHalfWindow:)

Populates a single-precision vector with a specified window.

```
static func formWindow<V>(usingSequence sequence: vDSP.WindowSequence, result: inout V, isHalfWindow: Bool) where V : AccelerateMutableBuffer, V.Element == Float
```

## Parameters

`sequence`

The window sequence to use for generation.

`result`

The destination vector that receives the result.

`isHalfWindow`

A Boolean value that specifies whether the function generates half of the number of elements.

## Discussion

Use this function to populate a vector with values of a specified window sequence.

The following code shows how to generate a single-precision Blackman window:

```swift
var c = [Float](repeating: 0,
                count: 1024)

vDSP.formWindow(usingSequence: .blackman,
                result: &c,
                isHalfWindow: false)
```

The following figure illustrates the values of the output vector, `c`:

![Visualization of a Blackman window.](images/com.apple.accelerate/media-3362250@2x.png)

---

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)