TONE
Format: TONE (X, Y, Z)
Supported by: Pecom 32 BASIC, Pecom 64 BASIC 1.0 and 4.0
Similar commands:
COMX BASIC V1.00: TONE / MUSIC
Floating Point BASIC 2.2: TONE / FREQ
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 0, 1, 2, ... to 127.
Y determines the octave, and can vary from 0, 1, 2, ... to 7.
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 + 1
Where the Input frequency is calculated based on the octave, specified by Y. see table 1 below.
Y |
Input frequency (Hz) CPU: 2.813 |
---|---|
0 | 5494.1406 |
1 | 10988.281 |
2 | 21976.563 |
3 | 43953.125 |
4 | 87906.250 |
5 | 175812.50 |
6 | 351625.00 |
7 | 703250.00 |