Menu

#5258 Vertical breve rest position in TabStaff/RhythmicStaff

Fixed
Enhancement
2018-12-25
2018-01-13
Malte Meyn
No

https://codereview.appspot.com/332640043

According to Gould breve rests should hang from a one line staff (RhythmicStaff) as semibreve rests do. Also, there is a comment in multi-measure-rest.cc saying

// Staff position is somewhat icky regarding its definition for
// compatibility reasons.  It is intended to be the baseline of
// a breve rest.  However, when the staff space is more than
// single space (like with tablature), it looks better if all
// rests are actually hanging.  So staff position, in reality,
// is the semi-breve position - 2.  Everything else is
// calculated from there.

This confirms what Gould writes. But the code applies only to MMRs with a measure-count > 1.

That leads to inconsistent behaviour: MultiMeasureRest breve glyphs hang, but not for single measures. Rest breve glyphs don’t hang. Instead, all breve rests should hang.

\version "2.19.80"

music = {
  \compressFullBarRests
  r1 R1 R\breve
  \time 4/2
  r\breve R\breve R\longa
  \time 8/2
  r\longa R\longa
}

\new TabStaff \with { \tabFullNotation } \music

\new RhythmicStaff \music

\new Staff \music
5 Attachments

Related

Issues: #3208

Discussion

  • Malte Meyn

    Malte Meyn - 2018-01-14
    • status: New --> Started
    • assigned_to: Malte Meyn
     
  • Malte Meyn

    Malte Meyn - 2018-01-14
    • Type: --> Enhancement
     
  • Malte Meyn

    Malte Meyn - 2018-01-15

    This comment by Benkő Pál asks whether breve/longa rests in TabStaff should go from line to line.

    Gould doesn’t mention tablature notation at all but she states (quoted from the german translation)

    Die doppelte Pause erstreckt sich über einen ganzen Zwischenraum und hat
    die gleiche oder (häufiger) die halbe Länge einer ganzen oder halben Pause

    which translates to

    The breve rest extends across a whole space and has the same or (more commonly) half the width of a whole or half rest.

    This would imply that we could not use the breve/longa/maxima rest glyphs from the font whenever staff-space is changed but would have to draw rectangles.

     
  • Malte Meyn

    Malte Meyn - 2018-01-16

    Here are some things I tried to make breve and longer rests hang both in RhythmicStaff (different line count) and in TabStaff (different staff-space):

    • translate up by (staff-space - 1) → works for TabStaff (staff-space = 1.5) and Staff (staff-space = 1, so no visible change) but fails for different fontsize
    • translate by (staff-space - fontsize) in brew_internal_stencil → dots are offset
    • translate by (staff-space - fontsize) in y_offset_callback → Staff_symbol_referencer::get_position gives non-integer values → computing whether ledgered breve should be chosen in TabStaff fails, breve dots are offset
    • change the font so that the glyphs hang from the base-line → not SMuFL compliant (according to this part of the specification only semibreve rests should hang), would need a change in all other fonts made for LilyPond

    And one thing I didn’t try:

    • don’t use glyphs from the font but draw rectangles and ledger lines with Lookup::round_filled_box or similar commands → fonts cannot specify width of the rests, widths would only come from Rest.style or another grob property.

    Are there other ideas how to use the glyphs from the font?

     

    Last edit: Malte Meyn 2018-01-16
  • Malte Meyn

    Malte Meyn - 2018-01-18

    Issue 5258: let long rests hang from staff lines

    This shifts the stencil by (staffspace - fontsize) so that the rests stay in the same space but are hang from the upper line instead of standing on the lower.

    For one line staves, rests are moved one space down so that they hang.

    Contains regtest.

    http://codereview.appspot.com/332640043

     
  • Malte Meyn

    Malte Meyn - 2018-01-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,5 @@
    +https://codereview.appspot.com/332640043
    +
     According to Gould breve rests should hang from a one line staff (RhythmicStaff) as semibreve rests do. Also, there is a comment in multi-measure-rest.cc saying
     ```
     // Staff position is somewhat icky regarding its definition for
    
    • Needs: -->
    • Type: --> Enhancement
     
  • Anonymous

    Anonymous - 2018-01-19
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2018-01-19

    Passes make, make check and a full make doc - reg test diff attached

     
  • Malte Meyn

    Malte Meyn - 2018-01-22
    • Patch: review --> needs_work
     
  • Malte Meyn

    Malte Meyn - 2018-01-22

    Now that [#3208] has been pushed this probably needs some changes before going back to review.

     

    Related

    Issues: #3208

  • Malte Meyn

    Malte Meyn - 2018-12-16

    changes needed after fix for 3208; minor corrections to regtests

    http://codereview.appspot.com/332640043

     
  • Anonymous

    Anonymous - 2018-12-17
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -1,2 +1,5 @@
    +Regtest1.png (16.1 kB; image/png)
    +Regtest2.png (187.3 kB; image/png)
     breve_rests.png (26.0 kB; image/png)
     gould_breve_rests_oneline.png (27.9 kB; image/png)
    +regtest3.png (570.0 kB; image/png)
    
    • Needs: -->
    • Type: -->
     
  • Anonymous

    Anonymous - 2018-12-17

    Passes mke, make check and a full make doc. Three Reg test diffs - attached.

     
  • Anonymous

    Anonymous - 2018-12-17
    • Patch: new --> review
    • Type: --> Enhancement
     
  • Anonymous

    Anonymous - 2018-12-21
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2018-12-21

    Patch on countdown for Dec 24th

     
  • Anonymous

    Anonymous - 2018-12-24
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2018-12-24

    Patch counted down - please push.

     
  • Malte Meyn

    Malte Meyn - 2018-12-25
    • labels: --> Fixed_2_21_0
    • status: Started --> Fixed
    • Patch: push -->
     
  • Malte Meyn

    Malte Meyn - 2018-12-25

    commit 72b888fe1561099fbcfe4cb9b660397c450e6966
    Author: Malte Meyn lilypond@maltemeyn.de
    Date: Thu Jan 18 22:19:44 2018 +0100

    Issue 5258/3: add regtest
    

    commit f3fe37f7cdb3e6ecc932a76a19558b159910273d
    Author: Malte Meyn lilypond@maltemeyn.de
    Date: Mon Jan 22 22:41:58 2018 +0100

    Issue 5258/2: adapt MultiMeasureRests
    

    commit ca20f8afbdaf92361ed3bde81b5e1f6e3b4e080b
    Author: Malte Meyn lilypond@maltemeyn.de
    Date: Thu Jan 18 20:16:22 2018 +0100

    Issue 5258/1: let long rests hang from staff lines