On Jul 12, 2006, at 8:10 AM, Aleksi Strandberg wrote:
Anyone have experience with audio waveform drawing?
Currently what i've done:
I have a 512 pixels wide picture.
i divide the PCM data to 512 blocks, and from each block i count
the average (i also tested maximum)
However, this doesn't draw correct waveform display, when compared
to pro sound editors.
Any ideas?
Something I've tried before: don't average. Just take the nth value
and use that. If you're doing this for 44khz, say, 512 is a pretty
small fraction thereof and the result looks pretty similar to what
I've seen in commercial editors. Then, don't limit yourself to a 512
wide picture. Make it as large as it needs to be to suck in all the
data. Once you've drawn the picture, scale it to your desired Canvas
size to draw.
As for the RMS suggestion Jim Payne made, here's a good link about
how to calculate that. (bottom of page)
http://physics.bu.edu/py106/notes/Power.html
Best,
Erick
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>