---
title: EMelodyGen
canonical_url: "https://www.modelscope.cn/datasets/monetjoe/EMelodyGen"
md_url: "https://www.modelscope.cn/datasets/monetjoe/EMelodyGen.md"
repository: monetjoe/EMelodyGen
chinese_name: "EMelodyGen Dataset (ABC notation 旋律情感数据集)"
last_updated: 2026-08-05
license: CC-BY-NC-ND
storage_size: "2.5 GB"
domain:
  - text
tasks:
  - text-generation
language:
  - other
size_scale:
  - 100k-1M
downloads: 17884
stars: 21
---

# EMelodyGen

> EMelodyGen - monetjoe 在 ModelScope 开源的数据集。EMOPIA 数据集是一个集合了丰富情感表达的MIDI格式音乐作品的集合，旨在支持音乐情感分析和音乐信息检索领域的研究。通过对EMOPIA数据集中的MIDI文件进行深入的数据处理，我们成功地将所有曲目的第一声部（V1声部）转换成了ABC符号表示法。ABC符号是一种用纯文本表示音乐记谱法的系统，它以简洁明了的方式编码音乐信息，便于计算机处理和分析。在转换过程中，我们特别注意保留了每首曲目的情感标签，这些标签对于理解音乐的情感内容至关…

monetjoe/EMelodyGen 是 ModelScope 魔搭社区上的text-generation数据集，涉及 text 领域，存储大小 2.5 GB，采用 CC-BY-NC-ND 许可。

- **Repository**: monetjoe/EMelodyGen
- **License**: CC-BY-NC-ND
- **Tasks**: text-generation
- **Domain**: text
- **Storage size**: 2.5 GB
- **Downloads**: 17884
- **Stars**: 21
- **Last updated**: 2026-08-05

Source: https://www.modelscope.cn/datasets/monetjoe/EMelodyGen

---

# EMelodyGen 简介
The EMelodyGen dataset comprises four subsets: Analysis, EMOPIA, VGMIDI, and Rough4Q. The EMOPIA and VGMIDI subsets are derived from MIDI files in their respective source datasets, where all melodies in V1 soundtrack have been converted to ABC notation through a data processing script. These subsets are enriched with enhanced emotional labels. The Analysis subset involves statistical analysis of the original EMOPIA and VGMIDI datasets, aimed at guiding the enhancement and automatic annotation of musical emotional data. Lastly, the Rough4Q subset is created by merging ABC notation collections from the IrishMAN-XML, EsAC, Wikifonia, Nottingham, JSBach Chorales, and CCMusic datasets. These collections are processed and augmented based on insights from the Analysis subset, followed by rough emotional labeling using the music21 library.

EMelodyGen 数据集包含 Analysis、EMOPIA、VGMIDI 和 Rough4Q 子集，其中 EMOPIA 和 VGMIDI 子集是由它们数据源中的 MIDI 通过数据处理脚本提取所有曲子 V1 声部转换为 ABC notation, 保留情感标签增强后得到的；而 Analysis 子集则是对 EMOPIA、VGMIDI 的原数据集的统计分析，用于指导音乐情感数据增强和自动标注；最后 Rough4Q 则是合并 IrishMAN-XML、EsAC、Wikifonia、Nottingham、JSBach Chorales 和 CCMusic 数据集中的谱面基于 Analysis 子集分析结论经过数据处理与增强得到的 ABC notation 集合后，再调用 music21 库自动粗略标注情感标签得到的。

## Usage 快速使用
```python
from modelscope.msdatasets import MsDataset

# VGMIDI (default) / EMOPIA / Rough4Q subset
ds = MsDataset.load("monetjoe/EMelodyGen", subset_name="VGMIDI")
for item in ds["train"]:
    print(item)
 
for item in ds["test"]:
    print(item)

# Analysis subset
ds = MsDataset.load("monetjoe/EMelodyGen", subset_name="Analysis", split="train")
for item in ds:
    print(item)
```

## Maintenance 维护
#### 跳过大文件
```bash
GIT_LFS_SKIP_SMUDGE=1 
```

:modelscope-code[]{type="git"}

