簡體   English   中英

Lilypond - 不能使用變量作為 \addlyrics 的一部分

[英]Lilypond - cannot use variables as part of \addlyrics

出於某種原因,這有效:

\addlyrics {Drei -- del, drei -- del, drei -- del, I made it out of clay
    When it's dry and rea -- dy, o drei -- del I shall play}

這不會:

thing = {Drei -- del, drei -- del, drei -- del, I made it out of clay
    When it's dry and rea -- dy, o drei -- del I shall play}
\addlyrics {\thing}

我嘗試將 \addlyrics 放入變量中,添加和刪除 {},以及我能想到的所有其他內容。 文檔沒有具體解決這種情況,但我在所有地方都使用變量,除了這里之外,幾乎沒有問題。 想法?

嘗試:

thing = \addLyrics {Drei -- del, drei -- del, drei -- del, I made it out of clay
    When it's dry and rea -- dy, o drei -- del I shall play}
\thing

實際試過之后,還是不行! LilyPond 不知道\score塊之外的addlyrics是什么。 所以讓我們試試這個:

\version "2.19.83"

theLyrics = \lyricmode { 
  Drei -- del, drei -- del, drei -- del, I made it out of clay
  When it's dry and rea -- dy, o drei -- del I shall play
}

melody = \relative {
  g'8 e g e g e r e |
  g8 g f e d4 r |
  f8 d f d f d r d |
  g8 f e d c4 r |
}

\score {
  \new Staff \melody 
  \addlyrics \theLyrics
  \layout {}
  \midi {}
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM