Jump to content

Ottava text on the right: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m New category
Tags: Mobile edit Mobile web edit
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
In some cases, ottava text should be on the right for a clearer reading.
In some cases, ottava text should be on the right for a clearer reading.


<lilypond version="2.24.0">
<lilypond version="2.24">
%% => http://lsr.di.unimi.it/LSR/Item?u=1&id=1074
%% => http://lsr.di.unimi.it/LSR/Item?u=1&id=1074
%% Credits PPS on Nov. 2018
%% Credits PPS on Nov. 2018
Line 32: Line 32:
[[Category:Editorial annotations]]
[[Category:Editorial annotations]]
[[Category:Staff notation]]
[[Category:Staff notation]]
[[Category:Snippet]]

Latest revision as of 23:37, 21 November 2025

In some cases, ottava text should be on the right for a clearer reading.

\version "2.24"

%% => http://lsr.di.unimi.it/LSR/Item?u=1&id=1074
%% Credits PPS on Nov. 2018

\relative c'' {
  \override Staff.OttavaBracket.stencil = #ly:line-spanner::print
  \override Staff.OttavaBracket.bound-details =
    #`((right . ((text . ,#{ \markup " 8va" #})
                 (Y . 0)
                 (attach-dir . ,RIGHT)
                 (padding . 3.5)
                 (stencil-align-dir-y . ,CENTER)))
       (left . ((Y . 0)
                (padding . 0)
                (attach-dir . ,LEFT)
                (text . ,(make-draw-line-markup (cons 0 -1.2))))))

  \override Staff.OttavaBracket.left-bound-info =
     #ly:horizontal-line-spanner::calc-left-bound-info-and-text
  \override Staff.OttavaBracket.right-bound-info =
     #ly:horizontal-line-spanner::calc-right-bound-info
  \ottava #1
  \once\hide
  c1 \glissando
  c''1
}