Closed MarkGotham closed 1 year ago
Store suggested remote path in score.txt
score.mxl
score.txt
Apply immediately as solution to missing scores for Beethoven Piano Sonatas. Later, consider expanding to other corpora.
Where a local score.mxl
files exists, perhaps still include the score.txt
for source information (i.e., again, URL pointing to the source, and possibly more info).
Remote sores would mean tinkering with the music21 environment settings. Here's a draft that gets the job done but also leaves the place as we found it. Anyone (e.g., @jacobtylerwalls) more familiar with this and spot any issues?
urlPath = 'https://raw.githubusercontent.com/user/repo/file.mxl'
autoDownloadSettingAtStart = environment.Environment()['autoDownload'] # Get current setting
environment.set('autoDownload', 'allow') # Change current setting
score = converter.parse(urlPath) # And do anything with it
environment.set('autoDownload', autoDownloadSettingAtStart) # Restore settings as they were
I think the documented interface is the UserSettings
class, but I don't know why, exactly.
Or, we might use curl
for download a local copy of the score and store it in the folder with the "score.mxl" name. The advantage is that we do it only once; the disadvantage is that we don't automatically get updates from the original repo.
Thanks both.
I guess I'm mostly thinking that it's unwise to tinker with users' environment settings, especially as that functionality would probably be tucked deeply into other functions. We can alert with warnings and the like, of course, but still ...
@giamic, does curl
address that concern?
Perhaps it's best to leave it with the music21 error message, or one of our own like "To use this function you need to set your environment settings" (with how to instructions).
Reminded myself that I've considered this for musescore files before: https://github.com/MarkGotham/When-in-Rome/blob/97e91852e00b5bcbdf1bd88d00a111d6141e284f/Code/updates_and_checks.py#L299-L303
Apply immediately as solution to missing scores for Beethoven Piano Sonatas. Later, consider expanding to other corpora.
So, again this ^.
Curl is just a way to download the file locally. Once that is done, no other changes are needed. So basically we bypass the problem of remote scores on m21
Which version of the Beethoven sonatas? Perhaps this one from @craigsapp?
Am I right in thinking:
Further questions for @craigsapp
Thanks all. Grateful for your views and aiming not to step on any toes!
Just to clarify on 1. I ended up using the scores by user ClassicMan (which should be the ones available in other MIR repositories?)
I was originally intending to use the ones by @craigsapp but, after running a note-by-note comparison, I noticed that the transcriptions used for the BPS dataset were probably closer to the scores by ClassicMan, so it lead to a lower risk of misalignment to use those scores.
Just to clarify on 1. I ended up using the scores by user ClassicMan (which should be the ones available in other MIR repositories?)
Thanks @napulen. Can you clarify where and what the licence is?
These are all files without an explicit license (assumed all rights reserved). I reached out to the author privately and received permission to use them for training the network.
Thanks all.
FYI @giamic , @napulen, this is now done for krn scores:
Not for:
Feedback (always) welcome. Thanks again.
Support option for parsing score from remote path. Reasons: