[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: Re: Harp lever changes
From: David Nalesnik <david.nalesnik () gmail ! com>
Date: 2012-01-29 15:22:28
Message-ID: CANn-nXnHqp=Fs5AqwQRN_y+kLdjQPMqFne-5=Hjt2z-LPbQY9g () mail ! gmail ! com
[Download RAW message or body]
Hi Helge,
> On 29 January 2012 09:44, Helge Kruse <Helge.Kruse-nospam@gmx.net> wrote:
> > Hello,
> >
> > I want to write a score for the lever harp. To indicate a pedal change
> you
> > can write the new pedal position as note names as described in NR "2.2.4
> > Harp". While the pedal changes the pitch of all octaves you have to set
> the
> > levers for each individual string. This is indicated within the staff.
> >
> > To indicate that this notes are not part of the melody, it is surrounded
> by
> > a rectangle and sometimes by a different head shape. This is a but
> > complicated since this rectangle should
> > - have it's own place (no notes or rest above or below it)
> > - ignored in any beat calculation, since it does not sound at all
> >
> > The attached examples show only one note per rectangle but are from a
> usual
> > score.
> >
> > Do you see a way to achieve this requirements with Lilypond?
>
One way to do it is to change the stencil of the note head to incorporate
the accidental, and then add the box to this.. (Unfortunately, adding the
box to a note which really has an accidental will displace it. I don't
know how to accommodate this -- so the "F#" in the box in the example I've
attached is really an F# and not an F.)
I believe that if you use 2.14.2, the horizontal spacing won't be adjusted
if you change the box size. I'm using a recent development version and
accommodation is made.
The last example you show could be approached in a similar way, by adding a
clef stencil to the note head stencil, along with the accidental as I've
done.
I've typeset the boxed note as a grace note from which I've removed the
stem.
You can change the size of the box by changing the number in the override
of NoteHead #'stencil.
I hope you find this helpful (at least for single notes in boxes)!
-David
\version "2.15.24"
#(define (boxed-note acc padding)
(lambda (grob)
(let ((note-stencil (ly:note-head::print grob))
(accidental
(cond ((string=? acc "sharp") (markup #:musicglyph
"accidentals.sharp"))
((string=? acc "flat") (markup #:musicglyph
"accidentals.flat"))
((string=? acc "natural") (markup #:musicglyph
"accidentals.natural")))))
(set! note-stencil
(ly:stencil-combine-at-edge
(grob-interpret-markup grob accidental)
X RIGHT
note-stencil 0.2))
(box-stencil note-stencil 0.1 padding))))
top = \relative c' {
\time 2/4
r16 f b f r e a e
}
bottom = \relative c {
\clef bass
<d b'>8 r <c c'> r
}
pedalChange = \relative c {
\override Stem #'stencil = ##f
\override NoteHead #'stencil = #(boxed-note "sharp" 0.5)
s4. \afterGrace s8 f4
}
\new PianoStaff <<
\new Staff {
\top
}
\new Staff <<
\new Voice {
\bottom
}
\new Voice {
\pedalChange
}
>>
>>
>
[Attachment #3 (text/html)]
Hi Helge,<br><br><div class="gmail_quote"><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div \
class="h5"><br> On 29 January 2012 09:44, Helge Kruse <<a \
href="mailto:Helge.Kruse-nospam@gmx.net">Helge.Kruse-nospam@gmx.net</a>> \
wrote:<br> > Hello,<br>
><br>
> I want to write a score for the lever harp. To indicate a pedal change you<br>
> can write the new pedal position as note names as described in NR \
"2.2.4<br> > Harp". While the pedal changes the pitch of all octaves you \
have to set the<br> > levers for each individual string. This is indicated within \
the staff.<br> ><br>
> To indicate that this notes are not part of the melody, it is surrounded by<br>
> a rectangle and sometimes by a different head shape. This is a but<br>
> complicated since this rectangle should<br>
> - have it's own place (no notes or rest above or below it)<br>
> - ignored in any beat calculation, since it does not sound at all<br>
><br>
> The attached examples show only one note per rectangle but are from a usual<br>
> score.<br>
><br>
> Do you see a way to achieve this requirements with \
Lilypond?<br></div></div></blockquote><div><br></div><div>One way to do it is to \
change the stencil of the note head to incorporate the accidental, and then add the \
box to this.. (Unfortunately, adding the box to a note which really has an \
accidental will displace it. I don't know how to accommodate this -- so the \
"F#" in the box in the example I've attached is really an F# and not an \
F.)</div> <div><br></div><div>I believe that if you use 2.14.2, the horizontal \
spacing won't be adjusted if you change the box size. I'm using a recent \
development version and accommodation is made.</div><div><br></div><div> The last \
example you show could be approached in a similar way, by adding a clef stencil to \
the note head stencil, along with the accidental as I've \
done.</div><div><br></div><div>I've typeset the boxed note as a grace note from \
which I've removed the stem.</div> <div><br></div><div>You can change the size of \
the box by changing the number in the override of NoteHead \
#'stencil.</div><div><br></div><div>I hope you find this helpful (at least for \
single notes in boxes)!</div><div> <br></div><div>-David</div><div><br></div><div> \
\version "2.15.24"</div><div><br></div><div>#(define (boxed-note acc \
padding)</div><div> (lambda (grob)</div><div> (let ((note-stencil \
(ly:note-head::print grob))</div> <div> (accidental</div><div> \
(cond ((string=? acc "sharp") (markup #:musicglyph \
"accidentals.sharp"))</div><div> ((string=? acc \
"flat") (markup #:musicglyph "accidentals.flat"))</div> <div> \
((string=? acc "natural") (markup #:musicglyph \
"accidentals.natural")))))</div><div><br></div><div> (set! \
note-stencil</div><div> (ly:stencil-combine-at-edge</div> <div> \
(grob-interpret-markup grob accidental)</div><div> X RIGHT</div><div> \
note-stencil 0.2))</div><div><br></div><div> (box-stencil note-stencil 0.1 \
padding))))</div><div><br></div> <div>top = \relative c' {</div><div> \time \
2/4</div><div> r16 f b f r e a e</div><div>}</div><div><br></div><div>bottom = \
\relative c {</div><div> \clef bass</div><div> <d b'>8 r <c c'> \
r</div> <div>}</div><div><br></div><div>pedalChange = \relative c {</div><div> \
\override Stem #'stencil = ##f</div><div> \override NoteHead #'stencil = \
#(boxed-note "sharp" 0.5)</div><div> s4. \afterGrace s8 f4</div> \
<div>}</div><div><br></div><div>\new PianoStaff <<</div><div> \new Staff \
{</div><div> \top</div><div> }</div><div> \new Staff <<</div><div> \new \
Voice {</div><div> \bottom</div><div> }</div><div> \new Voice {</div><div> \
\pedalChange</div><div> }</div><div> >></div><div>>></div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div><div class="h5"> </div></div></blockquote></div><font \
color="#888888"><br></font>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic