sul-cidr/josquin-ribbon

Generate JSON score directly on ribbon page

Opened this issue · 0 comments

In the long term, it will be useful to generate the JSON version of the score used to display the ribbon plot within the ribbon webpage rather than downloading it from the server.

For example here is a JSON score:
https://josquin.stanford.edu/cgi-bin/josquin?a=proll-json&file=Jos3005
This was created from the original Humdrum score:
https://josquin.stanford.edu/cgi-bin/josquin?a=humdrum&file=Jos3005

The Humdrum files are also available on Github:
https://github.com/josquin-research-project/jrp-scores
That repository is a meta-repository that links to multiple real repositories as submodules. The master index is:
https://github.com/josquin-research-project/jrp-scores/blob/master/index.hmd
This will give the precise filename for Jos3005 (which includes a human-readable portion of the filename after the catalog number):
https://github.com/josquin-research-project/jrp-scores/blob/e56da96a4f446/index.hmd#L691

This, in turn, can be used to find the score in the "Jos" repository:
https://github.com/josquin-research-project/Jos/blob/master/Jos3005-Jay_bien_cause_de_lamenter.krn
(and downloaded from the "raw" link for the file).

After downloading it can be converted into JSON using the program:
https://github.com/craigsapp/humextra/blob/master/cli/proll.cpp
Using Emscripten to compile to JavaScript (although the program will have to be modified and placed into humlib for that.

This will allow for drag-and-drop of Humdrum scores from the desktop in a similar manner to how it is possible to load Humdrum files into Verovio Humdrum Viewer:
http://doc.verovio.humdrum.org/interface/humdrum/#drag-and-drop-humdrum-files-into-vhv

Also, this will minimize dependency on a server backend. For example, the JRP website will be hosted on github:
http://github.com/josquin-research-project/jrp-website
And a beta version of the cloud-hosted website:
https://www.josqu.in