Datasets:

Modalities:
Tabular
Text
Formats:
arrow
ArXiv:
Libraries:
Datasets
License:
Dataset Viewer
Auto-converted to Parquet
Search is not available for this dataset
label
class label
4 classes
valence
class label
2 classes
arousal
class label
2 classes
key
class label
10 classes
mode
class label
2 classes
pitch
float32
36
89.2
range
float32
2
91
pitchSD
float32
0.64
24.8
direction
int8
0
1
tempo
float32
47.9
185
volume
float32
0.02
0.17
1Q2
0low
1high
2D
0minor
53.372669
36
11.068011
0
99.384018
0.131348
3Q4
1high
0low
4E
0minor
65.944984
43
13.11982
0
107.666016
0.092516
3Q4
1high
0low
2D
1major
59.827858
47
11.112993
1
107.666016
0.065901
1Q2
0low
1high
5F
1major
66.126472
72
19.168644
1
161.499023
0.109171
2Q3
0low
0low
8G#/Ab
1major
72.545883
31
10.476516
0
107.666016
0.06698
0Q1
1high
1high
10Bb
1major
57.24078
37
10.120347
1
151.999084
0.112639
2Q3
0low
0low
4E
0minor
60.703335
51
14.281059
0
129.199219
0.095812
2Q3
0low
0low
8G#/Ab
1major
51.059898
36
11.530459
1
151.999084
0.048587
0Q1
1high
1high
4E
0minor
58.58046
50
13.225797
0
151.999084
0.124726
2Q3
0low
0low
8G#/Ab
0minor
52.876545
25
8.895436
0
99.384018
0.07179
1Q2
0low
1high
5F
0minor
55.396763
48
14.439615
0
129.199219
0.112633
0Q1
1high
1high
5F
0minor
58.5
32
8.301388
0
161.499023
0.144242
3Q4
1high
0low
8G#/Ab
1major
53.16013
43
14.479549
0
117.453835
0.083251
0Q1
1high
1high
10Bb
1major
57.633064
48
13.467944
1
92.285156
0.099967
1Q2
0low
1high
0C
0minor
58.747044
67
19.114433
0
103.359375
0.115596
1Q2
0low
1high
0C
0minor
72.162498
47
13.800311
0
95.703125
0.095347
1Q2
0low
1high
0C
1major
64.300003
43
9.141116
1
123.046875
0.103681
3Q4
1high
0low
2D
1major
59.784142
55
8.94257
0
129.199219
0.059988
1Q2
0low
1high
0C
0minor
65.61232
77
17.301411
0
99.384018
0.087508
3Q4
1high
0low
8G#/Ab
1major
58.689854
36
8.934514
1
151.999084
0.087708
0Q1
1high
1high
6F#
1major
58.528969
53
16.460848
0
112.347145
0.107808
1Q2
0low
1high
8G#/Ab
1major
56.026787
69
20.62583
0
143.554688
0.09753
1Q2
0low
1high
10Bb
1major
65.030861
58
16.032537
1
117.453835
0.101848
2Q3
0low
0low
2D
0minor
64.481155
56
15.336694
0
89.102913
0.067251
3Q4
1high
0low
4E
1major
71.778816
58
16.062796
1
112.347145
0.092429
2Q3
0low
0low
3Eb
0minor
72.431252
56
8.457212
1
123.046875
0.039436
3Q4
1high
0low
10Bb
1major
64.326988
43
10.52776
1
86.132813
0.08382
3Q4
1high
0low
8G#/Ab
1major
64.835564
43
10.043075
0
107.666016
0.075577
1Q2
0low
1high
10Bb
0minor
58.031349
49
12.029442
0
112.347145
0.080436
1Q2
0low
1high
8G#/Ab
0minor
63.31818
41
12.011401
0
99.384018
0.096155
3Q4
1high
0low
8G#/Ab
1major
55.583607
52
16.021309
1
172.265625
0.072068
3Q4
1high
0low
11B
1major
64.10585
41
11.233651
1
107.666016
0.089317
1Q2
0low
1high
8G#/Ab
1major
53.237411
67
19.024721
1
95.703125
0.109241
0Q1
1high
1high
5F
1major
54.217247
53
13.629944
0
161.499023
0.10639
2Q3
0low
0low
3Eb
0minor
62.590858
51
13.560596
1
92.285156
0.085068
3Q4
1high
0low
5F
1major
58.226055
36
11.852272
1
117.453835
0.079659
3Q4
1high
0low
11B
0minor
65.366554
60
15.653418
1
161.499023
0.067299
1Q2
0low
1high
2D
0minor
69.997192
35
8.778964
0
95.703125
0.0957
0Q1
1high
1high
0C
1major
65.283272
65
17.969069
0
161.499023
0.103615
2Q3
0low
0low
5F
1major
52.916012
38
9.425674
1
135.999176
0.082594
3Q4
1high
0low
8G#/Ab
1major
56.813747
36
9.740349
1
103.359375
0.105485
2Q3
0low
0low
8G#/Ab
0minor
68.955627
50
13.552524
0
123.046875
0.056808
2Q3
0low
0low
8G#/Ab
1major
54.504879
36
11.76316
1
123.046875
0.109884
1Q2
0low
1high
0C
1major
49.404686
55
12.781118
1
89.102913
0.097447
0Q1
1high
1high
1C#
1major
56.540337
52
15.569903
0
99.384018
0.11391
2Q3
0low
0low
8G#/Ab
1major
66.662659
50
13.388759
1
103.359375
0.073721
1Q2
0low
1high
1C#
0minor
61.925209
60
15.42159
0
143.554688
0.121316
2Q3
0low
0low
0C
0minor
54.438534
34
12.556382
0
95.703125
0.0966
0Q1
1high
1high
8G#/Ab
1major
56.701878
48
13.888146
0
73.828125
0.121548
0Q1
1high
1high
2D
1major
66.336555
41
10.49283
1
99.384018
0.154311
1Q2
0low
1high
4E
0minor
36
2
1
1
60.092659
0.080033
2Q3
0low
0low
3Eb
1major
58.113491
55
15.096193
1
112.347145
0.075582
2Q3
0low
0low
0C
0minor
59.461182
42
12.919236
1
89.102913
0.088882
0Q1
1high
1high
8G#/Ab
0minor
64.162788
60
12.977494
0
117.453835
0.098685
0Q1
1high
1high
8G#/Ab
1major
65.045937
65
17.702728
0
99.384018
0.103569
1Q2
0low
1high
8G#/Ab
0minor
58.655174
17
5.504079
0
143.554688
0.111761
0Q1
1high
1high
6F#
1major
62.373428
52
13.206657
1
172.265625
0.088987
1Q2
0low
1high
8G#/Ab
0minor
61.507195
46
14.14919
0
123.046875
0.135831
1Q2
0low
1high
2D
0minor
62.429485
54
15.510726
0
123.046875
0.111095
1Q2
0low
1high
8G#/Ab
0minor
70.599602
66
17.252489
0
129.199219
0.083297
2Q3
0low
0low
4E
1major
64.047348
35
8.152758
0
75.999542
0.028344
3Q4
1high
0low
1C#
1major
75.896225
45
12.885878
1
83.354332
0.037754
3Q4
1high
0low
8G#/Ab
0minor
53.654804
27
9.31335
0
99.384018
0.098524
2Q3
0low
0low
8G#/Ab
1major
56.366665
30
9.262169
1
129.199219
0.03513
3Q4
1high
0low
1C#
1major
64.039749
51
13.916911
0
103.359375
0.090064
0Q1
1high
1high
8G#/Ab
0minor
53.139534
75
12.906234
0
151.999084
0.085602
2Q3
0low
0low
8G#/Ab
1major
48.081635
55
21.905024
1
95.703125
0.102447
0Q1
1high
1high
8G#/Ab
0minor
65.73954
72
19.826208
1
143.554688
0.093681
0Q1
1high
1high
4E
1major
62.21653
60
13.676223
1
107.666016
0.111849
0Q1
1high
1high
8G#/Ab
1major
57.965034
55
15.637798
0
151.999084
0.115751
2Q3
0low
0low
8G#/Ab
1major
57.626087
45
10.276153
0
143.554688
0.07768
1Q2
0low
1high
6F#
0minor
62.898735
66
19.592167
0
129.199219
0.103662
0Q1
1high
1high
2D
1major
66.549454
39
9.619992
1
143.554688
0.100707
0Q1
1high
1high
0C
1major
66.695206
51
17.344799
0
89.102913
0.084468
0Q1
1high
1high
6F#
1major
59.02211
34
6.279856
0
89.102913
0.061775
0Q1
1high
1high
1C#
0minor
65.769234
41
11.736926
0
112.347145
0.118805
1Q2
0low
1high
2D
0minor
60.603741
65
16.366793
1
135.999176
0.098207
0Q1
1high
1high
5F
1major
61.637501
70
17.374149
0
86.132813
0.088044
0Q1
1high
1high
10Bb
0minor
61.962162
56
13.422397
1
129.199219
0.108023
1Q2
0low
1high
8G#/Ab
1major
69.20713
69
18.726358
1
135.999176
0.087494
1Q2
0low
1high
0C
0minor
54.816395
55
16.516035
1
95.703125
0.077971
3Q4
1high
0low
10Bb
0minor
61.426941
47
14.189774
1
78.302559
0.107583
2Q3
0low
0low
0C
1major
58.934925
50
12.623451
0
107.666016
0.043552
1Q2
0low
1high
5F
0minor
52.8937
51
13.252563
1
123.046875
0.09339
3Q4
1high
0low
1C#
1major
58.724136
36
10.164031
0
103.359375
0.086764
1Q2
0low
1high
5F
0minor
58.74091
59
15.575072
1
92.285156
0.089486
0Q1
1high
1high
8G#/Ab
0minor
62.224323
36
12.071004
0
143.554688
0.102681
1Q2
0low
1high
8G#/Ab
0minor
63.593987
46
12.438563
0
151.999084
0.120687
1Q2
0low
1high
6F#
0minor
57.977989
52
12.525552
0
64.599609
0.10374
0Q1
1high
1high
10Bb
0minor
65.282532
51
14.226421
0
135.999176
0.087351
3Q4
1high
0low
8G#/Ab
1major
58.4431
36
9.51511
1
117.453835
0.098383
3Q4
1high
0low
1C#
1major
63.881657
60
16.184519
0
99.384018
0.089436
2Q3
0low
0low
2D
0minor
62.351578
52
15.362037
1
112.347145
0.071282
0Q1
1high
1high
8G#/Ab
1major
62.585442
45
9.80582
1
151.999084
0.128417
0Q1
1high
1high
8G#/Ab
1major
61.18182
76
17.65659
1
161.499023
0.097193
0Q1
1high
1high
0C
1major
57.205479
51
13.625579
1
161.499023
0.127365
2Q3
0low
0low
8G#/Ab
0minor
57.561646
36
10.953434
0
69.837418
0.085789
0Q1
1high
1high
8G#/Ab
1major
64.937912
45
11.54959
1
151.999084
0.089687
2Q3
0low
0low
0C
0minor
60.723091
36
10.750987
1
86.132813
0.083444
0Q1
1high
1high
8G#/Ab
1major
68.649757
71
19.482967
0
112.347145
0.081285
End of preview. Expand in Data Studio

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.

