craigsapp/website-polish-scores

Add notation configuration parameters to URL

craigsapp opened this issue · 4 comments

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).

Commit 94dd269 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

Commit 98f26ec 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.

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