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

dev/src/FFT_AMIGA.py.txt

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Simple FFT for AMIGA Python 2.0.x.
Author:wisecracker.bazza at gmail.com (Barry Walker)
Uploader:LAG. (Lincs AMIGA Group)
Type:dev/src
Version:1.00.10
Architecture:generic; m68k-amigaos
Date:2018-08-21
Download:http://aminet.net/dev/src/FFT_AMIGA.py.txt - View contents
Readme:http://aminet.net/dev/src/FFT_AMIGA.py.readme
Downloads:887
Distribution: Public Domain, Emailware.

============================================================================

Architectures: Classic AMIGAs, WinUAE, FS-UAE, (Windows? Linux?).
-----------------------------------------------------------------

  MINIMUM Requirements Are:-
  --------------------------

  1) Amiga environment:-
       68030 CPU, MMU and COPRO. 6MB RAM total, OS 3.1.x.
       (It might work on OS 3.0.x if you are lucky.)
       WinUAE 1.5.3, minimum.
       FS-UAE on OSX 10.13.6 and Linux Mint 19.
       Standard OS 3.1.x install or better.
       Full Python 2.0.x, minimum, installed, (full install on AMINET).

  2) Apple OSX 10.12.x and higher using default Python 2.7.x, plus 3.5.2.
  3) Python 2.0.x to 3.7.0 on Windows and Linux flavours.

----------------------------------------------------------------------------

  History:-
  ---------

  21-08-2018.
  -----------

  Version 1.00.10. Modified to work on any platform from Python Versions
                   2.0.x to 3.7.0, (current as of the above date).

  20-17-2017.
  -----------
  Version 1.00.00. Probably the one and only upload for this archive.

----------------------------------------------------------------------------

  General:-
  ---------

  (Apologies for any typos, etc...)

  'FFT_AMIGA.py.txt'

  This is the simplest implimentation of a basic FFT function for the
  Classic AMIGA. Because the old tub has only got Python 2.0.1 maximum and
  no 'numpy', 'scipy' or other complex mathematical and scientific libraries
  at its disposal then after much research, learning and jiggery pokery I
  came up with this. The ONLY library/module required is the builtin 'cmath'
  one. No other dependencies or modules are needed at all, just the default
  Python 2.0.x installation from AMINET.

  Slowish? Compared to today, yes, but remember, the AMIGA A1200 has not got
  simple FFT capabilities that it can lay its hands on within an ordinary
  scripting language. One can adapt C source to handle basic FFT and I tried
  it but the ease of writing with a scripting language took a hold of me,
  and this is the result.

  The WWW is a wonderful thing and my knowledge, term used loosely, has
  improved on this item. Thanks to all those hidden people that have given
  their knowledge and coding prowess away for free. Without you folks I
  would not have gotten this working for the Classic AMIGA A1200 with the
  minimum requirements above.

  OK, enough of the waffle. If you are in need of a very basic FFT function
  just download 'FFT_AMIGA.py.txt' and save it inside your PYTHON: volume.
  Rename the file to FFT_AMIGA.py and you are ready to roll.
  From the AMIGA Python20 prompt enter:-

  >>> execfile("PYTHON:FFT_AMIGA.py")<ENTER>

  And an FFT of a 2 cycle, 64 sample, square wave will be created.
  Can this be improved to work on Python 1.4.0 also?
  Now that there is a building block to work with basic work can be done on
  say audio waveforms, sadly though, not in real time; but hey we didn't
  have ANY FFT before...

  Finally, the code has all the values expected commented out as a
  comparison for your system and current hardware with their versions of
  Python.

  The new core of the FFT function is now:
  [CODE]
  def fft(DATA):
          N=len(DATA)
          if N<=1: return DATA
          EVEN=fft([DATA[K] for K in range(0,N,2)])
          ODD=fft([DATA[K] for K in range(1,N,2)])
          L=[EVEN[K]+cmath.exp(-2j*cmath.pi*K/N)*ODD[K] for K in
range(int(N/2))]           R=[EVEN[K]-cmath.exp(-2j*cmath.pi*K/N)*ODD[K] for K
in range(int(N/2))]           return L+R   [/CODE]

  Enjoy...

  Bazza...

----------------------------------------------------------------------------

  This archive is issued under the CC0 Licence. Public Domain.

----------------------------------------------------------------------------

                                IMPORTANT:-
                                -----------

    The Legal Stuff:-
    -----------------

    This code is CC0 licenced.

    The author is not responsible for any damage to, or loss of, or failure
    of equipment or data caused in any way by the use of this code.

    There is NO warranty with the use of this software release and
    YOU USE IT AT YOUR OWN RISK.

----------------------------------------------------------------------------

    Testing Evaluation:-
    --------------------

    All WinUAE, FS-UAE and Classic AMIGA test conditions were/are running
    standard OS 3.1.x and using standard ~topaz 8~ fonts throughout. The
    minimum hardware requirements ARE needed however.

    I have no idea what strange configuration setups will create so refer
    to the ~The Legal Stuff~ above.

----------------------------------------------------------------------------

    Barry Walker, G0LCU.

----------------------------------------------------------------------------

    A very useful HardWare related site, (C) Anthony Hoffman, for
    modifications, schematics, repairs and the like is:-

                          http://amiga.serveftp.net/

============================================================================


Aminet © 1992-2018 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>