audio audioduration (s) 23.5 2.63k | label class label 6
classes |
|---|---|
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque | |
0baroque |
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
- π Executive Pitch: The Next Big Thing in Music AI & Classification
- π The Four Pillars of Dataset Fusion
- π¬ Symmetrical Distribution & Multi-Modal Scale
- π οΈ The 3-Stage Acoustic & Symbolic Quality Engine
- π Repository & Dataset Layout
- β‘ Quickstart: Loading SONATA with PyTorch
- π Scientific Verification & Benchmark Audit
- π Citation & Attribution
πΉ SONATA (Augmented MAESTRO)
Symmetrically Orchestrated Notes and Audio for Transformer Architectures
The Next-Generation Cross-Modal Benchmark for Classical Music Era Classification & Audio-Symbolic Transformers
π Executive Pitch: The Next Big Thing in Music AI & Classification
For nearly a decade, Google Magentaβs MAESTRO (MIDI and Audio Edited for Synchronous TRacks and Organization) has stood as the undisputed gold standard for machine learning in expressive piano performance. Yet for macro-temporal semantic tasksβmost notably Musical Era ClassificationβMAESTRO suffers from an insidious architectural vulnerability: an extreme 65.3% Romantic monoculture.
When modern deep learning models (Convolutional Neural Networks, Variational Autoencoders, Audio Spectrogram Transformers, and Perceiver architectures) are trained on standard benchmarks, they do not learn the contrapuntal, harmonic, or morphological syntax of Western art music. Instead, they collapse into a trivial majority heuristic, overwhelmed by the loss gradients of Chopin, Liszt, and Rachmaninoff, while starving minority eras (Impressionism at 2.8% and Modernism at 2.8%).
π Enter SONATA (Augmented MAESTRO)
SONATA breaks the archive crisis. By fusing Google Magenta MAESTRO v3.0.0, the ASAP Dataset (ISMIR 2020), the ADL Piano MIDI Dataset (ISMIR 2019), and curated master archives from the Classical MIDI Archive, SONATA establishes the first mathematically symmetrical, acoustic-grounded, multi-modal classical era benchmark in MIR history.
[ BASELINE MAESTRO v3.0.0 ] [ SONATA (Augmented MAESTRO) ]
Severe 65.3% Romantic Skew Perfect 16.67% Class Symmetry
Romantic ββββββββββββββββββββ 65.3% Baroque ββββββββββββ 200 (16.67%)
Classical ββββ 14.6% Classical ββββββββββββ 200 (16.67%)
Baroque ββββ 12.4% Romantic ββββββββββββ 200 (16.67%)
Late Romantic β 4.3% Late Romantic ββββββββββββ 200 (16.67%)
Impressionist β 2.8% Impressionist ββββββββββββ 200 (16.67%)
Modern β 2.8% Modern ββββββββββββ 200 (16.67%)
(Gini Skew = 0.58) (Gini Skew = 0.00)
π The Four Pillars of Dataset Fusion
SONATA unites the world's most rigorous symbolic transcriptions and concert captures into one cohesive, studio-grade standard:
- Google Magenta MAESTRO (v3.0.0):
- High-resolution Disklavier concert recordings from the Minnesota International Piano-e-Competition.
- Provides all baseline acoustic ground truth and stratified anchor pieces for Classical and Romantic epochs.
- ASAP Dataset (Accelerate, Score, Alignment, and Piano - ISMIR 2020):
- Synchronized score-to-performance Disklavier human captures (e.g., Prokofiev Toccata, Op. 11), contributing authentic human micro-timing and polyphonic dynamics.
- ADL Piano MIDI Dataset (ISMIR 2019):
- Curated classical pedagogical corpus with vetted tempo maps, polyphonic note matrices, and pristine key signatures.
- Classical MIDI Master Archives (John Sankey, Steven Ritchie, Jeff Segor):
- Scholarly sequenced realizations of Scarlatti, Debussy, Ravel, Satie, FaurΓ©, Scriabin, and BartΓ³k, meticulously cataloged to eliminate arrangement artifacts.
π¬ Symmetrical Distribution & Multi-Modal Scale
SONATA provides exact 1:1:1:1:1:1 mathematical parity across all six defining epochs of Western art music, completely neutralizing class imbalance gradient bias.
| Musical Era | Total Tracks | Total WAVs | Total MIDIs | Audio Duration | Discrete Note Events | Mean RMS Energy | Train (80%) | Val (10%) | Test (10%) |
|---|---|---|---|---|---|---|---|---|---|
| Baroque | 200 | 200 | 200 | 14.82 hrs | 521,409 | 0.0612 | 160 | 20 | 20 |
| Classical | 200 | 200 | 200 | 26.14 hrs | 874,130 | 0.0594 | 160 | 20 | 20 |
| Romantic | 200 | 200 | 200 | 25.48 hrs | 912,845 | 0.0681 | 160 | 20 | 20 |
| Late Romantic | 200 | 200 | 200 | 23.95 hrs | 789,612 | 0.0645 | 160 | 20 | 20 |
| Impressionist | 200 | 200 | 200 | 20.73 hrs | 641,208 | 0.0583 | 160 | 20 | 20 |
| Modern | 200 | 200 | 200 | 22.18 hrs | 733,108 | 0.0710 | 160 | 20 | 20 |
| TOTALS | 1,200 | 1,200 | 1,200 | 133.30 hrs | 4,472,312 | 0.0642 | 960 | 120 | 120 |
π οΈ The 3-Stage Acoustic & Symbolic Quality Engine
Every single track in SONATA passed through an exhaustive, multi-gate physics and mastering pipeline before inclusion:
[ Raw MIDI Stream ]
β
βΌ
[ Gate 1: SMF Parser & Channel 10 Kill-Switch ] βββΊ (Drops percussion, sysex, running status errors)
β
βΌ
[ Gate 2: "Clever Hans" Timbral Impostor Purge ] βββΊ (Purges guitar [Prog 24], strings, flute, choir)
β
βΌ
[ Gate 3: SoundFont 2.04 Velocity Cross-Fading ] βββΊ (4-zone multisampling, resonant biquad filtering)
β
βΌ
[ Gate 4: Damper Tail Decay Modeling (+0.5s) ] βββΊ (A(t) = Aβ e^(-Ξ³t) cos(Οt); avoids Gibbs step artifacts)
β
βΌ
[ Gate 5: Polyphase Resampling & Mastering ] βββββΊ (Standardized 44.1 kHz, 16-bit PCM, 0.95 peak ceiling)
β
βΌ
[ Gate 6: Deep Verification & Synchronization ] βββΊ (0 missing, 0 silent, 0 dupes, |Ξt| < 3.5s)
Why Standard Augmentation Fails (And Why SONATA Solves It)
- Pitch Shifting: Shifting an Impressionist piece (e.g., Debussy's Voiles, built on a C-whole-tone hexatonic collection) by $\pm 2$ semitones preserves the interval vector $[0,2,4,6,8,10]$, but completely destroys canonical key-color associations and fundamental formant registers.
- Time Stretching: Compressing or dilating tempo alters note density and pulse rate, but cannot synthesize contrapuntal syntax, voice-leading rules, or cadence morphology.
- SONATA's Solution: True, compositional supplemental ingestion of authentic historical scores, rendered through physical grand piano acoustics.
π Repository & Dataset Layout
SONATA (Augmented MAESTRO)/
βββ audio/
β βββ baroque/ # 200 .wav files (44.1 kHz, 16-bit stereo PCM)
β βββ classical/ # 200 .wav files
β βββ romantic/ # 200 .wav files
β βββ late_romantic/ # 200 .wav files
β βββ impressionist/ # 200 .wav files
β βββ modern/ # 200 .wav files
βββ midi/
β βββ baroque/ # 200 .midi files (General MIDI Type 0/1)
β βββ classical/ # 200 .midi files
β βββ romantic/ # 200 .midi files
β βββ late_romantic/ # 200 .midi files
β βββ impressionist/ # 200 .midi files
β βββ modern/ # 200 .midi files
βββ sonata_dataset.csv # Master Manifest (MAESTRO v3.0.0 compatible schema)
βββ SONATA_Dataset_Report.pdf # 5-Page Formal Publication Report
βββ README.md
Master Manifest Schema (sonata_dataset.csv)
| Column | Type | Description |
|---|---|---|
canonical_composer |
string |
Normalized composer name (e.g., Claude Debussy, Domenico Scarlatti) |
canonical_title |
string |
Official movement / work catalog designation |
split |
string |
Partition designation: train (80%), validation (10%), test (10%) |
year |
int |
Performance capture or catalog year |
midi_filename |
string |
Relative path to symbolic MIDI file (midi/<era>/<file>.midi) |
audio_filename |
string |
Relative path to master acoustic WAV (audio/<era>/<file>.wav) |
duration |
float |
Exact audio playback duration in seconds |
era |
string |
Class label (baroque, classical, romantic, late_romantic, impressionist, modern) |
β‘ Quickstart: Loading SONATA with PyTorch
After downloading the archive and extracting it, you should have a folder structure like this:
SONATA/
βββ audio/
βββ midi/
βββ balanced_dataset.csv
βββ sonata_dataset.csv
βββ README.md
βββ SONATA_Dataset_Report.pdf
The key point is that the dataset is meant to be used from the extracted root directory named SONATA. Do not assume the files are placed directly in your current working directory.
1. Dual-Stream Multi-Modal PyTorch Dataset
import torch
from torch.utils.data import Dataset, DataLoader
import torchaudio
import pretty_midi
import pandas as pd
from pathlib import Path
class SonataDataset(Dataset):
def __init__(self, root_dir, split="train", sample_rate=44100, n_mels=128):
self.root_dir = Path(root_dir)
df = pd.read_csv(self.root_dir / "sonata_dataset.csv")
self.df = df[df["split"] == split].reset_index(drop=True)
self.sample_rate = sample_rate
self.mel_spectrogram = torchaudio.transforms.MelSpectrogram(
sample_rate=sample_rate,
n_fft=2048,
hop_length=512,
n_mels=n_mels,
)
self.era_to_idx = {
"baroque": 0,
"classical": 1,
"romantic": 2,
"late_romantic": 3,
"impressionist": 4,
"modern": 5,
}
def __len__(self):
return len(self.df)
def __getitem__(self, idx):
row = self.df.iloc[idx]
wav_path = self.root_dir / row["audio_filename"]
waveform, _ = torchaudio.load(wav_path)
if waveform.shape[0] > 1:
waveform = torch.mean(waveform, dim=0, keepdim=True)
mel_spec = torch.log(self.mel_spectrogram(waveform) + 1e-6)
midi_path = self.root_dir / row["midi_filename"]
pm = pretty_midi.PrettyMIDI(str(midi_path))
piano_roll = torch.from_numpy(pm.get_piano_roll(fs=50)).float()
label = torch.tensor(self.era_to_idx[row["era"]], dtype=torch.long)
return {
"mel_spectrogram": mel_spec,
"piano_roll": piano_roll,
"label": label,
"composer": row["canonical_composer"],
"title": row["canonical_title"],
}
# Example usage after extracting SONATA.zip
root_dir = Path("SONATA")
dataset = SonataDataset(root_dir=root_dir, split="train")
loader = DataLoader(dataset, batch_size=16, shuffle=True)
print(f"Loaded {len(dataset)} training tracks across 6 balanced eras.")
If the archive is extracted somewhere else, just replace Path("SONATA") with the full extracted folder path, such as Path("C:/Users/you/Downloads/SONATA").
2. Minimal CSV loading check
import pandas as pd
from pathlib import Path
root_dir = Path("SONATA")
df = pd.read_csv(root_dir / "sonata_dataset.csv")
print(df.head())
print(df["era"].value_counts().sort_index())
This ensures the extracted zip is valid and that the manifest file points to real audio/... and midi/... paths that exist inside the same folder.
π Scientific Verification & Benchmark Audit
The deep automated auditor evaluated all 1,200 tracks and 2,400 physical files against strict publication criteria:
| Verification Metric | Target Threshold | Measured Result | Audit Status |
|---|---|---|---|
| Physical File Completeness | 0 missing files | 0 missing (2,400 / 2,400 files present) | PASSED β |
| Audio Format Compliance | 44.1 kHz, 16-bit stereo PCM | 1,200 / 1,200 exact match | PASSED β |
| Silence Detection | Peak $\ge 0.05$, RMS $\ge 0.003$ | 0 silent tracks (Min peak: 0.125, Mean: 0.863) | PASSED β |
| Audio-MIDI Duration Sync | $ | \Delta t | < 3.5\text{ s}$ |
| Duplicate Paths / Hashes | 0 duplicates | 0 duplicates found | PASSED β |
| Class Distribution Skew | Exactly 200 per class | 200 / 200 / 200 / 200 / 200 / 200 | PASSED β |
| Split Symmetry | Exactly 160 / 20 / 20 per era | 160 train / 20 val / 20 test per era | PASSED β |
π Citation & Attribution
If you use SONATA (Augmented MAESTRO) in your research, thesis, or commercial models, please cite:
@dataset{sonata_augmented_maestro_2026,
title = {SONATA (Augmented MAESTRO): A Hybrid CNNβTransformerβVAE Framework for Classical Music Era Classification},
author = {Aryan Rahman Mugdha and Saadman Bin Jashim},
year = {2026},
publisher = {GitHub},
note = {A balanced multimodal classical music dataset combining MAESTRO, ASAP, ADL Piano MIDI, and the Classical MIDI Archive}
}
Underlying Datasets & Foundational Citations
- MAESTRO: Hawthorne et al., "Enabling Factorized Piano Music Modeling and Generation with the MAESTRO Dataset", ICLR 2019.
- ASAP Dataset: Foscarin et al., "ASAP: a dataset of aligned scores and piano performances", ISMIR 2020.
- ADL Piano Dataset: Ferreira et al., "Learning to Generate Music with Sentiment", ISMIR 2019.
- Class Imbalance in Deep Learning: Johnson & Khoshgoftaar, "Survey on deep learning with class imbalance", Journal of Big Data 2019.
- Downloads last month
- 48