setPan()
Purpose
Change the audio stero position
Description
Set the stereo position for an audio channel
Syntax
setPan( channel, pan )
Arguments
channel audio channel from 0 to 15
pan stereo pan from left (0) to right (1)
Example
handle = loadAudio( "David Silvera/music_evil_presence" )
vol = 0.5
pan = 0.5
speed = 1
playAudio( 0, handle, vol, pan, speed, -1 )
loop
clear()
c = controls( 0 )
printat( 0, 0, "Use left arrow to pan left" )
if c.left then
pan -= 0.01
endIf
printAt( 0, 1, "Use right arrow to pan left" )
if c.right then
pan += 0.01
endIf
pan = max( pan, 0 )
pan = min( pan, 1 )
setPan( 0, pan )
printAt( 0, 2, "Pan: ", pan )
update()
repeat
Associated Commands
audioLength(), getChannelStatus(), loadAudio(), note2Freq(), playAudio(), playNote(), setClipper(), setFilter(), setVolume(), startChannel(), stopChannel()