Hi Helge,
> On 29 January 2012 09:44, Helge Kruse <[email protected]> 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 } >> >> >
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
