I was playing with the sound procedure included in the Crt unit and

found a strange problem that I havent seen an answer to solving in the

manuals.

I used an equation I found in a old math book that allowed me to

find notes based on the fact middle a s 440 hz. The equation is the

frequency wanted is = 440 * 12root\/2^n where n is number of notes

above or below a. Using this formula I was able to get my programs to

play scales, etc.. The problem is that as the frequency increase the

duration decreases. So if I had a program play mid c to high c like

the following

playNote( note : integer; duration : integer);

begin

figure out freq.

sound(freq);

delay(duration);

nosound;

end;

playnote(midc,200);

playnote(midd,200);

playnote(mide,200);

......

......

playnore(highc,200); <--- By the time I get here the duration

has just about halfed!?

Is there a way to get around this? Why is this occuring? Is there a

equation that can compensate for difference in duration based on

frequency?

any answers or pointers appreciated,

=Brent Hostetler ============================

================== www.kaiwan.com/~brenth ===

+===========================================+