Maintenance

GIT_LFS_SKIP_SMUDGE=1 git clone git@hf.co:datasets/monetjoe/EMelodyGen
cd EMelodyGen

Usage

from datasets import load_dataset

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

# Analysis subset
ds = load_dataset("monetjoe/EMelodyGen", name="Analysis", split="train")
for item in ds:
    print(item)

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 significant
valence - pitch +0.0109 weak positive 6.960e-01 p>=0.05 insignificant
valence - range -0.0771 weak negative 5.794e-03 p<0.05 significant
valence - key +0.0119 weak positive 6.705e-01 p>=0.05 insignificant
valence - mode +0.3880 positive 3.640e-47 p<0.05 significant
valence - pitchSD -0.0666 weak negative 1.729e-02 p<0.05 significant
valence - direction +0.0010 weak positive 9.709e-01 p>=0.05 insignificant
valence - volume +0.1174 weak positive 2.597e-05 p<0.05 significant
arousal - tempo +0.1579 weak positive 1.382e-08 p<0.05 significant
arousal - pitch -0.1819 weak negative 5.714e-11 p<0.05 significant
arousal - range +0.3276 positive 2.324e-33 p<0.05 significant
arousal - key +0.0030 weak positive 9.138e-01 p>=0.05 insignificant
arousal - mode -0.0962 weak negative 5.775e-04 p<0.05 significant
arousal - pitchSD +0.3511 positive 2.201e-38 p<0.05 significant
arousal - direction -0.0958 weak negative 6.013e-04 p<0.05 significant
arousal - volume +0.3800 positive 3.558e-45 p<0.05 significant

Feature distribution

Feature Distribution chart
key
pitch
range
pitchSD
tempo
volume
mode
direction

Processed EMOPIA & VGMIDI

The processed EMOPIA and processed VGMIDI datasets will be used to evaluate the error-free rate of music scores generated by fine-tuning the backbone with existing emotion-labeled datasets. Therefore, it is essential to ensure that the processed data is compatible with the input format required by the pre-trained backbone.

We found that the average number of measures in the dataset used for pre-training backbone is approximately 20, and the maximum number of measures supported by the pre-trained backbone input is 32. Consequently, we converted the original EMOPIA and VGMIDI data into XML scores filtering out erroneous items and segmented them into chunks of 20 measures each. Each chunk was appended with an ending marker to prevent the model from generating endlessly in cases of repetitive melodies without seeing a terminating mark. For the ending segments of the scores, if a segment exceeded 10 measures, it was further divided; otherwise, it was combined with the previous segment. This approach ensures that the resulting score slices do not exceed 30 measures, thereby guaranteeing that all slices are within the maximum measure limit supported by backbone, with an average of approximately 20 measures.

It is noted that when converting MIDI to XML using current tools, repeat sections cannot be folded back. In fact, after converting the dataset used for pre-training backbone into MIDI and expanding all repeat sections, the average number of measures was approximately 35. However, due to the maximum measure limit supported during pre-training, repeat markers were not expanded at that stage, and since repeat markers themselves occupy only two characters, we could not use 35 measures as the slicing unit even for MIDI data.

Subsequently, we converted the segmented XML slices into ABC notation format, performed data augmentation by transposing to 15 keys, and extracted the melodic lines and control codes to produce the final processed EMOPIA and processed VGMIDI datasets. Both datasets have a consistent structure comprising three columns: the first column is the control code, the second column is ABC chars, and the third column contains the 4Q emotion labels inherited from the original dataset. The total number of samples is 21,480 for processed EMOPIA and 9,315 for processed VGMIDI, which were split into training and test sets at a 10:1 ratio. There is almost no correlation between emotion and key. Therefore, the data augmentation by transposing to 15 keys is unlikely to significantly impact the label distribution.

Data source of Rough4Q

The Rough4Q dataset is a large-scale dataset created by automatically annotating a substantial amount of well-structured sheet music based on conclusions from correlation statistics. The data sources for this dataset, include both scores in XML series (XML / MXL / MusicXML) and ABC notation format scores. It is noted that not all datasets within the data source include chord markings. Since this paper focuses solely on melody generation, the absence of chord information is not a significant concern for the current study. After filtering out erroneous or duplicated scores and consolidating these into a unified XML format, we utilized music21 to rapidly extract features. Due to the high volume of data, we chose a few representative and computationally manageable features for approximate emotional annotation.

According to the correlation statistics, valence is significantly positively correlated only with mode. Therefore, mode was selected as the feature for determining the valence dimension, with minor mode classified as low valence and major mode as high valence. For arousal, it is significantly positively correlated with pitch range, pitch SD, and RMS. Given that RMS calculation requires audio rendering, which is impractical for large-scale automatic annotation, it was excluded. Among the features pitch range and pitch SD, the correlation between arousal and pitch SD is stronger. Moreover, pitch SD not only partially reflects pitch range but also indicates the intensity of musical variation, providing a richer set of information. Therefore, we tentatively select pitch SD as the benchmark for determining the arousal dimension, classifying scores below the median as low arousal and those above the median as high arousal. This approach yields a rough Russell 4Q label based on the V/A quadrant.

This rough labeling with noise primarily serves to record the state of mode and pitch SD as emotion-related embeddings, ensuring consistency with the format of the two processed datasets EMOPIA and VGMIDI. Following this, we applied the same data processing methods as those described for the two datasets, preserving labels while segmenting the scores. Notably, the IrishMAN was also the dataset used for backbone pre-training. But it discards scores longer than 32 measures, leading to a significant loss of data. In contrast, our segmentation approach preserves these longer scores.

We discovered that the data were highly imbalanced after processing, with the quantities of Q3 and Q4 labels differing by an order of magnitude from the other categories. To address this imbalance, we performed data augmentation by transposing Q3 and Q4 categories across 15 different keys only. As a result of these processes, we ultimately obtained the Rough4Q dataset, which now comprises approximately 521K samples in total and is split into training and test sets at a 10:1 ratio.

Statistics

Dataset Pie chart Total Train Test
Analysis 1278 1278 -
VGMIDI 9315 8383 932
EMOPIA 21480 19332 2148
Rough4Q 520673 468605 52068

Mirror

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

Cite

@inproceedings{Zhou2025EMelodyGen,
  title     = {EMelodyGen: Emotion-Conditioned Melody Generation in ABC Notation with the Musical Feature Template},
  author    = {Monan Zhou and Xiaobing Li and Feng Yu and Wei Li},
  month     = {Mar},
  year      = {2025},
  publisher = {GitHub},
  version   = {0.1},
  url       = {https://github.com/monetjoe/EMelodyGen}
}
Downloads last month
69

Space using monetjoe/EMelodyGen 1

Collection including monetjoe/EMelodyGen