雑感等

音楽,数学,語学,その他に関するメモを記す.

lilypondコンパイルエラーの対処 error: syntax error, unexpected SCM_TOKEN, expecting '='

コンパイルエラーの修正

lilypondファイルをコンパイルすると、以下のエラーメッセージが出力。

././01-byrd-a3-0-score.ly:36:62: error: syntax error, unexpected SCM_TOKEN, expecting '='
                \override StaffGrouper #'staff-staff-spacing
                                                             #'padding = #4.5

"01-byrd-a3-0-score.ly"中の以下の文を書き換えた。

\override StaffGrouper #'staff-staff-spacing #'padding = #4.5

\override StaffGrouper.staff-staff-spacing.padding = #4.5


詳細

コンパイルしたいlilypondファイル:

Mass for 3 Voices (Byrd, William) - IMSLP: Free Sheet Music PDF Download

このページにあるEngraving files (Lilypond)

編集者    Allen Garvin
出版社情報 Dallas: Hawthorne Early Music, 2016.
著作権   
Creative Commons Attribution-NonCommercial 4.0

コンパイルエラー:

ダウンロードしたzipを展開し.\single-parts\01-byrd-a3-0-score.lyコンパイルしたが、下記のエラーメッセージ。

GNU LilyPond 2.20.0
Processing `./01-byrd-a3-0-score.ly'
Parsing...
././01-byrd-a3-0-score.ly:36:62: error: syntax error, unexpected SCM_TOKEN, expecting '='
                \override StaffGrouper #'staff-staff-spacing
                                                             #'padding = #4.5
././01-byrd-a3-0-score.ly:36:62: warning: Ignoring non-music expression
                \override StaffGrouper #'staff-staff-spacing
                                                             #'padding = #4.5
././01-byrd-a3-0-score.ly:36:74: warning: Ignoring non-music expression
                \override StaffGrouper #'staff-staff-spacing #'padding =
                                                                         #4.5

・修正方法の検討:

lilypond公式ドキュメント LilyPond 記譜法リファレンス: 5.3.7 連想配列を変更する のコード例では、

\override StaffGrouper.staff-staff-spacing.basic-distance = #7

のように書いてあり、StaffGrouperstaff-staff-spacing連想配列のキーbasic-distanceの間がピリオドで繋がれている。

・対処:

そのため、\override StaffGrouper #'staff-staff-spacing #'paddingテキストエディタ\override StaffGrouper.staff-staff-spacing.paddingに置換。

置換したファイルをコンパイルすると、コンパイルエラーは出ず、imslpにあるpdfと同様のファイルが生成される。

楽譜を見ながらMass for 3 Voicesを聞こうとしたら調があっておらず、楽譜を移調しようとした。

imslpにlilypondのファイルがあり、ソースを修正して手元でコンパイルしようとしたところ上記エラーが発生。