ExtSound(Frequency, Duration, Volume, Channel)
Generates a sound with the specified frequency, duration, volume, and sound channel.
This function works exactly like the SOUND function in the special version of GW-BASIC that came with you Tandy 1000/PCjr. Sounds can be made in background if you enable sound buffering. This means that your program will continue to execute while sounds are being made. Each sound channel has its own sound buffer. Each buffer can hold up to 64 entries.
Parameters
Frequency is a number 110 - 32767:
This is the tone to produce in Hertz. Certain frequencies correspond to
musical notes. The following chart shows the frequency for each
corresponding note:
Note | Freq | Note | Freq | Note | Freq | Note | Freq |
---|---|---|---|---|---|---|---|
C2 | 65 | A3 | 220 | F#5 | 740 | C7 | 2489 |
C#2 | 69 | A#3 | 233 | G5 | 784 | C#7 | 2637 |
D2 | 73 | B3 | 247 | G#5 | 831 | D7 | 2794 |
D#2 | 78 | C4 | 262 | A5 | 880 | D#7 | 2960 |
E2 | 82 | C#4 | 277 | A#5 | 932 | E7 | 3136 |
F2 | 87 | D4 | 294 | B5 | 988 | F7 | 3322 |
F#2 | 93 | D#4 | 311 | C6 | 1047 | F#7 | 3520 |
G2 | 98 | E4 | 330 | C#6 | 1109 | G7 | 3729 |
G#2 | 104 | F4 | 349 | D6 | 1175 | G#7 | 3951 |
A2 | 110 | F#4 | 370 | D#6 | 1245 | A7 | 4186 |
A#2 | 116 | G4 | 392 | E6 | 1319 | A#7 | 4435 |
B2 | 123 | G#4 | 415 | F6 | 1397 | B7 | 4699 |
C3 | 131 | A4 | 440 | F#6 | 1480 | C8 | 4978 |
C#3 | 139 | A#4 | 466 | G6 | 1568 | C#8 | 5274 |
D3 | 147 | B4 | 494 | G#6 | 1661 | D8 | 5587 |
D#3 | 156 | C5 | 523 | A6 | 1760 | F#8 | 5919 |
E3 | 165 | C#5 | 554 | A#6 | 1865 | G8 | 6271 |
F3 | 175 | D5 | 587 | B6 | 1976 | G#8 | 6645 |
F#3 | 185 | D#5 | 622 | D#8 | 2093 | A8 | 7040 |
G3 | 196 | E5 | 659 | E8 | 2217 | A#8 | 7459 |
G#3 | 208 | F5 | 698 | F8 | 2349 | B8 | 7902 |
The Texas Instruments SN76496 sound chip in the Tandy 1000 cannot produce frequencies below 110 Hertz. If you use the above chart please remember you cannot make notes below A2.
Duration is a number 0 - 65535:
This is the number of clock ticks the sound will last. See the FastTimer function for more information on clock ticks.
Volume is a number 0 - 15:
0 is the quietest.
15 is the loudest.
Sound channel is a number 0 - 2:
This is the sound channel to use when producing the sound. You can set each sound channel to a different tone to make a 3-note chord.