Re: Sound and Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg19779] Re: Sound and Mathematica
- From: "Stephen P Luttrell" <luttrell at signal.dra.hmg.gb>
- Date: Fri, 17 Sep 1999 01:36:38 -0400
- Organization: Defence Evaluation and Research Agency
- References: <7rnjrt$ekp@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
> I've a problem with mathematica: I want to create a sound which > includes all frequencies between 20 Hz and 20 000 Hz. The sound should > begin at 20 Hz and stop at 20 000 Hz and should increase linearly. For > testing it, I used the following mathematica command (20 - 4000 Hz): > (Later I want to replace 4000 by 20 000) > > Play[Sin[4000 t 2 Pi t], {t, 0, 1}]] > > But the frequency, on which this generated sound stops was much more > higher than 4000 Hz! What's my mistake? Frequency is the instantaneous rate of change of phase, divided by 2 Pi. Differentiating your 4000 t 2 Pi t with respect to t (and dividing by 2 Pi) gives 2 4000 t, which is equal to 8000 when t=1. To correct for this, you need to include an additional factor of 1/2 in your original expression for the phase. -- Dr Stephen P Luttrell Room EX21, Defence Evaluation and Research Agency Malvern, Worcs, WR14 3PS, U.K. luttrell at signal.dera.gov.uk 01684-894046 (phone), 01684-894384 (fax) http://www.dera.gov.uk/cis5pip/Welcome.html