【问题标题】:stretch octava mark to end of measure将八度标记拉伸到测量结束
【发布时间】:2020-06-03 09:03:04
【问题描述】:

当一个音符有一个八度标记时,标记的结尾在音符的末尾。对于长音符,视觉效果并不令人满意。我想在小节结束时结束八度标记。

这个例子说明了我的意思:

\score {
    \new PianoStaff
    <<  
        \new Staff {
            \relative c'' {
                \clef treble \time 3/4
                a4 b c | d8 c b4 a | g2.
            }
        }
        \new Staff {
            \relative c {
                \clef bass \time 3/4
                a2.
                \ottava #2
                \set Staff.ottavation = #"15"
                b''2.
                \ottava #0
                c,,2.
            }
        }
    >>
}

这是结果

我宁愿有这个

为了实现这个结果,我添加了一个带有隐藏音符的额外声音,呈现了想要的结果。隐藏的声音将八度标记的结尾强制到第三个音符的结尾。我的问题是:有没有更好/更简单的方法来获得相同的结果?

这是带有“隐藏声音”的版本

\score {
    \new PianoStaff
    <<  
        \new Staff {
            \relative c'' {
                \clef treble \time 3/4
                a4 b c | d8 c b4 a | g2.
            }
        }
        \new Staff {
            \relative c {
                \clef bass \time 3/4
                a2.
                \ottava #2
                \set Staff.ottavation = #"15"
                <<
                \new Voice { \voiceOne b''2. }
                \new Voice { \voiceTwo  \hideNotes a4 b c  \unHideNotes }
                >>
                \ottava #0
                c,,2.
            }
        }
    >>
}

【问题讨论】:

    标签: lilypond


    【解决方案1】:

    没有简单/好的方法可以做到这一点。见OttavaBracket right endpoint?
    我从那里得到的代码是:

    \once \override Staff.OttavaBracket.shorten-pair = #'(-1 . -9.5)
    

    对中的哪里影响括号的起点和终点。

     \score {
        \new PianoStaff
        <<  
            \new Staff {
                \relative c'' {
                    \clef treble \time 3/4
                    a4 b c | d8 c b4 a | g2.
                }
            }
            \new Staff {
                \relative c {
                    \clef bass \time 3/4
                    a2.
                    \ottava #2
                    \set Staff.ottavation = #"15"
                    \once \override Staff.OttavaBracket.shorten-pair = #'(-1 . -9.5)
                    b''2.
                    \ottava #0
                    c,,2.
                }
            }
        >>
    }
    

    更新:
    我认为修改隐藏笔记的原始答案对我来说似乎是最好的答案。
    将 b 作为值的 1/3 并隐藏和取消隐藏注释有效:
    b''2.*1/3 \hideNotes b b \unHideNotes.
    比:
    \once \override Staff.OttavaBracket.shorten-pair = #'(-1 . -9.5) 更短的代码,以及我们都想要的自动行为。

    \score {
        \new PianoStaff
        <<  
            \new Staff {
                \relative c'' {
                    \clef treble \time 3/4
                    a4 b c | d8 c b4 a | g2.
                }
            }
            \new Staff {
                \relative c {
                    \clef bass \time 3/4
                    a2.
                    \ottava #2
                    \set Staff.ottavation = #"15"
                    b''2.*1/3 \hideNotes b b \unHideNotes % works
                    % b''2.*1/3 s s % doesn't work
                    \ottava #0
                    c,,2.
                }
            }
        >>
    }
    

    【讨论】:

    • 也许并不容易和好听,但它总是比额外的声音更容易和好听。缩短对包含两个数字,以在八度括号的左侧和右侧添加额外的空间。不太好的事情是额外的空间是相对于括号所在的音符,所以如果小节的长度发生变化,第二个数字必须相应地调整。但无论如何,这是一个进步!谢谢。
    • 嗨 Owain,我不知道这个 * 运算符 (?)。我将查看文档以了解它的作用。感谢您将此添加到我的工具箱中。
    • 这只是b2. * 1/3 'this note' 'times by' 'a fraction'。它超级方便,您可以将多个声音放在一条线上。请参阅文档Scaling durations
    • 啊,我明白了。这种方法的缺点在于对midi输出的影响。我想我宁愿坚持你的第一个建议。但感谢您提请注意。
    猜你喜欢
    • 1970-01-01
    • 2018-05-26
    • 2012-02-04
    • 2011-04-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-13
    • 1970-01-01
    相关资源
    最近更新 更多