What Is a Spectrogram? (With Simple Visual Examples)
Aย spectrogram is a visual representation that shows how the frequency component of a signal changes over time. It is typically calculated as the magnitude squared of STFT(Short-Time Fourier Transform), | STFT |2
Instead of looking at just
- Time domain (waveform) or
- Frequency domain (FFT)
A spectrogram shows both at the same time.

Why Do We Need a Spectrogram?
Some signals change over time, such as
- Speech
- Music
- Machine vibration
A single FFT cannot capture these changes.
Spectrogram solves this by showing
- Time (sec, x-axis)
- Frequency (Hz, y-axis)
- Signal strength (color intensity)

Original signal + STFT result stacked view (refer to Samples/voice spectrogram.mmj)
How Does a Spectrogram Work?
A spectrogram is created using Short-Time Fourier Transform (STFT).
Concept
- Take a small window in time domain
- Apply FFT
- Slide the window
- Repeat
This produces a time-frequency map.
MALMIJAL Application
- Use STFT function
- Adjust
- Window size
- Overlap
- FFT size

STFT parameter panel (refer to Samples/voice spectrogram.mmj)
How to Read a Spectrogram
A spectrogram has three dimensions
Axis | Meaning |
X-axis | Time (sec) |
Y-axis | Frequency (Hz) |
Color | Signal strength |
Example Interpretation
- Bright colors โ strong frequency
- Horizontal line โ constant frequency
- Vertical burst โ transient event
Simple Visual Examples
Example 1: Pure Tone
- Constant frequency โ straight horizontal line
Example 2: Chirp Signal
- Frequency in signal increases โ diagonal line
Example 3: Speech Signal
- Complex patterns over time

Generate 3 signals โ apply STFT โ compare
Practical Applications
- Audio analysis
- Machine fault detection
- Speech recognition
- Biomedical signals (EEG, ECG)
MALMIJAL Workflow
Spectrogram Analysis
- Generate/Load a signal
- Apply STFT
- Adjust window size
- Adjust overlap
- Visualize spectrogram

Load a signal

Adjust window size and overlap (default # of FFT: N/8, overlap: 50%)

Visualize spectrogram (refer to Samples/voice spectrogram.mmj)
Key Insights
- Spectrogram = time + frequency + intensity
- Better than FFT for time-varying signals (non-stationary signals)
- Resolution depends on window size
Trade-off
- Small window โ good time resolution
- Large window โ good frequency resolution
Conclusions
A spectrogram provides a powerful way to analyze signals by combining time, frequency, and amplitude information into a single view.
- Unlike a single FFT, it reveals how frequency content changes over time, making it essential for analyzing non-stationary signals such as speech, music, and machine vibrations.
- It is based on STFT, where window size and overlap control the trade-off between time and frequency resolution.
- By interpreting color intensity and patterns, users can easily identify constant tones, transients, and complex signal behaviors.
In summary,
a spectrogram is a fundamental tool for understanding time-varying signals, providing insights that cannot be obtained from time or frequency analysis alone.
Suggested Further Reading
##You may also find these topics helpful:
What Is a Spectrogram? (With Simple Visual Examples)
Aย spectrogram is a visual representation that shows how the frequency component of a signal changes over time. It is typically calculated as the magnitude squared of STFT(Short-Time Fourier Transform), | STFT |2
Instead of looking at just
A spectrogram shows both at the same time.
Why Do We Need a Spectrogram?
Some signals change over time, such as
A single FFT cannot capture these changes.
Spectrogram solves this by showing
Original signal + STFT result stacked view (refer to Samples/voice spectrogram.mmj)
How Does a Spectrogram Work?
A spectrogram is created using Short-Time Fourier Transform (STFT).
Concept
This produces a time-frequency map.
MALMIJAL Application
STFT parameter panel (refer to Samples/voice spectrogram.mmj)
How to Read a Spectrogram
A spectrogram has three dimensions
Example Interpretation
Simple Visual Examples
Example 1: Pure Tone
Example 2: Chirp Signal
Example 3: Speech Signal
Generate 3 signals โ apply STFT โ compare
Practical Applications
MALMIJAL Workflow
Spectrogram Analysis
Load a signal
Adjust window size and overlap (default # of FFT: N/8, overlap: 50%)
Visualize spectrogram (refer to Samples/voice spectrogram.mmj)
Key Insights
Trade-off
Conclusions
A spectrogram provides a powerful way to analyze signals by combining time, frequency, and amplitude information into a single view.
In summary,
a spectrogram is a fundamental tool for understanding time-varying signals, providing insights that cannot be obtained from time or frequency analysis alone.
Suggested Further Reading
##You may also find these topics helpful: