A real-time audio spectrum analyzer for Android that provides both traditional FFT and waterfall display modes. This application visualizes audio input from your device's microphone as a frequency spectrum, useful for audio analysis, music visualization, and educational purposes.
- Real-time audio spectrum analysis
- Two visualization modes:
- Traditional FFT bar graph display
- Waterfall spectrogram display
- Adjustable frequency range selection
- Multiple color schemes:
- Blue to Red (classic spectrum)
- Black to Purple to Red
- Smooth, efficient rendering optimized for Android
- Configurable display parameters
From left to right, the screenshots show
- Regular FFT mode using blue to red color scheme
- Regular FFT mode using black to red color scheme
- Waterfall FFT mode, both color schemes shown
- Gain adjustment setting, range of 1.0 to 11.0
- Android Studio Arctic Fox or newer
- Android SDK 21 or higher (Android 5.0+)
- Device with microphone support
- Android device with RECORD_AUDIO permission
- Clone this repository:
git clone https://github.com/ctracy/AudioSpectrograph.git- Open the project in Android Studio
- Sync project with Gradle files
- Build and run on your Android device
- Launch the app
- Grant microphone permissions when prompted
- The app will begin displaying the audio spectrum immediately
- Use the interface buttons to:
- Toggle between FFT and Waterfall modes
- Adjust the frequency range
- Change color schemes
- Toggle Button: Switch between FFT and Waterfall display modes
- Frequency Range: Adjust the visible frequency spectrum
- Color Scheme: Toggle between different visualization color patterns
- Uses Android's AudioRecord API for audio capture
- Implements Fast Fourier Transform (FFT) for frequency analysis
- Custom View implementation for efficient rendering
- Supports both regular and waterfall spectrograms
- Thread-safe audio processing and visualization
The app requires the following permission:
<uses-permission android:name="android.permission.RECORD_AUDIO" />- Open the project in Android Studio
- Ensure all dependencies are properly synced
- Build the project (Build → Make Project)
- Run on an Android device or emulator
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details
- The FFT implementation in AudioProcessor uses JTransforms, a multithreaded FFT library
- The specific implementation uses a 1D FFT on float data (FloatFFT_1D)
- Inspired by traditional audio analysis tools
- Built with Android Studio and Kotlin/Java
- Sometimes the display doesn't start correctly on the first load, try re-running until fixed
- Gain is more like a "contrast" control than a true amplitude gain
- Not a "true" gain in the signal processing sense since it is being applied after normalization
- Additional color schemes
- Save/export capabilities
- More visualization modes
- Frequency labeling
- Audio file input support
Note: This application is designed for educational and analytical purposes. The accuracy of the frequency analysis depends on the quality of the device's microphone and sampling capabilities.