Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WAV format and graphics

2 views
Skip to first unread message

wang

unread,
Jan 23, 2006, 1:58:46 PM1/23/06
to
Hi all,
I've tried to read documents on wav format in order to paint the sine
(or zigzag) curve. But the documents I've read tell only where the
sound data are to be found in the file, they do not explain how such
data should be interpreted to paint the curve. Where can such
information
be found? or are there already program codes for performing such
task (I mean painting the sine curve)? Many thanks in advance.

k.w.wang


not...@aol.com

unread,
Feb 2, 2006, 11:54:04 AM2/2/06
to
I will assume your only interested in 16 bit stereo data.

Its stored as positive and negative numbers, with negative numbers
stored as 2's compliment of the number.

see http://en.wikipedia.org/wiki/Two's_complement

These numbers represent the volume level taken at what ever the sample
rate was for the sample.

So to graph them you just plot volumes along a horizontal line.

Take a sample, and erase one of the two stereo sides, save the file and
then take a look at the data, will help you learn to sort out left and
right side.

Load it back into a sample editor.

see http://ccrma.stanford.edu/courses/422/projects/waveFormat/


Erik de Castro Lopo

unread,
Feb 3, 2006, 1:23:26 PM2/3/06
to

libsndfile ( http://www.mega-nerd.com/libsndfile/ ) is a library
for reading and writing sound files.

In the examples/ directory of the source code tarball there
is am example program called make_sine.


Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
Question #10342: Ruling on a Muslim eating with a kaafir
http://islamqa.com/index.php?ln=eng&ds=qa&lv=browse&QR=10342&dgn=4

0 new messages