Skip to content

Instantly share code, notes, and snippets.

@msikma
Created June 8, 2016 20:47
Show Gist options
  • Save msikma/1c633aaf577cf2d7403a161dcdbdddb6 to your computer and use it in GitHub Desktop.
Save msikma/1c633aaf577cf2d7403a161dcdbdddb6 to your computer and use it in GitHub Desktop.
\version "2.18.2"
\language "english"
section-one = {
\key c \major
\time 6/16
}
implicitTuplets = \override TupletNumber.stencil = ##f
explicitTuplets = \revert TupletNumber.stencil
% I want to have a nicely aligned "pp" followed by "sempre legato".
% (Not really but this is an example, I use various variations of this.)
% This was pieced together from stuff I found online, but it
% causes a huge gap to the next note. How do I avoid that?
sempreLegato =
\tweak DynamicText.self-alignment-X #LEFT
\tweak DynamicText.X-offset #0
#(make-dynamic-script
(markup #:dynamic "pp"
#:normal-text (#:italic "sempre legato")))
\bookpart {
\header {
copyright = ##f
tagline = ##f
}
\score {
\new PianoStaff <<
%---------------------------------------------------------------------
% Right hand
%---------------------------------------------------------------------
\new Staff = "right" \with {
midiInstrument = "acoustic grand"
} {
\clef treble \relative c'' {
\section-one
<<
\new Voice {
\voiceOne
\implicitTuplets
\relative c'' {
\tuplet 3/2 { c16-[ b32 d16 c32] }
\tuplet 3/2 { c16-[ \sempreLegato as32 c!16 b32] } b8
}
}
\new Voice {
\voiceTwo
\implicitTuplets
\relative c' {
\tuplet 3/2 { e16-[ d32 f16 e32] }
\tuplet 3/2 { e16-[ cs32 e16 d32] }
}
}
>>
}
}
%---------------------------------------------------------------------
% Left hand
%---------------------------------------------------------------------
\new Staff = "left" \with {
midiInstrument = "acoustic grand"
} {
\clef bass \relative c' {
\section-one
\implicitTuplets
g8\noBeam g,8 \tuplet 3/2 { f16-[ e32 g16 f32] }
}
}
>>
\layout {
\context {
\Score
\override SpacingSpanner.common-shortest-duration = #(ly:make-moment 1/8)
\consists #Span_stem_engraver
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment