A.D. Fundum wrote:
> Like spacing door hinges when hanging a new door, is there a
> way/formula/trick to improve the DosBeep()-code below in such a way
> that the different frequencies sound as different as possible to a
> human, while the difference between two frequencies sounds spaced
> properly?
>
> For example, it may be hard to hear the difference between 38,000 and
> 39,000 Hz while the difference between 100 and 716 Hz is very, very
> clear. So a fixed value (here: 616) doesn't work well for all
> frequencies.
>
>
You need a geometric sequence, not an arithmetic one; i.e., constant ratio, not constant difference.
If you look at a piano keyboard, the interval between two adjacent keys is a semitone. If even
tempered tuning is used, the ratio of the frequencies of two adjacent keys is 2**(1/12). The A above
middle C is normally tuned to 440Hz (concert pitch). The lowest note on the piano is then 27.5Hz.