Lingo Dictionary > O-R > pan (sound property) |  |

pan (sound property)

Syntax

    sound(channelNum).pan
    the pan of sound(channelNum)

Description

Property; indicates the left/right balance of the sound playing in sound channel `channelNum`.The range of values is from -100 to 100. -100 indicates only the left channel is heard. 100 indicate only the right channel is being heard. A value of 0 indicates even left/right balance, causing the sound source to appear to be centered. For mono sounds, `pan` affects which speaker (left or right) the sound plays through.

You can change the pan of a sound object at any time, but if the sound channel is currently performing a fade, the new pan setting doesn't take effect until the fade is complete.

To see an example of `pan (sound property)` used in a completed movie, see the Sound Control movie in the Learning\Lingo Examples folder inside the Director application folder.

Example

This Lingo statement pans the sound in sound channel 2 from the left channel to the right channel:

    repeat with x = -100 to 100
    	sound(2).pan = x
    end repeat

See also

`fadeIn()`, `fadeOut()`, `fadeTo()`, `volume (sound channel)`