sul-cidr / josquin-ribbon

http://ribbon.stanford.edu/
BSD 3-Clause "New" or "Revised" License
12 stars 0 forks source link

Center Rhythmic Activity ribbon when no notes are shown; increase amplitude #217

Closed broadwell closed 5 years ago

broadwell commented 5 years ago

There's no issue for the primary change in this PR (moving the Rhythmic Activity ribbon to the center of the staff for each voice when Show Notes is not selected), but it also attempts to address #196 (increase amplitude of ribbons) and also supersedes #194 (move separated voices closer together vertically), by introducing a new per-voice layout regime in which the staff domain of each voice is centered around middle C and expanded to encompass the highest and lowest note of any voice. This doesn't necessarily make the separated voices layout less vertically sparse, but it does make them less skewed, and allows the Rhythmic Activity ribbon to have a larger amplitude when centered on middle C.

simonwiles commented 5 years ago

The first thing I noticed with this PR is that the ribbons can get clipped (these are from id=Ano3034): image

(it's worse with notes on:) image

image

I'm not sure if this is only an issue with the aggregate voice -- I haven't found an example with other voices yet, but I've only looked at a few so far. Just wanted to flag this ASAP.

broadwell commented 5 years ago

The primary cause of the "ribbon clipping" issue is that the viewbox of each voice is determined by the highest and lowest notes, rather than by the largest possible amplitude of its ribbon. So it's possible, though quite unlikely, that a non-aggregate voice could exhibit clipping. In any case, we probably can wait to address this until we get more feedback about the voice layout updates.

Note also the new commit to address the problem of the ribbons reappearing when the main window is re-rendered.