Skip to content

signal.AdaptiveStft.Function.getSingle_maxWindow

Christian d'Heureuse edited this page Jun 7, 2026 · 2 revisions

dsp-collection / signal/AdaptiveStft / getSingle_maxWindow

Function: getSingle_maxWindow()

function getSingle_maxWindow(
   samples, 
   roughFrequency, 
   roughWindowCenterPosition, 
   maxWindowWidth, 
   windowFunction): 
  | ComponentResult
  | undefined;

Defined in: signal/AdaptiveStft.ts:88

Computes a variable width short time fourier transform for a single sine wave component, by optimally utilizing a given maximum window width.

The largest possible window is used that corresponds to an integral number of oscillations of the specified frequency.

Parameters

samples

Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>

The input signal.

roughFrequency

number

The rough frequency of the sine wave component to be computed. The specified value is adjusted to the nearest value that allows a computation without subsampling. The unit of the specified frequency value is 1/samples (normalized frequency).

roughWindowCenterPosition

number

The rough center position of the window (in sample positions).

maxWindowWidth

number

The maximum window width (in sample positions).

windowFunction

| WindowFunction | undefined

A window function or undefined for no windowing (i.e. for using a rectangular window).

Returns

| ComponentResult | undefined

The result structure, or undefined if the result cannot be computed.

Clone this wiki locally