Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What is going on with this article?
@manontroppo1974

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

More than 1 year has passed since last update.

概要

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 |
}

まとめ

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

0
Help us understand the problem. What is going on with this article?
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.
Sign Up
If you already have a Qiita account Login
0
Help us understand the problem. What is going on with this article?