struct WindowTypes¶
Traits: AnyType, UnknownDestructibility
(Functions that are not associated with a Struct)
fn bessel_i0¶
Calculate the modified Bessel function of the first kind, order 0 (I₀). Uses polynomial approximation for accurate results.
Signature
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| x | Float64 |
— | Input value |
Returns
Type: Float64
fn kaiser_window¶
Create a Kaiser window of length n with shape parameter beta.
Signature
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| size | Int64 |
— | — |
| beta | Float64 |
— | Shape parameter that controls the trade-off between main lobe width and side lobe level |
| - beta = 0: rectangular window | |||
| - beta = 5: similar to Hamming window | |||
| - beta = 6: similar to Hanning window | |||
| - beta = 8.6: similar to Blackman window |
Returns
Type: List
DynamicVector[Float64] containing the Kaiser window coefficients
fn build_sinc_table¶
Build a sinc function lookup table.
Signature
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| size | Int64 |
— | Number of points in the table |
| ripples | Int64 |
4 |
Number of ripples/lobes on each side of the main lobe |
Returns
Type: List
List containing the sinc function values
fn hann_window¶
Generate a Hann window of length n.
Signature
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| n | Int64 |
— | Length of the window |
Returns
Type: List
fn hamming_window¶
Generate a Hamming window of length n.
Signature
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| n | Int64 |
— | — |
Returns
Type: List
fn blackman_window¶
Generate a Blackman window of length n. Args: n: Length of the window Returns: List containing the Blackman window values
Signature
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| n | Int64 |
— | — |
Returns
Type: List
fn sine_window¶
Generate a Sine window of length n. Args: n: Length of the window Returns: List containing the Sine window values
Signature
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| n | Int64 |
— | — |
Returns
Type: List
fn pan_window¶
Generate a SIMD[DType.float64, 2] quarter cosine window for panning. value 0 is for the left channel, value 1 is for the right channel. 0 = cos(0) = 1.0 (full left) 1 = cos(pi/2) = 0.0 (no left)
Signature
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| size | Int64 |
— | Length of the window |
Returns
Type: List
Documentation generated with mojo doc from Mojo version 0.25.6.1