[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tremolos between two whole notes
From: |
Thomas Morley |
Subject: |
Re: Tremolos between two whole notes |
Date: |
Wed, 8 Feb 2012 00:58:25 +0100 |
Hi Brent,
> On 4 February 2012 16:42, Neil Thornock <address@hidden> wrote:
>>
>> As far as getting the look you want, you need to use a combination of
>> Beam #'gap, Beam #'positions, Beam #'extra-offset, and NoteHead
>> #'stem-attachment. I've gotten very nice results with those
>> overrides. It's a pain, but it's worth avoiding the horrible default.
based on Neil's suggestion I worked out the function above. You have
to figure out the values manually. :(
Please note: If you use "2.14.2" it will sometimes produce a warning,
which I didn't manage to avoid or to suppress: "weird stem size, check
for narrow beams" (p.e. with the cross-staff-example of the test), and
you have to use other values.
With "2.15.24" it compiles clean.
\version "2.15.24"
\paper { line-width = 120 }
tweakWholeNoteTremolo =
#(define-music-function (parser location y¹off-y²off)(pair?)
#{
\once \override Beam #'gap = #1.3
\once \override Beam #'extra-offset = #(cons 0 (car y¹off-y²off))
\once \override Beam #'stencil =
#(lambda (grob)
(let* ((pos (ly:grob-property grob 'positions)))
(ly:grob-set-property! grob 'positions
(cons (car pos) (+ (cdr pos) (cdr y¹off-y²off))))
(ly:beam::print grob)))
#})
%--- test
\score {
\relative c'' {
\tweakWholeNoteTremolo #'(-3 . 1.9)
\repeat tremolo 16 { gis32 d' }
%\break
\tweakWholeNoteTremolo #'(-3.6 . 1.7)
\repeat tremolo 32 { <e, gis b>64 d' }
\tweakWholeNoteTremolo #'(4.4 . -3.5)
\repeat tremolo 16 { a'32 a, }
}
}
\new PianoStaff <<
\new Staff = "right" {
\repeat tremolo 16 {
\tweakWholeNoteTremolo #'(11.2 . -19)
e'''32
\change Staff = "left"
a,,
}
}
\new Staff = "left" {
\clef bass
s1
}
>>
HTH,
Harm
tremolo-test-01.png
Description: PNG image