Add dataset README
Browse files
README.md
CHANGED
|
@@ -1,33 +1,115 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
- name: text
|
| 16 |
-
dtype: string
|
| 17 |
-
splits:
|
| 18 |
-
- name: train
|
| 19 |
-
num_bytes: 28678416.937062938
|
| 20 |
-
num_examples: 4247
|
| 21 |
-
- name: test
|
| 22 |
-
num_bytes: 3187241.062937063
|
| 23 |
-
num_examples: 472
|
| 24 |
-
download_size: 9048600
|
| 25 |
-
dataset_size: 31865658.0
|
| 26 |
-
configs:
|
| 27 |
-
- config_name: default
|
| 28 |
-
data_files:
|
| 29 |
-
- split: train
|
| 30 |
-
path: data/train-*
|
| 31 |
-
- split: test
|
| 32 |
-
path: data/test-*
|
| 33 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
task_categories:
|
| 5 |
+
- text-to-audio
|
| 6 |
+
- audio-to-audio
|
| 7 |
+
tags:
|
| 8 |
+
- music
|
| 9 |
+
- midi
|
| 10 |
+
- chroma
|
| 11 |
+
- music-generation
|
| 12 |
+
- geometric-deep-learning
|
| 13 |
+
size_categories:
|
| 14 |
+
- 1K<n<10K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
+
|
| 17 |
+
# MIDI Chroma Dataset
|
| 18 |
+
|
| 19 |
+
Pre-processed version of [foldl/midi](https://huggingface.co/datasets/foldl/midi) with chroma features extracted directly from MIDI note events.
|
| 20 |
+
|
| 21 |
+
## Dataset Description
|
| 22 |
+
|
| 23 |
+
This dataset contains **4719 songs** with pre-computed chroma features for efficient music generation training.
|
| 24 |
+
|
| 25 |
+
### Features
|
| 26 |
+
|
| 27 |
+
- **name**: Song title (string)
|
| 28 |
+
- **genre**: List of genres (list of strings)
|
| 29 |
+
- **chroma**: Pre-computed chroma features `[128, 12]` (float32 array)
|
| 30 |
+
- 12 pitch classes (C, C#, D, D#, E, F, F#, G, G#, A, A#, B)
|
| 31 |
+
- 128 time steps
|
| 32 |
+
- Values normalized to sum to 1.0 per timestep
|
| 33 |
+
- **text**: Text description for conditioning (string)
|
| 34 |
+
|
| 35 |
+
### Extraction Method
|
| 36 |
+
|
| 37 |
+
Chroma features are extracted **directly from MIDI note events** without audio synthesis:
|
| 38 |
+
- Notes are mapped to their pitch class (0-11)
|
| 39 |
+
- Velocity is used for intensity weighting
|
| 40 |
+
- Temporal resolution: ~10 FPS
|
| 41 |
+
- Much faster than audio-based extraction
|
| 42 |
+
|
| 43 |
+
### Usage
|
| 44 |
+
```python
|
| 45 |
+
from datasets import load_dataset
|
| 46 |
+
import torch
|
| 47 |
+
|
| 48 |
+
# Load dataset
|
| 49 |
+
dataset = load_dataset("AbstractPhil/foldl-midi")
|
| 50 |
+
|
| 51 |
+
# Access samples
|
| 52 |
+
sample = dataset['train'][0]
|
| 53 |
+
chroma = torch.tensor(sample['chroma']) # [128, 12]
|
| 54 |
+
text = sample['text'] # "rock, pop: Genesis - The Light Dies Down"
|
| 55 |
+
|
| 56 |
+
print(f"Text: {text}")
|
| 57 |
+
print(f"Chroma shape: {chroma.shape}")
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
### Training ChromaLyra
|
| 61 |
+
|
| 62 |
+
This dataset is designed for training **ChromaLyra**, a geometric VAE for music generation:
|
| 63 |
+
```python
|
| 64 |
+
from geovocab2.train.model.chroma.chroma_lyra import ChromaLyra, ChromaLyraConfig
|
| 65 |
+
|
| 66 |
+
config = ChromaLyraConfig(
|
| 67 |
+
n_chroma=12,
|
| 68 |
+
seq_len=128,
|
| 69 |
+
latent_dim=256,
|
| 70 |
+
hidden_dim=384
|
| 71 |
+
)
|
| 72 |
+
|
| 73 |
+
model = ChromaLyra(config)
|
| 74 |
+
# Train with text conditioning...
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
## Dataset Creation
|
| 78 |
+
|
| 79 |
+
Created by extracting chroma from valid MIDI files in foldl/midi dataset:
|
| 80 |
+
- Filtered songs: 1s - 3min duration
|
| 81 |
+
- Skipped empty/drum-only tracks
|
| 82 |
+
- Original: ~20K MIDI files → This dataset: ~4719 valid samples
|
| 83 |
+
|
| 84 |
+
## Citation
|
| 85 |
+
|
| 86 |
+
Original dataset:
|
| 87 |
+
```bibtex
|
| 88 |
+
@misc{foldl-midi,
|
| 89 |
+
author = {foldl},
|
| 90 |
+
title = {MIDI Dataset},
|
| 91 |
+
year = {2023},
|
| 92 |
+
publisher = {Hugging Face},
|
| 93 |
+
url = {https://huggingface.co/datasets/foldl/midi}
|
| 94 |
+
}
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
Geometric approach:
|
| 98 |
+
```bibtex
|
| 99 |
+
@misc{abstract-phil-geovocab,
|
| 100 |
+
author = {AbstractPhil},
|
| 101 |
+
title = {GeoVocab: Geometric Deep Learning for Music Generation},
|
| 102 |
+
year = {2025},
|
| 103 |
+
url = {https://github.com/AbstractPhil/geovocab2}
|
| 104 |
+
}
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
## License
|
| 108 |
+
|
| 109 |
+
Same as original foldl/midi dataset.
|
| 110 |
+
|
| 111 |
+
## Acknowledgments
|
| 112 |
+
|
| 113 |
+
- Original MIDI dataset: foldl
|
| 114 |
+
- Chroma extraction: pretty_midi library
|
| 115 |
+
- Geometric VAE architecture: AbstractPhil/GeoVocab2
|