Home | Java |     Share This Page
FFTExplorer

A signal processing workshop.

Copyright © 2009, Paul LutusMessage Page

Current Version: 3.9 (05/16/2011)

The Applet | Introduction | Downloads | Installation | Notes | Version History

 
The Applet

FFTExplorer is an advanced, Java-based signal processing workshop meant to introduce a number of advanced and interesting electronic processing methods. More details and documentation appear below the applet.

For those unfamiliar with Java applets, the frame below is not a picture, it it a working copy of FFTexplorer, ready for your experimentation.

To turn off the sound (and see FFTExplorer's true update speed), click the checkbox marked "Sound" at the lower right.

  It seems you don't have Java installed. Click here to download Java (it's free.)

 
Introduction
FFTExplorer is a free (GPL) cross-platform Java program that performs spectral analysis on real-time data created by its internal synthesizer or from a sound card, and can analyze the spectra of various sound file types (as a Web page applet, only the first of these options is available). And it balances fun and education — it is as much a playground as a workshop.

FFTExplorer displays animated time-domain and frequency-domain data using sight and sound and represents an easy-to-use introduction to the topic of spectrum analysis. Beyond performing a fast Fourier transform on many kinds of data, FFTExplorer invites experimentation using a carefully designed, intuitive interface.

FFTExplorer contains a comprehensive essay/help file on the various topics the program covers, plus some step-by-step examples using its own internal synthesizer and detailed examples using external sources.

Educators Take Note

  • FFTExplorer is designed to maximize its educational potential — it combines a high degree of technical instruction with a game-like interface to balance fun and education.
  • For more advanced educational purposes, I have written an unbundled, command-line embodiment of Fast Fourier technology that may be suitable for more technical projects. Go to my article Signal Processing Workshop to pick up the software and read a more detailed explanation of Fourier analysis.
FFTExplorer is © Copyright 2009, P. Lutus. All rights reserved.
FFTExplorer is released under the General Public License.
FFTExplorer is also Careware (http://arachnoid.com/careware),
unless this kind of idea makes you crazy, in which case FFTExplorer is free (e.g. GPL).
Downloads

FFTExplorer is available in these forms:

  • Applet: FFTExplorer can be run directly from this page as an applet (above). Since FFTExplorer doesn't need to interact with your filesystem, this is a reasonable way to use the program — and when run as an applet, FFTExplorer uses a browser cookie to remember your choices and settings.
    The downside to the applet embodiment is that, for security reasons, the program can only use its internal synthesizer as a signal source. For a fully operational version of FFTExplorer, users need to exercise one of the options listed below.
  • Java Executable (337KB): For both Windows and non-Windows systems, the FFTExplorer Java JAR file can be downloaded and run locally. This option is meant for those comfortable with setting up their own computer software.
  • Windows Installation Executable (597KB): For Windows systems — point, click, all automatic.
  • Source Archive (288.5KB): The GPL-licensed FFTExplorer source TAR archive can be downloaded, examined, and compiled locally. This option is meant for those who want FFTExplorer but who also want to know how things are done.
For all the above options, users need to install a current
Java runtime engine, available free at http://java.com.
Installation
  • Windows: Just download the Windows executable and install it in the usual way. Be sure to acquire a current Java runtime engine.
  • Linux, Macintosh: Download the Java executable JAR file and place it anywhere convenient. Users may wish to create a launch script with content resembling this:
    #!/bin/sh
    java -jar (path to executable)/FFTExplorer.jar
                    
    Be sure to acquire a current Java runtime engine suitable for your platform.
Notes
This project has a rather long and interesting history. It began as a command-line application under Linux, using the classic Unix-style building-block scheme meant to maximize flexibility. In that embodiment (still available and updated), a user might type something like this —
$ ./signal_source -a 2048 -s 400 -f 100 -m 50 -n 3 | ./fft_processor | ./gnuplot_driver -p
— and get this as a result:

Well, that was fine for Linux users and college students, but I wanted something more suitable for math or physics students who weren't necessarily computer programmers. I wanted a self-contained program that people could play with, while acquiring some education as a secondary and perhaps unintended side effect. So I bundled the basic code in a popular GUI wrapper that comes with Linux (Qt).

As it turns out, I couldn't have made a worse choice for either my GUI utility or my choice of language (C++). As to the latter, I spent years answering inquiries from people who couldn't compile or run my application, and from package maintainers who wanted to make my application a standard Linux download. But satisfying these people meant I had to constantly rewrite my code to accommodate the kind of narcissistic technologist who adds or removes something from a programming environment without bothering to ask himself how many programs his whimsical change will break.

Then the show-stopper — Trolltech decided to "upgrade" Qt, the GUI interface I chose for this and several other projects. The Qt "upgrade" provided no rearward compatibility path at all — which meant programmers using Qt had to drop whatever they were doing and write their programs over again, essentially from scratch. I was suddenly faced with half a dozen major projects that had become obsolete overnight for reasons having nothing to do with their age or usefulness (none were older than five years old).

But, rather than repeat past mistakes, I rewrote all my recent projects in Java, which turns out to be a much more stable environment with the added advantage that Java projects are innately cross-platform compatible (because a Java runtime engine is available for most modern operating systems). Here's a list of recently rewritten or substantially upgraded Java projects:

Nearly all these projects were originally written in C++ or another language and had to be constantly revised to keep up with the narcissists, and all these programs have since been rewritten in Java.

The most recent rewriting project was this one, which I frankly didn't expect to work very well, for the reason that the Fast Fourier Transform is very processing-intensive and Java uses a virtual-machine scheme to accomplish its platform indifference (virtual languages can't run as fast as native ones). But to my surprise, in side-by-side comparison, the new Java version and the old C++ version were scarcely distinguishable.

