Name
SetPanning -- set sample panning (V1.9)
Synopsis
SetPanning(id, pan)
Function
This function allows you to specify where the sample with the identifier id shall be played. The parameter pan ranges from 0 to 255 where 0 means that the sample will only be played through the left speaker and 255 means that the sample will only be played through the right speaker. If you want to play the sample through both speakers at the same level, use 128 which is also the default.

You can also specify the special constances #LEFT, #CENTER, and #RIGHT which correspond to 0, 128, and 255, respectively.

If the sample is currently playing, the panning will be modified on-the-fly which can be used for some nice effects.

Inputs
id
identifier of the sample to use
pan
new pan value (ranges from 0 to 255)
Example
SetPanning(1, 255)
PlaySample(1)
The code above will play the sample only through the right speaker.

Show TOC