You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Lilypond中如何为中途的pickup measure添加带括号的小节编号

关于LilyPond中途不完全小节的小节编号优化需求

我正在创作一首包含中途不完全小节(pickup measure)的乐谱,小节编号对我至关重要。要求不完全小节不计入小节计数,从第一个完整小节开始正常计数。

我偏好开头的不完全小节用(1)标注的形式,以此表明它是第1小节的前置不完全小节;希望第二行的不完全小节也能自动显示为(5),代表它是第5小节的前置不完全小节。

目前我通过手动添加\set Score.currentBarNumber = 5,让第二行第一个完整小节正确显示为第5小节,但想寻求更优方案——既能让不完全小节不占用计数序号,又能自动为这类小节生成带括号的编号标注,无需手动调整。

当前使用的LilyPond代码

example = {
  \override  Score.BarNumber.break-visibility = ##(#t #t #t)
  \set Score.barNumberVisibility = #all-bar-numbers-visible
  \override  Score.BarNumber.break-visibility = #end-of-line-invisible
  \time 2/4
  \partial 8 e8 |
  a2 | b2 | c2 | \partial 8*3 d4. \bar "||" 
  \break
  \partial 8 e8 |
  \set Score.currentBarNumber = 5
  a2 | c2 | b2 | a2 \bar "|."
}


\book{
    \bookOutputName "mwe"   
  \score {
    \new Staff <<
        \new Voice {
          \example
        }    
    >>
  }
}

当前效果说明

开头的不完全小节已自动标注(1),第二行的不完全小节未显示(5)标注,第二行第一个完整小节通过手动设置currentBarNumber显示为第5小节。

内容的提问来源于stack exchange,提问作者yodofizzy

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.15 19:27:08