FFTdemo

所属分类:数学计算
开发工具:Visual Basic
文件大小:81KB
下载次数:11
上传日期:2009-07-21 10:47:28
上 传 者montling
说明:  这是一个用VB实现FFT运算,并且进行简单应用的演示程序。
(This is a FFT algorithm demo, programmed by VB language. The core of this programm is the realization of FFT algorithm by VB language.)

文件列表:
asmwav.lst (3091, 2002-07-27)
FFTdemo.vbp (668, 2002-07-27)
FFTdemo.vbw (111, 2002-07-27)
frmMain.frm (18317, 2002-07-27)
Heart.jpg (67929, 2001-04-07)
ModFFT.bas (5799, 2001-04-07)
ModMain.bas (1209, 2002-07-27)
PhonoForm.frm (5248, 2001-04-07)
FFTdemo.exe (49152, 2002-07-27)
asmwav.dll (20480, 2002-07-27)

This is a demo that shows how you can use the FFT routine. All code is included. Use an 800 X 600 screen. If you have VB6, just load it into your IDE. This program is made up of parts from other programs. That's why you see Global variables even though they don't need to be Globals. I normally use the FFT with data from data files. I set this Demo up to use WAV files as that was easier. I used my own WAV decoder to avoid using DirectX Sound routines (see asmwav.lst). The Digital filter is there to show how some of the features work. There are two major Flags for the FFT routine, gblnInverse and gbytRepeat. Hopefully the gblnInverse is obvious. If gbytRepeat=0 then the complete set of SIN and COS arrays are made. Always start with gbytRepeat=0. If gbytRepeat=1, the SIN and COS arrays are assumed to be there and the sign of the SIN array is reversed. If gbytRepeat=2, the SIN and COS arrays are assumed to be there with no sign reversal. This last is handy where you break a large set of data into smaller pieces and do a Forward transform on each chunk before further processing. This Demo program takes the entire set of WAV data in one gulp. Then to display the Frequency plot in 800 pixels, a running average has to be used. Keep in mind that the number of samples in the results is half the total samples fed to the FFT routine. That is, the FFT makes a mirror image from the center to both ends. That's why the Digital filter has to make three passes at Zeroing the arrays. To get the most accuracy in the display results, the data chunk fed to the FFT should be no more than twice your horizontal pixels. On a repitituous waveform, like a heart sound, it is better to do them in small chunks. I breakup one heart beat length into 512 sample packets and display them one above the other, staggered. See Heart.jpg included in this package. Galen Somerville

近期下载者

相关文件


收藏者