TONE
Format: TONE (X, Y, Z)
Supported by: COMX BASIC V1.00
Similar commands:
COMX BASIC V1.00: MUSIC
Floating Point BASIC 2.2: TONE / FREQ
Pecom 32 BASIC, Pecom 64 BASIC 1.0 and 4.0: TONE
Telmac SBASIC v 24.3: BEEP
The TONE command sends out a continuous tone. It is in the form, TONE (X, Y, Z), where X determines the frequency, and can vary from 1, 2, ... to 128.
Y determines the octave, and can vary from 1, 2, ... to 8.
Z determines the amplitude and can vary from 0, 1,... to 15.
The actual generated tone frequency is calculated as follows:
Input frequency
Tone frequency =
X
Where the Input frequency is calculated based on the octave, specified by Y. See table 1 below.
Y |
Input frequency (Hz) CPU: 2.813 |
Input frequency (Hz) CPU: 2.835 |
---|---|---|
1 | 5494.1406 | 5537.1094 |
2 | 10988.281 | 11074.219 |
3 | 21976.563 | 22148.438 |
4 | 43953.125 | 44296.875 |
5 | 87906.250 | 88593.750 |
6 | 175812.50 | 177187.50 |
7 | 351625.00 | 354375.00 |
8 | 703250.00 | 708750.00 |