Noise
 
Plays generated noise through sfxlib.

Syntax

Noise channel, duration, volume
Noise channel, frequency, duration, volume

Description

NOISE creates an unpitched or partly pitched noisy sound instead of a clean musical tone. It is meant for effects such as hiss, static, wind, simple percussion, explosions, and retro game noise.
The short form selects a channel, duration, and volume. The four-argument form also supplies a frequency or color value, which changes the character of the noise so it can sound brighter, lower, rougher, or more focused depending on the backend and generator.
Because noise is generated by sfxlib, it does not need an external audio file. That makes it useful for quick effects and tests.

Example

noise 0, 0.25, 0.4
noise 1, 1200, 0.25, 0.4
Sleep 300, 1


Platform Differences

  • Use SFX when you need a recorded sample instead of generated noise.

Differences from QB

`t- New to FreeBASIC.

See also