Sets or returns the default generated-sound channel.
Syntax
Channel channel
channel = Channel()
Description
CHANNEL selects the default sfxlib channel used by generated-sound commands that do not name a channel themselves. Think of channels as lanes in the sound mixer. Each lane can have its own pan, volume, and current generated sound behavior.
Using separate channels keeps a program organized. For example, one channel can be used for melody, another for warning beeps, and another for generated effects. Commands such as TONE, PAN, and VOLUME can then target a specific channel.
Calling CHANNEL as a function returns the current default channel.
Example
channel 2
sound 440, 0.20
print "current channel="; channel()
Notes
See also