I have some oscillating function I want to listen to. It's easy enough
for me to sample the function periodically and convert the amplitude to
a number in 0..65535, mean 32768. But then what? Can I feed a bunch
of these numbers into some free software and produce a .WAV file? Or
do I have to generate something more complicated than that as input?
<bob_jenkins@burtleburtle.net> wrote in message
news:1116459266.634938.54750@g43g2000cwa.googlegroups.com...
> I have some oscillating function I want to listen to. It's easy enough
> for me to sample the function periodically and convert the amplitude to
> a number in 0..65535, mean 32768. But then what? Can I feed a bunch
> of these numbers into some free software and produce a .WAV file? Or
> do I have to generate something more complicated than that as input?
The shareware (try-before-you-buy) program Goldwave includes an expression
evaluator
To give some idea, a supplied example is the following
>I have some oscillating function I want to listen to. It's easy enough
>for me to sample the function periodically and convert the amplitude to
>a number in 0..65535, mean 32768. But then what? Can I feed a bunch
>of these numbers into some free software and produce a .WAV file? Or
>do I have to generate something more complicated than that as input?
Many audio editors are able to process raw data, but you are asked for
the sample rate, word length, number of channels.
OTOH you may add a wave header to your data and thusly produce a wav
format. For a simple applicatin the wave header is simple as you need
only the format chunk and the data chunk.
The format chunk contains the sample rate, number of channels, word
length, block alignment, data format and such. The data chunk contains
the number of data bytes and the sample numbers in Intel format (low
order byte first). For more information you may look at www.wotsit.org goto "Sound and Music" and on page 8 you'll see three entries for wav.
The first entry is what you need.
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.