ALIGN_Dataset
收藏资源简介:
ALIGN数据集是一个合成数据集,专为音乐对齐和错误检测任务设计。它包含12,000个程序化生成的Bb单簧管练习样本(output子集)和2,104个来自上传MusicXML乐谱的随机小节窗口样本(output_2k_rawdata子集)。每个样本由一份干净的MusicXML乐谱(verified_score.musicxml)和一份含有植错错误的演奏乐谱(performance_score.musicxml)组成,同时提供对应的音频文件(reference_audio.wav和performance_audio.wav)、MIDI文件、标签文件(labels.json)、对齐候选(candidates.json)、DTW对齐结果(alignment.npz)、对数梅尔频谱特征(performance_mel.npy和reference_mel.npy)以及元数据(metadata.json)。植错错误类型包括:错误音符(±1或±2半音或尖音)、遗漏音符(替换为休止符)、额外音符(分裂音符或插入邻音/尖音)、音准错误(1-4个音符上40-80分音分弯音)、节奏错误(延迟/提前起止、速度变化或时长不均)。每个样本包含1-8个非重叠的内容错误,并且通常会在错误后重复受影响的小节。音频为声音音高(移调-2),即书写C音实际发Bb音,但MusicXML和labels.json中的音高仍采用书写音高。标签遵循schema 1.2,包含连续的干净乐谱音符旋律(带两侧1-2个音符的填充)。数据集用于评估音乐对齐算法,官方评估指标为连续音高列表的包含F1,而非时间戳IoU。数据通过zip分片存储(每片250个样本),并附带manifest.json索引。
The ALIGN dataset is a synthetic dataset designed for music alignment and error detection tasks. It contains 12,000 programmatically generated Bb clarinet exercise samples (output subset) and 2,104 random bar window samples from uploaded MusicXML scores (output_2k_rawdata subset). Each sample consists of a clean MusicXML score (verified_score.musicxml) and a performance score with injected errors (performance_score.musicxml), along with corresponding audio files (reference_audio.wav and performance_audio.wav), MIDI files, label files (labels.json), alignment candidates (candidates.json), DTW alignment results (alignment.npz), log-mel spectrogram features (performance_mel.npy and reference_mel.npy), and metadata (metadata.json). Injection error types include: wrong notes (±1 or ±2 semitones or sharp), missing notes (replaced by rests), extra notes (split notes or inserted neighbor/sharp notes), intonation errors (40-80 cents pitch bend on 1-4 notes), and rhythm errors (delayed/early start/stop, tempo changes, or uneven durations). Each sample contains 1-8 non-overlapping content errors, and typically repeats the affected bars after the error. The audio is in sounding pitch (transposed -2), i.e., written C sounds as Bb, but MusicXML and labels.json use written pitch. Labels follow schema 1.2 and contain continuous clean score note melody (with 1-2 note padding on both sides). The dataset is used to evaluate music alignment algorithms, with the official evaluation metric being the inclusion F1 for continuous pitch lists, not timestamp IoU. Data is stored in zip shards (250 samples per shard) with a manifest.json index.
ALIGN数据集总结
数据集基本信息
- 数据集名称: ALIGN Dataset
- 任务类型: 音频分类 (audio-classification)
- 标签: 音乐、单簧管、MusicXML、音乐演奏、错误检测、合成数据、对齐
- 样本规模: 10K < n < 100K
- 数据集描述: 合成的降B调单簧管练习数据包,包含洁净的MusicXML乐谱和带有预设错误的SoundFont演奏音频。黄金标签为乐谱部分旋律(schema版本1.2),而非仅时间间隔标注。
- 数据特性: 洁净乐谱保持正确,只有合成的演奏部分存在故意植入的错误。
数据划分
样本被打包为zip分片文件(每片250个片段),以保证Hub文件数量限制。
| 文件夹 | 样本数量 | 来源 |
|---|---|---|
output/part_XXXX.zip |
12,000 | 程序化生成的原创单簧管乐谱 |
output_2k_rawdata/part_XXXX.zip |
2,104 | 上传的RawData/Score MusicXML中的随机小节窗口 |
manifest.json文件列出了每个分片中包含的样本ID。
解压后每片段文件结构
每个片段对应一个独立目录(例如synth_gen_0042/),包含以下文件:
| 文件名称 | 作用 |
|---|---|
verified_score.musicxml |
洁净版乐谱(地面真值) |
performance_score.musicxml |
有错误的(可能重复的)渲染源 |
reference_audio.wav |
洁净乐谱的单簧管渲染音频 |
performance_audio.wav |
含植入错误的单簧管渲染音频 |
reference_audio.mid / performance_audio.mid |
发送至SoundFont的MIDI文件 |
labels.json |
合成黄金标签(来源:synthetic,schema 1.2) |
candidates.json |
自动对齐候选 |
alignment.npz |
DTW对齐产物 |
performance_mel.npy / reference_mel.npy |
对数梅尔特征(22.05 kHz,128 mels) |
metadata.json |
渲染设置、错误类型、随机种子 |
音频音高说明: 音频使用实际发声音高(sounding_transpose: -2),即书面C发声为降B。MusicXML和labels.json中的pitches字段保持书面音高。
植入错误类型
每个片段包含1至8个不重叠的内容错误,从五种权重相等的错误类型中选取,之后通常会对受影响的小节进行重复:
| 错误类型 | 演奏中的变化 |
|---|---|
wrong_note (错音) |
±1或±2个半音,或尖锐声(MIDI C6–A7) |
missed_note (漏音) |
书面音符替换为休止符 |
extra_note (添音) |
将音符拆分;插入邻音或尖锐声 |
intonation_error (音准错误) |
在1-4个音符上使用40-80音分的弯音 |
rhythm_error (节奏错误) |
开始或结束延迟/提前、速度变化、时值不均匀 |
小节重复说明: 重复通常发生在内容错误之后(通常情况),或作为发声小节的独立重播。在重复前插入0.2–1.0秒的静音间隔。重复段落拷贝的内容标签不作为黄金标准。
旋律黄金标签定义: 为连续的一段洁净乐谱音符(score_part + pitches),每侧附带1-2个音符的填充。
数据加载示例
python from huggingface_hub import hf_hub_download from zipfile import ZipFile from pathlib import Path import json
zip_path = hf_hub_download( repo_id="LapisLa2uli/ALIGN_Dataset", filename="output/part_0000.zip", repo_type="dataset", ) out = Path("align_samples") with ZipFile(zip_path) as zf: zf.extractall(out) sample = next(p for p in out.iterdir() if p.is_dir()) labels = json.loads((sample / "labels.json").read_text(encoding="utf-8")) print(sample.name, len(labels["labels"]))
其他注意事项
- 渲染工具: 使用tinysoundfont + FreePats单簧管SoundFont;MIDI通过music21生成
- 评估方式: ALIGN官方合成评估采用连续音高列表的包含度F1(containment F1),而非时间戳IoU
- 上传说明:
pipeline.log文件未包含在上传数据中(原因:含有本地机器路径)





