WNOISE
Format: var = WNOISE (Y, Z)
Supported by: Telmac SBASIC v 24.3
Similar commands:
COMX BASIC V1.00: NOISE
The WNOISE command is in the form, WNOISE (Y,Z).
Y determines the frequency range of the Gaussian white noise, and can vary from 0, 1, 2,... to 7.
Z determines the amplitude and can vary from 0, 1, 2,... to 15.
Try
PRINT WNOISE (1, 1)
followed by pressing CR, and note the noise effect.
Try
PRINT WNOISE (1,2)
and note the increase in loudness (or amplitude).
Try
PRINT WNOISE (2,2)
and note the increase in pitch (or frequency).
To turn-off the noise operator, type
PRINT WNOISE (0,0)
Again, always remember to terminate a command by pressing CR.
Note that the value returned from the WNOISE command represents the value of bit 8 to 15 (shifted 8 bits to the right) from OUT 5 as in the following table.
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Off |
Range |
Noise volume |
Video bits... |
Gaussian white noise, is noise that can be heard between stations when turning an "FM" radio. This type of noise, which contains many different frequencies is very useful in producing sound effects.