sander-wood commited on
Commit
1029382
1 Parent(s): 4ac9bf3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -10
README.md CHANGED
@@ -22,18 +22,24 @@ WikiMT is a unique resource to support the evaluation of semantic search and mus
22
 
23
  To access metadata related to ABC notation music scores from the WikiMT dataset, follow these steps:
24
 
25
- 1. **Locate the Wikifonia MusicXML Data Link:** Start by visiting the discussion thread on the forum to find the download link for the Wikifonia dataset in MusicXML format (with a .mxl extension). You can find the discussion here: [Download for Wikifonia all 6,675 Lead Sheets](http://www.synthzone.com/forum/ubbthreads.php/topics/384909/Download_for_Wikifonia_all_6,6).
26
-
 
 
 
 
 
 
27
  2. **Run the Provided Code:** Once you have found the Wikifonia MusicXML data link, execute the provided Python code below. This code will handle the following tasks:
28
- - Automatically download the "wikimusictext.jsonl" dataset, which contains metadata associated with music scores.
29
  - Automatically download the "xml2abc.py" conversion script, with special thanks to the author, Willem (Wim).
30
- - Prompt you for the Wikifonia data URL, as follows:
 
31
 
32
  ```python
33
- Enter the Wikifonia URL: [Paste your URL here]
34
  ```
35
 
36
- Paste the URL pointing to the Wikifonia.zip file and press Enter.
37
 
38
  The below code will take care of downloading, processing, and extracting the music score metadata, making it ready for your research or applications.
39
 
@@ -82,7 +88,7 @@ def filter(lines):
82
  def load_music(filename):
83
  # Convert the file to ABC notation
84
  p = subprocess.Popen(
85
- f'python xml2abc_145/xml2abc.py -m 2 -c 6 -x "{filename}"',
86
  stdout=subprocess.PIPE,
87
  stderr=subprocess.PIPE,
88
  shell=True
@@ -136,10 +142,14 @@ if response.status_code == 200:
136
  else:
137
  print(f"Failed to download. Status code: {response.status_code}")
138
 
139
- # Download the xml2abc.py script (special thanks to Wim Vree for creating this script)
140
- download_and_extract("https://wim.vree.org/svgParse/xml2abc.py-145.zip")
 
 
 
141
 
142
  # Download the Wikifonia dataset
 
143
  wikifonia_url = input("Enter the Wikifonia URL: ")
144
  download_and_extract(wikifonia_url)
145
 
@@ -161,7 +171,7 @@ with open("wikimusictext.jsonl", "w", encoding="utf-8") as f:
161
  f.write(json.dumps(song, ensure_ascii=False)+"\n")
162
  ```
163
 
164
- By following these steps and running the provided code, you can efficiently access ABC notation music scores from the WikiMT dataset. Just ensure you have the metadata, the `xml2abc.py` script, and the correct download link before starting. Enjoy your musical journey!
165
 
166
 
167
  ## Copyright Disclaimer
 
22
 
23
  To access metadata related to ABC notation music scores from the WikiMT dataset, follow these steps:
24
 
25
+ 1. **Locate the xml2abc.py script**:
26
+ - Visit https://wim.vree.org/svgParse/xml2abc.html.
27
+ - You will find a python script named `xml2abc.py-{version number}.zip`. Copy the link of this zip file.
28
+
29
+ 2. **Locate the Wikifonia MusicXML Data**:
30
+ - Visit the discussion: [Download for Wikifonia all 6,675 Lead Sheets](http://www.synthzone.com/forum/ubbthreads.php/topics/384909/Download_for_Wikifonia_all_6,6).
31
+ - You will find the download link of a zip file named `Wikifonia.zip` for the Wikifonia dataset in MusicXML format (with a.mxl extension). Copy the link of this zip file.
32
+
33
  2. **Run the Provided Code:** Once you have found the Wikifonia MusicXML data link, execute the provided Python code below. This code will handle the following tasks:
 
34
  - Automatically download the "xml2abc.py" conversion script, with special thanks to the author, Willem (Wim).
35
+ - Automatically download the "wikimusictext.jsonl" dataset, which contains metadata associated with music scores.
36
+ - Prompt you for the xml2abc/Wikifonia URL, as follows:
37
 
38
  ```python
39
+ Enter the xml2abc/Wikifonia URL: [Paste your URL here]
40
  ```
41
 
42
+ Paste the URL pointing to the `xml2abc.py-{version number}.zip` or `Wikifonia.zip` file and press Enter.
43
 
44
  The below code will take care of downloading, processing, and extracting the music score metadata, making it ready for your research or applications.
45
 
 
88
  def load_music(filename):
89
  # Convert the file to ABC notation
90
  p = subprocess.Popen(
91
+ f'python {xml2abc_dir}/xml2abc.py -m 2 -c 6 -x "{filename}"',
92
  stdout=subprocess.PIPE,
93
  stderr=subprocess.PIPE,
94
  shell=True
 
142
  else:
143
  print(f"Failed to download. Status code: {response.status_code}")
144
 
145
+ # Download the xml2abc.py script
146
+ # Visit https://wim.vree.org/svgParse/xml2abc.html
147
+ xml2abc_url = input("Enter the xml2abc URL: ")
148
+ download_and_extract(xml2abc_url)
149
+ xml2abc_dir = xml2abc_url.split('/')[-1][:-4].replace(".py", "").replace("-", "_")
150
 
151
  # Download the Wikifonia dataset
152
+ # Visit http://www.synthzone.com/forum/ubbthreads.php/topics/384909/Download_for_Wikifonia_all_6,6
153
  wikifonia_url = input("Enter the Wikifonia URL: ")
154
  download_and_extract(wikifonia_url)
155
 
 
171
  f.write(json.dumps(song, ensure_ascii=False)+"\n")
172
  ```
173
 
174
+ By following these steps and running the provided code, you can efficiently access ABC notation music scores from the WikiMT dataset. Just ensure you have the correct download links of xml2abc and Wikifonia before starting. Enjoy your musical journey!
175
 
176
 
177
  ## Copyright Disclaimer