pub struct PannerBlock<S>where
S: Sample,{
pub position: Parameter<S>,
pub azimuth: Parameter<S>,
pub elevation: Parameter<S>,
/* private fields */
}Expand description
A spatial panning block supporting stereo, surround, and ambisonic formats.
§Stereo Mode
Position ranges from -100 (full left) to +100 (full right). Uses constant-power pan law for smooth transitions.
§Surround Mode
Uses Vector Base Amplitude Panning (VBAP) with azimuth and elevation. Supports 5.1 and 7.1 speaker layouts.
§Ambisonic Mode
Encodes mono input to SN3D normalized, ACN ordered B-format. Supports 1st through 3rd order (4, 9, or 16 channels).
Fields§
§position: Parameter<S>Pan position: -100 (left) to +100 (right). Used in stereo mode.
azimuth: Parameter<S>Source azimuth in degrees (-180 to +180). Used in surround/ambisonic modes. 0 = front, 90 = left, -90 = right, 180/-180 = rear.
elevation: Parameter<S>Source elevation in degrees (-90 to +90). Used in surround/ambisonic modes. 0 = horizon, 90 = above, -90 = below.
Implementations§
Source§impl<S> PannerBlock<S>where
S: Sample,
impl<S> PannerBlock<S>where
S: Sample,
Sourcepub fn new(position: f64) -> PannerBlock<S>
pub fn new(position: f64) -> PannerBlock<S>
Create a new stereo panner with the given position (-100 to +100).
Sourcepub fn new_stereo(position: f64) -> PannerBlock<S>
pub fn new_stereo(position: f64) -> PannerBlock<S>
Create a new stereo panner with the given position (-100 to +100).
Sourcepub fn centered() -> PannerBlock<S>
pub fn centered() -> PannerBlock<S>
Create a centered stereo panner.
Sourcepub fn new_surround(layout: ChannelLayout) -> PannerBlock<S>
pub fn new_surround(layout: ChannelLayout) -> PannerBlock<S>
Create a surround panner for the given layout.
Supports Surround51 and Surround71 layouts.
Uses VBAP (Vector Base Amplitude Panning) algorithm.
Sourcepub fn new_ambisonic(order: usize) -> PannerBlock<S>
pub fn new_ambisonic(order: usize) -> PannerBlock<S>
Create an ambisonic encoder for the given order (1-3).
- Order 1: First-order ambisonics (4 channels: W, Y, Z, X)
- Order 2: Second-order ambisonics (9 channels)
- Order 3: Third-order ambisonics (16 channels)
Uses SN3D normalization and ACN channel ordering.