craigsapp / website-polish-scores

Front-end for digital transcriptions of the Polish Music Heritage in Open Access project
https://polishscores.org
3 stars 1 forks source link

Add notation configuration parameters to URL #263

Closed craigsapp closed 4 months ago

craigsapp commented 4 months ago

Example:

https://polishscores.org/?id=pl-wumfc--n2100--001-012

Add configuration parameters to automatically set configuration options, such as:

https://polishscores.org/?id=pl-wumfc--n2100--001-012&config=MsOcAs

Where config=MsOcAs are the configuration options to set:

Screenshot 2024-02-07 at 22 45 08

Probable codes for options:

Code Meaning
Ms Modern stemming
Ml Modern letters
Oc Only bass/treble clefs
An Show all notes
Er Expand repeat marks
As Automatic stemming
Ss Sounding score
Ts Tight spacing
Hs Hide sic warnings
Sa Apply sic corrections
Fs First system only
Sc Show custodes
Tr{+P5} Transposition
Tp{140} Tempo scaling
Fi{extract -k 1} Filter

Also update the URL with any activated configuration options.

This will allow saving/sending links to the score with a particular view state.

It would also might be useful to add to starred works (in that case other configuration options should be cleared in the current session when the work is loaded from the starred list).

craigsapp commented 4 months ago

Commit https://github.com/craigsapp/website-polish-scores/commit/94dd269286ed343086b222f895ef113c0f5c5fe3 adds a parsing function to read configuration parameters from the URL.

Example: https://polishscores.org/?id=pl-sa--481-a-viii-121--033&config=MsErAs

Screenshot 2024-02-08 at 00 22 44

Checking transposition, first original:

https://polishscores.org/?id=pl-sa--481-a-viii-121--033

Screenshot 2024-02-08 at 00 28 23

Now transposed down a minor third, and automatic stem direction added:

https://polishscores.org/?id=pl-sa--481-a-viii-121--033&config=AsTr{-m3}

Screenshot 2024-02-08 at 00 26 39 Screenshot 2024-02-08 at 00 26 48

Also applying free-form filter in configuration panel:

https://polishscores.org/?id=pl-sa--481-a-viii-121--033&config=AsTr{-m3}Fi{extract%20-s1}

Screenshot 2024-02-08 at 00 31 09

Configuration settings:

Screenshot 2024-02-08 at 00 31 56

Expand repeats option:

https://polishscores.org/?id=pl-sa--481-a-viii-121--033&config=Er

Screenshot 2024-02-08 at 00 34 05
craigsapp commented 4 months ago

Commit https://github.com/craigsapp/website-polish-scores/commit/98f26ec53a3521fa5ff3776893625dbedada5417 updates the URL with the configuration settings:

https://polishscores.org/?id=pl-wumfc--r288

Screenshot 2024-02-09 at 00 46 17

Checking the "Hide sic warnings" and Transposing up a perfect fifth:

Code Meaning
Hs Hide sic warnings
Tr_+P5_ Transpose up a perfect 5th

https://polishscores.org/?id=pl-wumfc--r288&config=HsTr_+P5_

Screenshot 2024-02-09 at 00 47 46

I changed { and } to _ so that they do not need to be unescaped in the URL. I forced + to not escape. Maybe this can be used for { and } in a similar manner since they are also not important to be escaped.

craigsapp commented 4 months ago

Transpose is not loading from URL, probably due to change in { and } usage. Probably return to this system anyway.

craigsapp commented 4 months ago

Test of free-form filter (extract bottom staff of score):

https://polishscores.org/?id=pl-stab--5a--001-007

Screenshot 2024-02-09 at 18 37 33

https://polishscores.org/?id=pl-stab--5a--001-007&config=Fi{extract%20-k1}

Screenshot 2024-02-09 at 18 35 22