0

我的代码可以编译,但有错误;它说:

warning: cannot find Voice `chorus'
chorusLyrics = \new Lyrics 
                           \lyricsto "chorus" {

因此,我将整个代码最小化为:

\version "2.19.44"
\language "english"

\header {
    title = "debug"
}

signature = {
    \time 4/4  
    \key c \minor
    \autoBeamOff
}

chorus = \new Voice = "chorus" \relative c'' {
    \signature
    << { g f e f } \\ {e b e c } >> 
}

chorusLyrics = \new Lyrics \lyricsto "chorus" {
  This is de- bug
}

\score {
        <<
      \new Staff {  \chorus }
      \chorusLyrics
        >>
}

lilypond 版本是正确的。

输出不显示歌词;我花了几个小时试图弄清楚这一点。文档说您可以通过这种方式使用多种声音。我究竟做错了什么?

以下是 Learning.pdf 文档的引述:

Here’s how we split the chords above into two voices and add both the
passing note and a slur: \key g \major % Voice "1" Voice "2" << { g4
fis8( g) a4 g } \\ { d4 d d d } >>

但是,如果我删除\\大括号之间的 from ,则所有内容都可以编译而没有任何问题 - 完全没有错误。

4

1 回答 1

0

您的示例中有两个问题。首先,您试图将歌词与复调段落联系起来,据我所知,这是不可能的。其次,结构不正确,请参见下面的示例,它编译得很好。

\version "2.19.44"
\language "english"

\header {
  title = "debug"
}

signature = {
  \time 4/4
  \key c \minor
  \autoBeamOff
}

upper = \relative c'' {
  \signature
  g4 f e f
}

lower = \relative c' {
  \signature
  e4 b e c
}


chorusLyrics = \lyricmode {
  This is de- bug
}

\score {
  <<
    \new Staff <<
    \new Voice = "chorus" { \voiceOne \upper }
    \new Voice { \voiceTwo \lower }
    >>
  \new Lyrics \lyricsto "chorus" { \chorusLyrics }
  >>
}
于 2018-03-01T07:37:44.777 回答