Skip to content
Structs

struct SplayN

** SplayN - Splays multiple input channels into N output channels. Different from splay which only outputs stereo, SplayN can output to any number of channels.**

Args:

 num_output_channels: Number of output channels to splay to.
 pan_points: Number of discrete pan points to use for panning calculations. Default is 128.

Returns:

 SIMD[DType.float64, num_output_channels]: The splayed output sample.

Traits: AnyType, Copyable, Movable, UnknownDestructibility

SplayN Parameters

Name Type Description
num_output_channels Int
pan_points Int

SplayN Functions

struct SplayN . fn init

fn init Signature

__init__(out self, world: UnsafePointer[MMMWorld])

fn init Arguments

Name Type Default Description
world UnsafePointer

fn init Returns : Self

Static Method

This is a static method.

struct SplayN . fn next

fn next Signature

next(mut self, input: List[Float64]) -> SIMD[DType.float64, num_output_channels]

fn next Arguments

Name Type Default Description
input List

fn next Returns : SIMD

Functions

(Functions that are not associated with a Struct)

fn pan2

Simple constant power panning function. Args: samples: Mono input sample pan: Pan value from -1.0 (left) to 1.0 (right) Returns: Stereo output as SIMD[DType.float64, 2].

Signature

pan2(samples: Float64, pan: Float64) -> SIMD[DType.float64, 2]

Arguments

Name Type Default Description
samples Float64
pan Float64

Returns

Type: SIMD

fn pan2

Simple constant power panning function for stereo samples. Args: samples: Stereo input sample pan: Pan value from -1.0 (left) to 1.0 (right) Returns: Stereo output as SIMD[DType.float64, 2].

Signature

pan2(samples: SIMD[DType.float64, 2], pan: Float64) -> SIMD[DType.float64, 2]

Arguments

Name Type Default Description
samples SIMD
pan Float64

Returns

Type: SIMD

fn splay

Splay multiple input channels into stereo output. Args: input: List of input samples from multiple channels world: Pointer to MMMWorld containing the pan_window Returns: Stereo output as SIMD[DType.float64, 2].

Signature

splay(input: List[Float64], world: UnsafePointer[MMMWorld]) -> SIMD[DType.float64, 2]

Arguments

Name Type Default Description
input List
world UnsafePointer

Returns

Type: SIMD

fn pan_az

Pan a mono sample to N speakers arranged in a circle around the listener using azimuth panning.

Signature

pan_az[simd_out_size: Int = 2](sample: Float64, pan: Float64, num_speakers: Int64, width: Float64 = 2, orientation: Float64 = 0.5) -> SIMD[DType.float64, simd_out_size]

Parameters

Name Type Description
simd_out_size Int Number of output channels (speakers).

Arguments

Name Type Default Description
sample Float64 Mono input sample.
pan Float64 Pan position from 0.0 to 1.0.
num_speakers Int64 Number of speakers to pan to.
width Float64 2 Width of the speaker array (default is 2.0).
orientation Float64 0.5 Orientation offset of the speaker array (default is 0.5).

Returns

Type: SIMD SIMD[DType.float64, simd_out_size]: The panned output sample for each speaker.


Documentation generated with mojo doc from Mojo version 0.25.6.1