Simple FFT DEMO using ARexx.
- Size
- 1.9K (1,968 bytes)
- Added
- 2026-11-20 02:44
- Downloads
- 1
- Long Description
- Distribution: GPL2. ============================================================================ Architectures: Classic AMIGAs, WinUAE, FS-UAE, (Windows? Linux?). ----------------------------------------------------------------- MINIMUM Requirements Are:- -------------------------- Amiga environment:- Stock AMIGA 1200 only. (Extra memory and/or HDD/FDD is always useful, but not needed; it will run faster however with FASTRAM). WinUAE 1.5.3, minimum on Windows. FS-UAE on OSX 10.13.6 and Linux Mint 19. Standard default AMIGA OS_3.0.x install or better. A dependency of rexxmathlib.library is needed. ( http://aminet.net/package/util/rexx/RexxMathLib ) ---------------------------------------------------------------------------- History:- --------- 06-09-2018. ----------- Version 1.00.00. Probably the one and only upload for this archive. ---------------------------------------------------------------------------- General:- --------- (Apologies for any typos, etc...) 'Simple_FFT_DEMO.rexx.txt' -------------------------- !!!Yep, that's right, slow FFT for ARexx using rexxmathlib.library!!! This MIGHT be the simplest implementation of a basic FFT function for the Classic AMIGA - period! It uses a dl from AMINET, 'rexxmathlib.library'. 1) Is this an exercise in futility? Probably YES! 2) Can rexxmathlib.library be omitted? Probably YES too. I have already done a simple SIN subroutine here: http://aminet.net/package/dev/src/SINE.rexx ...but would need modifying, so COS would also easily be possible. Absolute complex values are created using a simple subroutine inside the code, so this is not needed from the dl'd library. 3) Was it difficult? Well YES and NO. YES, I hadn't coded in ARexx properly for years and it was a learning curve for me. ARexx certainly has its foibles. The basic coding was easy but the arithmetic was so convoluted to what we are now used to. NO, this was ported from MY ksh93 and awk UNIX shell script here: https://www.unix.com/os-x-apple-/279710-slow-fft-ksh93-awk.html ...now this was relatively difficult! 4) Why did I attempt it? I love doing something that has never been tried before hence this version and the ksh93 + awk version. 5) Is it of any use in the real word? Probably NOT, but someone will dl it and make it faster and better now that the building block exists. 6) What was the basic requirement needed? Both for the UNIX shell script and this script it was the ability to do basic floating point maths. sadly ARexx's FP accuracy is not as good as current technology on current machines. 7) Did I enjoy it? Absolutely. Someone who visits AMINET emailed me quoting, (paraphrasing), "it would be better to see the FFT done in ARexx", instead of Python2.0.x with reference to this, also mine: http://aminet.net/package/dev/src/AF_Spec_An_DEMO.sh (If that guy is reading this, does this convoluted piece of code satisfy your requirements?) 8) Am I going to do a similar DEMO to the one in part 7)? NO! I am looking at AMIGABasic next for Workbench_1.3.x for a stock A500. 9) And finally, was it fun to do? Short answer - YES! Just dl both the code and the library and install as required. Rename 'Simple_FFT_DEMO.rexx.txt' to something shorter, say 'FFT.rexx'. With RexxMast running, execute the script using RX in the usual way. ***** I WOULD REALLY LIKE THE PERSON WHO EMAILED ME TO DO SO AGAIN! ***** Does this satisfy your requirements? <wink> NOTES:- ------- 1) Floating point 'REAL_ARRAY', (term used loosely), values, must be 0.0 to a positive value. 1.0 is chosen for the upper limit in this DEMO as this is the standard test for: https://rosettacode.org/wiki/Fast_Fourier_transform 2) The total REAL DATA length MUST be a power of 2! IF NOT THEN: 3) 2 lots of DA