Bypass navigation menu
RGB Classic Games
Keeping the classics alive
Currently hosting 566 great games!
Return to Chapter 2

Noise(Source, Volume, Duration)

Generates a periodic or white noise sound with the specified volume for the specified length of time.

This function works exactly like the NOISE function in the special version of GW-BASIC that came with your Tandy 1000/PCjr. Test it out to hear the difference between the periodic and white noise sound effects. Noises can be made in background if you enable noise buffering. This means that your program will continue to execute while noises are being made. The noise buffer can hold up to 64 entries.

Parameters

Source is a number 0-7:
  0-3 are periodic noises
  4-7 are white noises

Volume is a number 0-15:
  0 is the quietest
  15 is the loudest

Duration is a number 0 to 65535:
This is the number of clock ticks the noise will last. See the FastTimer function for more information on clock ticks.

Examples

BASIC

CALL Noise(4, 8, 12)

PASCAL

Noise(4, 8, 12);