## Data source of Rough4Q 数据源
|                                                           Dataset                                                            |   Size | Chord | Year  | Paper                                                                                                          |
| :--------------------------------------------------------------------------------------------------------------------------: | -----: | :---: | :---: | :------------------------------------------------------------------------------------------------------------- |
|                     [Midi-Wav Bi-directional Pop](https://ccmusic-database.github.io/database/cpop.html)                     |    111 |   ×   | 2021  | [Music Data Sharing Platform for Academic Research (CCMusic)](https://zenodo.org/records/5654924)              |
| [JSBach Chorales](https://dspace.mit.edu/bitstream/handle/1721.1/84963/Cuthbert_Ariza_ISMIR_2010.pdf?sequence=1&isAllowed=y) |    366 |   √   | 2010  | [Chord-Conditioned Melody Harmonization With Controllable Harmonicity](https://arxiv.org/pdf/2202.08423)       |
|                              [Nottingham](https://ifdo.ca/~seymour/nottingham/nottingham.html)                               |   1015 |   √   | 2011  | Nottingham Database                                                                                            |
|                                    [Wikifonia](http://www.synthzone.com/files/Wikifonia/)                                    |   6394 |   √   | 2018  | [Enhanced Wikifonia Leadsheet Dataset](https://zenodo.org/records/1476555)                                     |
|                               [Essen](https://ifdo.ca/~seymour/runabc/esac/esacdatabase.html)                                |  10369 |   ×   | 2013  | Essen Folk Song Database                                                                                       |
|                               [IrishMAN](https://huggingface.co/datasets/sander-wood/irishman)                               | 216281 |   ×   | 2023  | [TunesFormer: Forming Irish Tunes with Control Codes by Bar Patching](https://ceur-ws.org/Vol-3528/paper1.pdf) |

## Statistics 统计
| Dataset 数据集 |                                        Pie chart 饼图                                        | Total 总计 | Train 训练集 | Test 测试集 |
| :------------: | :------------------------------------------------------------------------------------------: | ---------: | -----------: | ----------: |
|    Analysis    | ![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/Analysis.jpg) |       1278 |         1278 |           - |
|     VGMIDI     |  ![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/VGMIDI.jpg)  |       9315 |         8383 |         932 |
|     EMOPIA     |  ![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/EMOPIA.jpg)  |      21480 |        19332 |        2148 |
|    Rough4Q     | ![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/Rough4Q.jpg)  |     520673 |       468605 |       52068 |

## Analysis 分析
### Statistical values 统计值
| Feature 特征 | Min 最小值 | Max 最大值 | Range 极差 | Median 中位数 | Mean 均值 |
| :----------: | :--------: | :--------: | :--------: | :-----------: | :-------: |
|    tempo     |   47.85    |   184.57   |   136.72   |    117.45     |  119.38   |
|    pitch     |    36.0    |   89.22    |   53.22    |     60.98     |   61.38   |
|    range     |    2.0     |    91.0    |    89.0    |     47.0      |   47.47   |
|   pitchSD    |    0.64    |   24.82    |   24.18    |     12.91     |   13.09   |
|    volume    |    0.02    |    0.17    |    0.16    |     0.09      |   0.09    |

### Pearson correlation table 皮尔森相关性表
| Emo-feature 主客体  | r 相关系数 | Correlation 相关性     | p-value   | Confidence 置信度 |
| :------------------ | :--------- | :--------------------- | :-------- | :---------------- |
| valence - tempo     | +0.0621    | weak positive 弱正相关 | 2.645e-02 | p<0.05 显著       |
| valence - pitch     | +0.0109    | weak positive 弱正相关 | 6.960e-01 | p>=0.05 不显著    |
| valence - range     | -0.0771    | weak negative 弱负相关 | 5.794e-03 | p<0.05 显著       |
| valence - key       | +0.0119    | weak positive 弱正相关 | 6.705e-01 | p>=0.05 不显著    |
| valence - mode      | +0.3880    | positive 正相关        | 3.640e-47 | p<0.05 显著       |
| valence - pitchSD   | -0.0666    | weak negative 弱负相关 | 1.729e-02 | p<0.05 显著       |
| valence - direction | +0.0010    | weak positive 弱正相关 | 9.709e-01 | p>=0.05 不显著    |
| valence - volume    | +0.1174    | weak positive 弱正相关 | 2.597e-05 | p<0.05 显著       |
| arousal - tempo     | +0.1579    | weak positive 弱正相关 | 1.382e-08 | p<0.05 显著       |
| arousal - pitch     | -0.1819    | weak negative 弱负相关 | 5.714e-11 | p<0.05 显著       |
| arousal - range     | +0.3276    | positive 正相关        | 2.324e-33 | p<0.05 显著       |
| arousal - key       | +0.0030    | weak positive 弱正相关 | 9.138e-01 | p>=0.05 不显著    |
| arousal - mode      | -0.0962    | weak negative 弱负相关 | 5.775e-04 | p<0.05 显著       |
| arousal - pitchSD   | +0.3511    | positive 正相关        | 2.201e-38 | p<0.05 显著       |
| arousal - direction | -0.0958    | weak negative 弱负相关 | 6.013e-04 | p<0.05 显著       |
| arousal - volume    | +0.3800    | positive 正相关        | 3.558e-45 | p<0.05 显著       |

### Feature distribution 特征统计图
| Feature 特征 |                                   Distribution chart 分布图                                   |
| :----------: | :-------------------------------------------------------------------------------------------: |
|    tempo     |   ![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/tempo.jpg)   |
|    pitch     |   ![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/pitch.jpg)   |
|    range     |   ![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/range.jpg)   |
|     key      |    ![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/key.jpg)    |
|     mode     |   ![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/mode.jpg)    |
|   pitchSD    |  ![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/pitchSD.jpg)  |
|  direction   | ![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/direction.jpg) |
|    volume    |  ![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/volume.jpg)   |

## Data processor 数据处理脚本
Note: .xml / .musicxml / .mxl are all categorized as XML.

注：.xml / .musicxml / .mxl 均归为 XML

![](https://www.modelscope.cn/datasets/monetjoe/EMelodyGen/resolve/master/figs/processor.jpg)

### Environment 环境
Under Windows 10, install [MuseScore 3](https://ftp.osuosl.org/pub/musescore-nightlies/windows/3x/stable/MuseScore-3.6.2.548021803-x86_64.msi) and add its main program path to the environment variables, naming the variable `mscore`. Then, create and activate a conda environment using the following command and install dependencies with pip:

Windows 10 下安装 [MuseScore 3](https://ftp.osuosl.org/pub/musescore-nightlies/windows/3x/stable/MuseScore-3.6.2.548021803-x86_64.msi) 并将其主程序路径添加进环境变量，变量名记为 mscore；之后按如下命令创建和激活 conda 环境并使用 pip 安装依赖：

```bash
conda create -n py311 python==3.11 -y
conda activate py311
pip install -r requirements.txt
```

## Evaluation 评估
<https://www.modelscope.cn/models/monetjoe/EMelodyGen>

## Cite 引用
### AIART
```bibtex
@inproceedings{11152266,
  author    = {Zhou, Monan and Li, Xiaobing and Yu, Feng and Li, Wei},
  booktitle = {2025 IEEE International Conference on Multimedia and Expo Workshops (ICMEW)},
  title     = {EMelodyGen: Emotion-Conditioned Melody Generation in ABC Notation with the Musical Feature Template},
  year      = {2025},
  pages     = {1-6},
  keywords  = {Correlation;Codes;Conferences;Confusion matrices;Music;Psychology;Data augmentation;Complexity theory;Reliability;Melody generation;controllable music generation;ABC notation;emotional condition},
  doi       = {10.1109/ICMEW68306.2025.11152266}
}
```

### TAI
```bibtex
@article{zhou_li_yu_li_2025,
  title     = {EMelodyGen: Emotion-Conditioned Melody Generation in ABC Notation with Musical Feature Templates},
  volume    = {1},
  issn      = {2982-3439},
  doi       = {10.53941/tai.2025.100013},
  number    = {1},
  journal   = {Transactions on Artificial Intelligence},
  publisher = {Scilight Press},
  author    = {Zhou, Monan and Li, Xiaobing and Yu, Feng and Li, Wei},
  year      = {2025},
  pages     = {199&ndash;211}
}
```

<div style="display:none">