It turns out I had misjudged the FFT processing contribution to total program runtime. The majority of program time is spent drawing graphic images and reading signal sources, and only a small percentage of time is spent in serious number-crunching. And the Java version includes a number of improvements over the old program, not least of which is the abillity to run in a Web page.

There are no guarantees, and the Java maintainers might try to "improve" Java in a way that breaks every Java program in existence, but the long and successful history of my first Java conversion project (Arachnophilia) offers reason for hope.

Version History
  • 05/16/2011 Version 3.9. Corrected a path error in the Windows program icon/shortcut.
  • 03/29/2011 Version 3.8. Fixed a library issue caused by combining the application/applet versions of this program into one JAR file.
  • 02/27/2011 Version 3.7. Fixed a number of small bugs, cleaned up the documentation.
  • 02/25/2011 Version 3.6. Abandoned the Java Web Start option. This decision allowed refactoring and simplification of the entire project. Fixed a bug in the MP3 playing code that would only allow playing one MP3 clip, then fail.
  • 02/09/2011 Version 3.5. Corrected an algorithm error in the synthesizer's FM modulator code.
  • 10/23/2009 Version 3.4. Replaced string-based keyboard identifiers with keycodes for the benefit of non-English users.
  • 03/31/2009 Version 3.3. Fixed a bug brought on by the new locale-management code.
  • 03/29/2009 Version 3.2. Recoded this program to make it locale-immune.
  • 03/28/2009 Version 3.1. Repackaged FFTExplorer for greater download efficiency and reduced package count.
  • 03/27/2009 Version 3.0. Completely rewrote this project in Java after seeing the original GUI interface (Qt) abandoned by its creators (Trolltech) with no consideration given to rearward compatibility issues.
  • 09/16/2008 Version 2.1. Changed build procedure to function with current development environments.
  • 09/05/2007 Version 2.0. Rewrote Fast Fourier Transform code for greater speed and efficiency.
  • 09/14/2006 Version 1.16. Updated source to conform to gcc 4.1 requirements.
  • 02/23/2005 Version 1.15. Fixed a bug that caused compilation to fail on some systems due to an ambiguous variable promotion.
  • 12/15/2004 Version 1.1. Further tuned the signal processing code to balance acquisition speed and graceful error recovery.
  • 12/13/2004 Version 1.0. Initial public release (C++ version).
 

Home | Java |     Share This Page