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:
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
Checking transposition, first original:
https://polishscores.org/?id=pl-sa--481-a-viii-121--033
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}
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}
Configuration settings:
Expand repeats option:
https://polishscores.org/?id=pl-sa--481-a-viii-121--033&config=Er
Commit 98f26ec updates the URL with the configuration settings:
https://polishscores.org/?id=pl-wumfc--r288
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_
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.
Test of free-form filter (extract bottom staff of score):
https://polishscores.org/?id=pl-stab--5a--001-007
https://polishscores.org/?id=pl-stab--5a--001-007&config=Fi{extract%20-k1}