AminetAminet
Search:
84783 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/c/fftPPC.lha

Mirror:Random
Showing: ppc-morphos icongeneric icon
No screenshot available
Short:FFT program and test signal generator (PPC)
Author:Steve Sampson, Andreas R. Kleinert (Amiga port)
Uploader:info ar-kleinert de
Type:dev/c
Architecture:ppc-powerup
Date:2000-06-01
Download:dev/c/fftPPC.lha - View contents
Readme:dev/c/fftPPC.readme
Downloads:676

 *************************************************************************

   The FFT program and test signal generators included in the archive, can be
used to perform signal analysis in the frequency domain, using samples in the
time domain.  Historically the applications have ranged from music to radar. [...]

The original Byte Magazine program (see references below) was designed for real
data only.  In my experiments I needed to preserve both real and imaginary
data.  If you feed the FFT real data only, then the output will be a mirror
image, and you can ignore the left side.  Two signal generators are included.
One generates sine waves (sine) and the other generates pulses (pulse).  Some
papers I found on the subject of FFTs are included at the end.  There are
several books devoted to the subject also. [...]

For the Amiga example (based on Unix code) try:

        sine 16 in
        1000
        3000

Which will sample the 1 Khz data every 333 microseconds (1 / 3 Khz).  Note: The
sample frequency should be greater than 2 times the input frequency (Nyquist
and all that...).

Then run fft:

        fft 16 in out

And you should see a display like so:

0       |=======                                      (-1500.0 Hz)
1       |=====                                        (-1312.5 Hz)
2       |====                                         (-1125.0 Hz)
3       |====                                          (-937.0 Hz)
4       |===                                           (-750.0 Hz)
5       |===                                           (-562.5 Hz)
6       |===                                           (-375.0 Hz)
7       |===                                           (-187.5 Hz)
8       |====           <-------   DC                   (000.0 Hz)
9       |====           <-------   Fundamental          (187.5 Hz)
10      |======         <-------   Second Harmonic      (375.0 Hz)
11      |========                                       (562.5 Hz)
12      |==============                                 (750.0 Hz)
13      |========================================================
14      |============================               (1125.0 Hz) ^
15      |===========                                (1312.5 Hz) |
                                                                |
                                [13 - 8 (center)] * 187.5 = 937.0 Hz

The fundamental display frequency is:

        T  = Time Increment Between Samples
        N  = Number Of Samples
        Tp = N * T

        Then F = 1 / Tp

        In the example above, the time increment between samples is
        1 / 3000 or 333 microseconds.  N = 16, so Tp = 5333 microseconds
        and 1 / .005333 is 187.5 Hz.

        Therefore each filter is a multiple of 187.5 Hertz.  Filter 8 in this
        example is center, so that would be zero, 9 would be one, etc.

[...]

 *************************************************************************

 The Amiga PPC version comes with the three programs fft.elf, pulse.elf and
 sine.elf, which all were derived from the unix version - with slight
 modifications.

 Maybe someone likes to do a graphical interface for this code...

 --
 ARK, 31/May/2000


Contents of dev/c/fftPPC.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 5546   15702  35.3% -lh5- 643d May 31  2000 fftPPC/FFT.C
[generic]                28602   71855  39.8% -lh5- d624 May 31  2000 fftPPC/fft.elf
[generic]                17174   17174 100.0% -lh0- 9c27 May 31  2000 fftPPC/fft_c.zip
[generic]                 1264    3353  37.7% -lh5- 66ff May 31  2000 fftPPC/fftPPC.readme
[generic]                   88     140  62.9% -lh5- 7fef May 31  2000 fftPPC/include/malloc.h
[generic]                  383     921  41.6% -lh5- 2681 May 13  1991 fftPPC/MAKEFILE
[generic]                  536     985  54.4% -lh5- e950 May 31  2000 fftPPC/PULSE.C
[generic]                19918   44096  45.2% -lh5- 8c5e May 31  2000 fftPPC/pulse.elf
[generic]                 2746    5665  48.5% -lh5- afad May 31  2000 fftPPC/READ.DOC
[generic]                  151     238  63.4% -lh5- bdda May 31  2000 fftPPC/SCOPTIONS
[generic]                  625    1139  54.9% -lh5- 2ca7 May 31  2000 fftPPC/SINE.C
[generic]                25924   58876  44.0% -lh5- 5b82 May 31  2000 fftPPC/sine.elf
[generic]                  183     605  30.2% -lh5- cebe May 31  2000 fftPPC/smakefile
[generic]                 2279    6095  37.4% -lh5- 006d May 31  2000 fftPPC/UFFT.C
[generic]                  811    1760  46.1% -lh5- 28ea May 31  2000 fftPPC/UPULSE.C
[generic]                 2194    5220  42.0% -lh5- 1369 May 31  2000 fftPPC/UREAD.DOC
[generic]                  893    1910  46.8% -lh5- 216a May 31  2000 fftPPC/USINE.C
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        17 files  109317  235734  46.4%            May 31  2000
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>