Interactive Audio Analysis with Adjustable Color Mapping

Upload an audio file or activate the microphone to visualize audio features and customize the color mapping based on audio characteristics.

2048

Waveform (Volume vs. Time)

Time (s)

Frequency Analysis (FFT)

Frequency (Hz)

Average Frequency: 0 Hz

Real-Time Volume: 0

Custom Color Mapping

1
1
50%

HSL Color Value: HSL(0, 0%, 50%)

How to Use

Upload an audio file or click "Activate Microphone" to visualize audio data in real-time. Adjust the sliders to map audio frequency and volume data to HSL color values for custom visual effects.

Understanding FFT and HSL Conversion

Fast Fourier Transform (FFT):

The FFT is used to convert a signal from its original time domain into a frequency domain. The formula for the discrete Fourier transform is: \[ X_k = \sum_{n=0}^{N-1} x_n \cdot e^{-i \frac{2\pi}{N} kn} \] where \(X_k\) is the output complex number representing amplitude and phase at frequency \(k\), \(x_n\) is the input time-domain signal, \(N\) is the number of samples, and \(i\) is the imaginary unit.

HSL Conversion:

- Hue (\(H\)): Calculated from the average frequency: \[ H = \left(\frac{\text{Average Frequency}}{\text{Max Frequency}}\right) \times 360 \] - Saturation (\(S\)): Based on volume: \[ S = \left(\frac{\text{Volume}}{\text{Max Volume}}\right) \times 100 \] - Lightness (\(L\)): Set at a constant value of \(50\%\).