delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/23/19:20:42

From: "Robin Y. Millette" <millette AT my-deja DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Sound C++ with DJGPP
Date: Wed, 23 Jun 1999 10:45:58 GMT
Organization: Waglo Institution
Lines: 32
Message-ID: <7kqdt5$3lu$1@nnrp1.deja.com>
References: <3768A98B DOT 47FBAC85 AT computerpro DOT com> <376944DE DOT 2EEABF6B AT computerpro DOT com> <929775095 DOT 676729 AT diddley DOT primus DOT com DOT au> <37703244 DOT 48BB0E5C AT computerpro DOT com>
NNTP-Posting-Host: 207.96.232.139
X-Article-Creation-Date: Wed Jun 23 10:45:58 1999 GMT
X-Http-User-Agent: Mozilla/4.0 (Windows 95;US) Opera 3.60 [en]
X-Http-Proxy: 1.0 x36.deja.com:80 (Squid/1.1.22) for client 207.96.232.139
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <37703244 DOT 48BB0E5C AT computerpro DOT com>,
  paradise AT computerpro DOT com wrote:
> hmm...
>
> The problem I'm having with sound( ) and nosound( ) and delay( ) is that I
> don't know the syntax of what goes in ( ).
>
> In replace of sound( int _Frequency)
> ie. sound(A5)?????????? or something??????
> anyone know what I mean


I can give you a few hints, but this is off-topic so mail me for more...

middle A is 440 hertz (the _Frequency arg).
the octave above: 880 hz.
and below: 220 hz.

So for the next octave, you double the frequency. Since there are 12
semi-tones in our chromatic scale, you are looking for a number you can
multiply 12 times itself and get 2, or this: x ^ 12 = 2, or 2 ^ (1/12) =  x,
or x =	1.059463094359.

a,  a#,  b,  c 440 * 1.06 * 1.06 * 1.06 =  523,2511306008 (for the first c
after the middle a).

This make any sense?



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019