Splay:
Filter:
Classes | UGens > Multichannel > Panners

Splay : UGen : AbstractFunction : Object

Splay spreads an array of channels across the stereo field
Source: Splay.sc

Description

Splay spreads an array of channels across the stereo field. Optional arguments are spread and center, and equal power levelCompensation. The formula for the stereo position is ((0 .. (n - 1)) * (2 / (n - 1)) - 1) * spread + center

Class Methods

Splay.ar(inArray, spread: 1, level: 1, center: 0.0, levelComp: true)

Splay.kr(inArray, spread: 1, level: 1, center: 0.0, levelComp: true)

Arguments:

inArray

The array of channels to be distributed over the two stereo pairs

spread

For spread = 0, all channels end up in the centre, for 1, they have maximum distribution

level

An amplitude multiplier for all channels

center

Shift the centre of the distribution.

levelComp

a flag or numeric value:

  • true : maintain equal power, keeping overall loudness the same.
  • false : off / no level change,
  • float between 0.0 and 1.0 : smooth tuning of levelComp factor:
    • 0.0 is none -> factor 1
    • 0.5 is equal power -> factor (1/n).squared
    • 1.0 is equal amplitude -> factor (1/n)

Splay.arFill(n, function, spread: 1, level: 1, center: 0.0, levelComp: true)

In analogy to Mix:arFill, this method takes a function that produces the channels. The counting index is passed to it.

Arguments:

n

Number of channels

function

Function to return each channel

spread

For spread = 0, all channels end up in the centre, for 1, they have maximum distribution

level

An amplitude multiplier for all channels

center

Shift the centre of the distribution.

levelComp

see above

Inherited class methods

Instance Methods

Inherited instance methods

Examples

Basic usage:

NOTE: levelComp new takes multiple input options: true, false as before for rough equal power level compensation, and newly added: a float between 0 and 1. This is to offer more choices for level compensation, such as equal maximum amplitude.

For a full discussion, see LevelComp; here is an overview of the levelComp variants: