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 prange #236

Closed craigsapp closed 5 months ago

craigsapp commented 5 months ago

Half of issue https://github.com/craigsapp/website-polish-scores/issues/116

craigsapp commented 5 months ago

Implemented with commit https://github.com/craigsapp/website-polish-scores/commit/0364d6dd13d2e8b9882192d4f9bd07732c676034

Example:

https://polishscores.org/?id=15xx:793

Click on the analysis button (looks like a pie chart), then choose "Pitch ranges" from the analysis list:

Screenshot 2024-01-16 at 12 34 46 AM

Mousing over the elements in the SVG image will display information about the components such as how many notes. Red bars are for flats, black is naturals and blue is for sharps. Double flats and sharps will be respectively brighter colors (not triple flats/sharps and higher allowed).

Clicking on the "durations" checkbox will show duration-weighted histograms of the pitches:

Screenshot 2024-01-16 at 12 38 06 AM

Problems with specific pitch range displays can be reported in this issue.

craigsapp commented 5 months ago

Pitch ranges for polishscores.org/?id=17xx:888 has a few problems:

Screenshot 2024-01-16 at 12 40 29 AM

The oboi and corni are empty, so their positions in the pitch range plots are also empty. Instead, remove empty slots in the prange range plot.

The instrumental names are overlapping. Probably switch to abbreviations when there is a certain threshold and/or estimate when there is overlapping.

craigsapp commented 5 months ago

Here are the pitch ranges for https://polishscores.org/?id=pl-wumfc--n28541--007-007

Screenshot 2024-01-16 at 12 46 43 AM

Perhaps the piano staves should be "Piano. RH" and "Piano. LH", where RH and LH are added automatically if the instrumation codes are *Ipiano and/or if the part is for keyboard *ICklav and *part# matches between two adjacent staves (for organ consider 3 adjacent staves possible for the foot pedals).

craigsapp commented 5 months ago

Here is a case with double flats:

https://polishscores.org/?id=pl-wtm--r-2030--001

Screenshot 2024-01-16 at 12 51 31 AM

(Es in the left hand).

Probably change the write order for the accidentals to avoid unwanted overlap of ledger lines: write double flat/sharp counts first, then single flat/sharp counts and finally natural counts.

craigsapp commented 5 months ago

When there are many instruments in the score, split the ranges onto two or more systems. Example:

https://polishscores.org/?id=pl-cz--iii-693--001-003

Screenshot 2024-01-16 at 12 55 08 AM

Even if instrumental abbreviations are used in this case, the histograms are too narrow to see much detail.

craigsapp commented 5 months ago

Particularly piano music does not give the name of the instrument in front of the first staff, so the labels will either be empty, or have some other text. Here is a strange case:

https://polishscores.org/?id=pl-wtm--1124-3622--001-004

Screenshot 2024-01-16 at 12 57 52 AM
craigsapp commented 5 months ago

Example with double sharps:

https://polishscores.org/?id=pl-wtm--1127-3625--001-003

Screenshot 2024-01-16 at 12 59 31 AM
craigsapp commented 5 months ago

Maybe add additional option to show final notes of voices such as for JRP:

Screenshot 2024-01-16 at 1 25 21 AM

https://josquin.stanford.edu/work/?id=Jos2721

Gray note are the final notes, and the "all" range show the three final C notes.

The prange tool needs enhancing to allow the final notes to be displayed correctly. Only the last sonority should be displayed, not the last note of the voice if it does not participate in the final sonority. Also the final note display will probably need to be enhanced to deal with chords.

craigsapp commented 5 months ago

Here is an example with some data considerations:

https://polishscores.org/?id=pl-kk--kk-i-382--031-001

Screenshot 2024-01-16 at 11 54 41 AM

Tenor II probably has an implicit octave transposition down. Tenor I and Soprano share a part and should be doubled (when creating MIDI rendering). That has not been addressed yet (will be similar to cello and contrabasses).

craigsapp commented 5 months ago

Accented characters get messed up:

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

Screenshot 2024-01-17 at 03 57 05

This could happen at several points...

Update: fixed in issue https://github.com/craigsapp/website-polish-scores/issues/240

craigsapp commented 5 months ago

For four or less histograms on the plot:

https://polishscores.org/?id=pl-wtm--1223-fp-3858--001-002

Screenshot 2024-01-18 at 11 37 49

In this case the histograms should be at least twice a wide are they currently are. Allow the maximum value in the plots to be longer since there is a lot of white space. And/or adjust the width of the histograms to be dependent on the number of plots (which is done somewhat for when there are too many histograms already, I think).