[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: string harmonics with cue notes
From: |
Klaus Blum |
Subject: |
Re: string harmonics with cue notes |
Date: |
Fri, 14 Aug 2015 10:02:28 -0700 (MST) |
Hi Orm,
not a complete solution, but maybe a start for further ideas...
You could define a variable to sum up all the formatting commands:
% -------------------------------------------------------------
\version "2.19.5"
cueNote = {
\override ParenthesesItem.padding = #0.2
\override ParenthesesItem.font-size = #1
\once \override Stem.transparent = ##t
\once \override NoteHead.font-size = #-3
\once \override NoteHead.X-offset = #0.5
}
{
<<
{a'1 \harmonic ^"sul D"} \\ {\cueNote \parenthesize a''4}
>>
}
% -------------------------------------------------------------
I've also experimented with avoiding the creation of a second voice:
However, there are two drawbacks:
1. Tweaking the notehead requires another function.
2. As both notes "live" in the same chord, you'll get a stem for other than
whole notes.
In both cases, I don't know how to avoid that. Maybe someone else could
chime in here? ;-)
Anyway, here we go:
% -------------------------------------------------------------
\version "2.19.5"
#(define ((note-head-musicglyph name) grob)
(grob-interpret-markup grob (make-musicglyph-markup name)))
{
\once \override ParenthesesItem.padding = #0.3
\once \override ParenthesesItem.font-size = #-1
< a' \harmonic
\parenthesize
\tweak font-size #-3
\tweak #'stencil #(note-head-musicglyph "noteheads.s2")
%\tweak X-offset #0.5
a''
>1 ^\markup { "sul D" }
}
% -------------------------------------------------------------
Okay, this looks even worse, but again, you can abbreviate the formatting
stuff:
% -------------------------------------------------------------
\version "2.19.5"
#(define ((note-head-musicglyph name) grob)
(grob-interpret-markup grob (make-musicglyph-markup name)))
cueNote = #(define-music-function (parser location cue) (ly:pitch?)
#{
\parenthesize
\tweak font-size #-3
\tweak Accidental.font-size #-3
\tweak stencil #(note-head-musicglyph "noteheads.s2")
%\tweak X-offset #0.5
$cue
#})
{
\override ParenthesesItem.padding = #0.3
\override ParenthesesItem.font-size = #-1
< a' \harmonic \cueNote a'' >1 ^"sul D"
< g' \harmonic \cueNote d''' >
< fis' \harmonic \cueNote fis''' >
}
% -------------------------------------------------------------
In any case, you could replace \parenthesize by \parentheAll from
http://lsr.di.unimi.it/LSR/Item?id=972
Cheers,
Klaus
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/string-harmonics-with-cue-notes-tp179610p179616.html
Sent from the User mailing list archive at Nabble.com.