Help for the QB64 SOUND command indicates that the syntax looks like this:
SOUND frequency, duration
Valid values for frequency are supposed to be in the range of 37 to 32767. However, I notice that as I increase the frequency, somewhere in the vicinity of 13,300, as I increase the frequency value, the frequency of the sound actually decreases.
I do realize that we are talking about getting up to some very high frequencies here, but I do actually have a very valid reason for wanting to generate such high frequency sounds. My goal is actually to get up to about 20,000 (20KHz).
Here is a super simple code snippet showing the problem. The program will print the frequency about to be played, then play that sound very briefly. It will then increase the frequency by 50 Hz and repeat. Note how somewhere around 13,300 the frequency of the sound being played actually goes down.
FOR x = 12500 TO 20000 STEP 50
PRINT x
SOUND x, 20
NEXT x