[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cross-staff "synchronized" grace-note figure
From: |
Neil Puttock |
Subject: |
Re: cross-staff "synchronized" grace-note figure |
Date: |
Sat, 15 Mar 2008 02:11:04 +0000 |
Hi Eric,
On Sat, Mar 1, 2008 at 5:08 AM, Eric Flesher <address@hidden> wrote:
> Is it possible in a piano (grand-staff) score to create a grace-note figures
> such that:
> 1. the figure consists of 4 notes in the bass staff (beamed as small 8th
> notes)
> 2. the second note of the figure synchronizes with the same pitch on beat 1
> of
> the treble staff.
> 3. this second note is cross-staff beamed to the note in the treble staff
It's certainly possible, but there's no easy solution using LilyPond's
built-in grace note support (which is pretty inflexible and awkward
when it comes to spacing).
Here's a snippet using fake grace notes which might be one way of
solving this problem:
\version "2.11.42"
\paper { ragged-right = ##t }
rh = \change Staff = upper
lh = \change Staff = lower
%This macro fakes grace notes from normal notes using the default
grace note settings in engraver-init.ly
graceNotes = #(define-music-function (parser location music) (ly:music?)
#{
\override Stem #'direction = #UP
\override Stem #'font-size = #-3
\override NoteHead #'font-size = #-3
\override Dots #'font-size = #-3
\override Stem #'length-fraction = #0.8
\override Stem #'no-stem-extend = ##t
\override Beam #'thickness = #0.384
\override Beam #'length-fraction = #0.8
\override Accidental #'font-size = #-4
\override Slur #'direction = #DOWN
$music
\revert Stem #'direction
\revert Stem #'font-size
\revert NoteHead #'font-size
\revert Dots #'font-size
\revert Stem #'length-fraction
\revert Stem #'no-stem-extend
\revert Beam #'thickness
\revert Beam #'length-fraction
\revert Accidental #'font-size
\revert Slur #'direction
#})
upper = {
\time 3/8
%a skip for the first grace note in the bass, followed by the main
note with a scaled duration
s16 dis'4.*5/6 |
}
lower = {
\clef bass
%the arabesque faked using the macro and scaled durations
\graceNotes {
\voiceTwo d,,8*1/2 \rh
%hide the small accidental for the merged note
\once \override Accidental #'stencil = ##f dis' \lh cis, fis g
} s
}
\score {
\new PianoStaff <<
\context Staff = upper { \upper }
\context Staff = lower { \lower }
>>
\layout {
\context { \Score
\override NoteCollision #'merge-differently-dotted = ##t
}
}
}
Regards,
Neil
arabesque.PNG
Description: PNG image