🐣

【Wave Analytics】What is Chromagram ?

2024/04/18に公開

1. Chromagram

First, (d) is a Chromagram in a below image.

Wikipedia

Chromagram is representation of frequency element of wave related to time.
It looks similar to a spectrogram.

Simply put, Chromagram provides divided frequency reprezentation.
It's a 'rougth' expression than spectrogram.

2. Calculation

・Formula for chromagram
PC(f) = [12 × log_2 \dfrac{f}{f_{ref}}] mod 12

  1. f is result of STFT in specific time window.
  2. f_{ref} is reference frequency. f is normalized by this.
    Typically set to 440Hz, Which is the standard pitch(A4) used in much of Westan music.
  3. log_2 is use to expanding an elements. The logarithm base 2 is specifically chosen because each increase by 1 in the log_2 scale corresponds to a doubling of the frequency, which is how musical octaves are defined.
  4. Other calculation: After taking the logarithm, multiplying by 12 converts the octave-based log result into semitones. Since there are 12 semitones in an octave, this multiplication distributes the logarithmic result across the 12 steps of the musical scale, fitting the frequency into one of the 12 pitch classes (C through B).

Result of formula represent a intensity of each pitch class in a time window(that specified by STFT).

3. Summary

Chromagram shows intencity of each renge of frequency. It is rougth than spectrogram, but that information is immportant and useful for music analysis.

Refernece

(1) https://en.wikipedia.org/wiki/Chroma_feature

Discussion