Sets the master generated-sound volume.
Syntax
Vol level
Description
VOL is the short BASIC-style way to change overall generated-sound loudness. It affects the master level used by sfxlib output rather than one individual channel.
Use VOL when a program only needs to set the volume and does not need to read it back. It is good for simple examples, quick sound tests, and programs written in a compact older BASIC style.
For new code that needs more control, VOLUME is usually clearer because it can set the master level, set a channel level, and return the current level.
Example
vol 8
sound 440, 0.25
sleep 300, 1
Notes
- Use VOLUME for channel-specific volume or when a function return value is needed.
See also