gymnoの自由談

音楽系、プログラミング系の内容 方針はいずれ

lilypondサンプル (3) 応用的な記述

lilypondサンプル (1) ページ設定 - gymnoの自由談
lilypondサンプル (2) 基本の記述 - gymnoの自由談

休符

LilyPond 記譜法リファレンス: 1.2.2 休符を記述する
http://lilypond.org/doc/v2.16/Documentation/notation/writing-rests

  a4 r cis2 | e4.  fis8 r8 gis r a| a4 r2. | R1 |
 d4  cis8 b a4 a8 b |R1 * 3 |cis4 r2. |
  \time 3/4  a2 fis4 | r2. | R1 * 3 | R2. * 3     |               


最後の2組の休符に注意 全休符3つは4分音符12個なので3/4拍子だと4小節になる 大文字Rは小節単位の休符(full bar rest)だけど 小文字rの休符同様きちんと長さを測定される

アーティキュレーションと装飾、スタッカート

LilyPond 記譜法リファレンス: 1.3.1 音符に付けられる発想記号
http://lilypond.org/doc/v2.16/Documentation/notation/expressive-marks-attached-to-notes

  a4\marcato b\tenuto cis2\staccatissimo | e4.--  fis8-. gis4-|
 a->| a-^ g-_  f\mordent e\turn |
 d\fermata  cis8 b a4 a8 b |cis4         


正式にmarcatoなどの名前を書くだけでなく簡易記法がある

小節線、練習番号(リハーサル記号)

LilyPond 記譜法リファレンス: 1.2.5 小節
http://www.lilypond.org/doc/v2.16/Documentation/notation/bars
そのほか小節番号などの説明もある なお小節ごとに書いているパイプ記号|は出力結果の譜面には関係なくて間違っていたらwarningが出る単なるチェックである

  a4 b cis2 |\mark \default e4.  fis8 gis4 a\bar "."| a g  f e |\mark \default                 
  \set Score.markFormatter = #format-mark-box-alphabet                                         
  d  cis8 b a4 a8 b |\bar "||"cis4 b a2 |\mark #6                                              
  \set Score.markFormatter = #format-mark-circle-letters                                       
  a4 b cis2 |\bar "dashed" e4.  fis8 gis4 a|\mark \default a g  f e |                          
  \set Score.markFormatter = #format-mark-numbers                                              
  \mark #2 \bar ":|" d  cis8 b a4 a8 b |cis4 b a2 |                                            
  \set Score.markFormatter = #format-mark-letters                                              
  \mark \default     


サンプルがなんか長くなってしまったが 普通は練習番号は最初に一度指定するだけなのでこうはならない

3連符の刻み

これが大変だった 上の方で

repthree= #(define-music-function (parser location p) (ly:pitch?)                              
 "test"                                                                                       
  #{ \times 2/3 { \repeat tremolo 3 $p } #}) 

という関数を定義する

  a16 a a a b4:16 cis2:32^"tremolo" |e4.  fis8 gis4 { \repeat tremolo 4 a16}|                  
  a4 g  {\times 2/3  {\repeat tremolo 3 f8}} {\times 2/3 {\repeat tremolo 3 e8}}|              
  {\times 4/6 {\repeat tremolo 6 d8}}  {\times 2/3 \repeat tremolo 3 cis8} \repthree b |       
  \repthree cis \repthree a b4 cis  

通常の連符はa:16などで 4分音符の3連符は{\times 2/3 {\repeat tremolo 3 f8}} つまり8分音符3つで合計付点4分だけど全体の音価として2/3つまり4分音符に収める という無理矢理な方法 といってすべての音符ごとにこれをやっているとしんどいので上記の関数で対処する というやり方 これでもかなり大義なので楽なやり方が欲しい あと関数をもっと柔軟にしたい 8分音符の3連符による2分音符とかなんとかならないだろうか 最悪でもカリー化とか使えば行けるような気もする

前打音 グリッサンド アウフタクト

GNU LilyPond 学習マニュアル: 2.1.7 高度なリズム コマンド
http://www.lilypond.org/doc/v2.16/Documentation/learning/advanced-rhythmic-commands
LilyPond 記譜法リファレンス: 1.2.6 特殊なリズム関連事項
http://lilypond.org/doc/v2.17/Documentation/notation/special-rhythmic-concerns.ja.html
アウフタクトはドイツ語Auftaktであって英語ではanacrusisとかpickupとかupbeatというらしい
http://www.lilypond.org/doc/v2.16/Documentation/music-glossary/anacrusis

acciaccatura - an unmeasured grace note indicated by a slurred small note with a slashed stem
(長さを持たない装飾小音符で、スラッシュ付きの符幹を持つスラーでつなげられる小さな音符)
appoggiatura - which takes a fixed fraction of the main note and appears in small print without a slash
(一定の比率で主音符から演奏時間をとり、スラッシュを持たない小さな音符で譜刻されます)

http://lilypond.org/doc/v2.16/Documentation/notation/special-rhythmic-concerns.html
  \partial 4 e,4| \acciaccatura gis8 a4 b \appoggiatura d16 cis2 |                             
  \grace cis16 e4.  fis8 gis4 \grace { a16[ gis]} a4|                                          
  \grace d16 \glissando a8 d, g4 \afterGrace f {e16 [ f]} e4 |                                 
  d  cis8 b \afterGrace a4 {d16 [ cis b]} a8 b |cis4\< \glissando a'\!