You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"- `waveform()`: Renders a figure showing the waveform of the video/audio file.\n",
4299
4299
"- `spectrogram()`: Renders a figure showing the mel-scaled spectrogram of the video/audio file.\n",
4300
-
"- `descriptors()`: Renders a figure of plots showing spectral/loudness descriptors, including RMS energy, spectral flatness, centroid, bandwidth, rolloff of the video/audio file.\n",
4301
-
"- `tempogram()`: Renders a figure with a plots of onset strength and tempogram of the video/audio file."
4300
+
"- `tempogram()`: Renders a figure with plots of onset strength and tempogram of the video/audio file.\n",
4301
+
"- `descriptors()`: Renders a figure of spectral/loudness descriptors (RMS energy, flatness, centroid, bandwidth, rolloff).\n",
4302
+
"- `mfcc()`: Renders a figure of the Mel-frequency cepstral coefficients (timbre features).\n",
4303
+
"- `tempo()`: Estimates tempo and beat positions, returning beat times, inter-beat intervals and beat regularity.\n",
4304
+
"- `beat_statistics()`: Renders circular statistics of beat-timing consistency.\n",
4305
+
"- `chromagram()`: Renders a figure mapping audio energy onto the 12 pitch classes over time.\n",
4306
+
"- `hpss()`: Separates and plots the harmonic and percussive components of the audio.\n",
4307
+
"- `ssm()`: Computes a self-similarity matrix on audio (or video) features.\n"
4302
4308
]
4303
4309
},
4304
4310
{
@@ -4580,6 +4586,86 @@
4580
4586
"audio.descriptors()"
4581
4587
]
4582
4588
},
4589
+
{
4590
+
"cell_type": "markdown",
4591
+
"metadata": {},
4592
+
"source": [
4593
+
"### MFCCs\n",
4594
+
"\n",
4595
+
"[Mel-frequency cepstral coefficients](https://en.wikipedia.org/wiki/Mel-frequency_cepstrum) (MFCCs) compactly describe the spectral envelope (timbre) of a sound over time and are widely used as features for audio classification and similarity."
4596
+
]
4597
+
},
4598
+
{
4599
+
"cell_type": "code",
4600
+
"execution_count": null,
4601
+
"metadata": {},
4602
+
"outputs": [],
4603
+
"source": [
4604
+
"audio = mg.MgAudio(pianist)\n",
4605
+
"audio.mfcc()"
4606
+
]
4607
+
},
4608
+
{
4609
+
"cell_type": "markdown",
4610
+
"metadata": {},
4611
+
"source": [
4612
+
"### Tempo and beat tracking\n",
4613
+
"\n",
4614
+
"`tempo()` estimates the tempo and beat positions and renders the waveform with beat markers. Numeric results are available in the returned figure's `.data` dictionary."
"`beat_statistics()` fits an ideal isochronous grid to the detected beats and visualises how each beat deviates from it — a polar phase histogram plus a millisecond-deviation time series. This reveals whether a performer rushes, drags, or keeps steady time (requires at least four beats)."
4638
+
]
4639
+
},
4640
+
{
4641
+
"cell_type": "code",
4642
+
"execution_count": null,
4643
+
"metadata": {},
4644
+
"outputs": [],
4645
+
"source": [
4646
+
"audio = mg.MgAudio(pianist)\n",
4647
+
"audio.beat_statistics()"
4648
+
]
4649
+
},
4650
+
{
4651
+
"cell_type": "markdown",
4652
+
"metadata": {},
4653
+
"source": [
4654
+
"### Chromagrams\n",
4655
+
"\n",
4656
+
"A [chromagram](https://en.wikipedia.org/wiki/Chroma_feature) maps audio energy onto the 12 pitch classes (C, C#, D, …, B) over time, which is useful for analysing harmony and chord progressions."
0 commit comments