Help us understand the problem. What is going on with this article?

Lilypondでスイングの「8分音符=3連符」ってやつを書きたい

概要

Lilypond で楽譜を作ってて困った点。swingとかの楽譜の最初に書いてあるこの記号の出し方が分からなかったんですよね。
20200218-01.png
簡単に出すことはできなさそうだったので強引に作ってみました。

ソース

色々調べて書いたり削ったり、、
もうよく分からなくなってしまいました。不要な部分とかあるかもしれませんがこれでできているのでいいことにします。
swing = から括弧が終わるまでをコピペして、楽譜の最初に \swing って書くと使えるのではないかと思います。

swing.ly
\version "2.18.2"

swing = \mark \markup { 
  \line \general-align #Y #DOWN {
    \score { 
      \new Staff \with {
        fontSize = #-2
        \override StaffSymbol.line-count = #0 
        \override VerticalAxisGroup.Y-extent = #'(0 . 0)
      }
      \relative { 
        \stemUp 
        \override Score.SpacingSpanner.common-shortest-duration = #(ly:make-moment 3 16) 
        \override Beam.positions = #'(2 . 2)
        b'8[ b8] 
      }
      \layout {
        ragged-right= ##t
        indent = 0
        \context { 
          \Staff \remove "Clef_engraver" 
          \remove "Time_signature_engraver" 
        }
      }
    }
    " ="
    \score {
      \new Staff \with {
        fontSize = #-2
        \override StaffSymbol.line-count = #0 
        \override VerticalAxisGroup.Y-extent = #'(0 . 0)
      }
      \relative { 
        \stemUp 
        \override Score.SpacingSpanner.common-shortest-duration = #(ly:make-moment 3 16)
        \override Stem.length = #4.5
        \tuplet 3/2 { b'4 b8 } 
      }
      \layout {
        ragged-right= ##t
        indent = 0
        \context { 
          \Staff 
          \remove "Clef_engraver" 
          \remove "Time_signature_engraver" 
        }
      }
    }
  }
}

\relative c' {
  \clef treble
  \key c \major
  \time 4/4
  \override Score.RehearsalMark.X-offset = #0
  \swing

  c4 d e f | g a b c |
}

まとめ

もっといい方法を知ってる方がいらっしゃいましたら教えてください。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした