Skip to content

ChannelPan

Narta Xaymar Dirks edited this page Oct 28, 2026 · 6 revisions

Blitz3DBlitzPlusBlitzBasic

ChannelPan

ChannelPan:Void channel:Int32, pan:Float32
Parameter Mode Type Default Description
channel In Int32 required A channel handle from PlaySound or PlayMusic.
pan In Float32 required -1 is only left, 0 the middle and 1 only right. Values outside that range are limited to it.

Description

Moves a playing channel between the left and the right speaker. It can be called at any time while the sound plays.

Differences

  • Panning is done by turning down the opposite speaker, so the sound does not get louder when it is panned to one side.
  • A debug build (-d) stops the program when the channel was never given out. A channel that is over is fine everywhere, see Debug handle checks.

Examples

; MakeBeep writes beep.wav, see the LoadSound example for the code.
Local snd = LoadSound("beep.wav")
LoopSound snd
Local ch = PlaySound(snd)
For i = 0 To 100
	ChannelPan ch, Sin(i * 7.2)
	Delay 30
Next
StopChannel ch

Related Commands

ChannelPitch, ChannelPlaying, ChannelVolume, PauseChannel, ResumeChannel, SoundPan, StopChannel

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally