asigalov61 commited on
Commit
525ea77
·
verified ·
1 Parent(s): 3e2301f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +116 -0
README.md CHANGED
@@ -39,5 +39,121 @@ configs:
39
 
40
  ***
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  ### Project Los Angeles
43
  ### Tegridy Code 2025
 
39
 
40
  ***
41
 
42
+ ## Installation and use
43
+
44
+ ***
45
+
46
+ ### Load dataset
47
+
48
+ ```python
49
+ #===================================================================
50
+
51
+ from datasets import load_dataset
52
+
53
+ #===================================================================
54
+
55
+ godzilla_mono_melodies = load_dataset('asigalov61/Godzilla-Mono-Melodies')
56
+
57
+ dataset_split = 'train'
58
+ dataset_entry_index = 0
59
+
60
+ dataset_entry = godzilla_mono_melodies[dataset_split][dataset_entry_index]
61
+
62
+ midi_hash = dataset_entry['md5']
63
+ midi_melody = dataset_entry['melody']
64
+ midi_melody_accompaniment = dataset_entry['melody_accompaniment']
65
+
66
+ print(midi_hash)
67
+ print(midi_melody[:15])
68
+ print(midi_melody_accompaniment[:15])
69
+ ```
70
+
71
+ ***
72
+
73
+ ### Decode score to MIDI
74
+
75
+ ```python
76
+ #===================================================================
77
+ # !git clone --depth 1 https://github.com/asigalov61/tegridy-tools
78
+ #===================================================================
79
+
80
+ import TMIDIX
81
+
82
+ #===================================================================
83
+
84
+ def decode_to_ms_MIDI_score(midi_score):
85
+
86
+ score = []
87
+
88
+ time = 0
89
+ dur = 1
90
+ vel = 90
91
+ pitch = 60
92
+ channel = 0
93
+ patch = 0
94
+
95
+ channels_map = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 9, 12, 13, 14, 15]
96
+ patches_map = [40, 0, 10, 19, 24, 35, 40, 52, 56, 9, 65, 73, 0, 0, 0, 0]
97
+ velocities_map = [125, 80, 100, 80, 90, 100, 100, 80, 110, 110, 110, 110, 80, 80, 80, 80]
98
+
99
+ for m in midi_score:
100
+
101
+ if 0 <= m < 256:
102
+ time += m * 16
103
+
104
+ elif 256 < m < 512:
105
+ dur = (m-256) * 16
106
+
107
+ elif 512 < m < 2048:
108
+ cha = (m-512) // 128
109
+ pitch = (m-512) % 128
110
+
111
+ channel = channels_map[cha]
112
+ patch = patches_map[channel]
113
+ vel = velocities_map[channel]
114
+
115
+ score.append(['note', time, dur, channel, pitch, vel, patch])
116
+
117
+ return score
118
+
119
+ #===================================================================
120
+
121
+ ms_MIDI_score = decode_to_ms_MIDI_score(midi_melody_accompaniment)
122
+
123
+ #===================================================================
124
+
125
+ detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(ms_MIDI_score,
126
+ output_signature = midi_hash,
127
+ output_file_name = midi_hash,
128
+ track_name='Project Los Angeles'
129
+ )
130
+ ```
131
+
132
+ ***
133
+
134
+ ## Citations
135
+
136
+ ```bibtex
137
+ @misc{GodzillaMIDIDataset2025,
138
+ title = {Godzilla MIDI Dataset: Enormous, comprehensive, normalized and searchable MIDI dataset for MIR and symbolic music AI purposes},
139
+ author = {Alex Lev},
140
+ publisher = {Project Los Angeles / Tegridy Code},
141
+ year = {2025},
142
+ url = {https://huggingface.co/datasets/projectlosangeles/Godzilla-MIDI-Dataset}
143
+ ```
144
+
145
+ ```bibtex
146
+ @misc {breadai_2025,
147
+ author = { {BreadAi} },
148
+ title = { Sourdough-midi-dataset (Revision cd19431) },
149
+ year = 2025,
150
+ url = {\url{https://huggingface.co/datasets/BreadAi/Sourdough-midi-dataset}},
151
+ doi = { 10.57967/hf/4743 },
152
+ publisher = { Hugging Face }
153
+ }
154
+ ```
155
+
156
+ ***
157
+
158
  ### Project Los Angeles
159
  ### Tegridy Code 2025