[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ...and thy Staff, they comfort me
From: |
Mats Bengtsson |
Subject: |
Re: ...and thy Staff, they comfort me |
Date: |
Wed, 10 Dec 2003 11:30:49 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 |
A number of different features were involved here, I'll try to describe
them one by one:
- The new context type Dynamics defined in the file was only allowed to
be included in PianoStaff contexts. If you add an \accepts statement
also in the definition of the Score context, LilyPond will allow also
the two Dynamics contexts outside the PianoStaff to be handled
correctly. (Don't ask me why they still appeared but in the wrong
order). This should solve the ordering problem.
- Your \global contains objects that have a duration (the s8*6*10),
which means that they have to appear within some kind of context.
If no such context already exists, LilyPond will create one for you.
If you comment out the line with \RemoveEmptyStaffContext in your
original example, you will see that LilyPond creates an extra Staff
context to be able to host your \global definition.
I definitely recommend to include it in some existing Staff instead,
for example the "mel" Staff.
- Why did you use additional Dynamics staves for the dynamics and pedal
marks? Why not just include them within the existing staves?
If you make sure to keep them in the same Voice context as the
corresponding music, LilyPond will even make sure that they don't
collide with notes with several ledger lines. If you want them
typeset at a larger distance from the staves by default, just
increase the padding property of DynamicLineSpanner and
SustainPedalLineSpanner, respectively.
The resulting file could look something like:
-----------------------------------------
\version "2.0.1"
\include "paper16.ly"
\include "english.ly"
global = \notes { \time 6/8 s8*6*10 }
voiceDyn = \notes { s2.\mp }
melody = \notes \relative c' { a4. b }
text = \lyrics { some words }
pianoDyn = \notes { s2.\p }
upper = \notes \relative c'' { c4. d }
lower = \notes \relative c' { e4. f }
pedalIndications = \notes { s4.\sustainDown s4.\sustainUp\sustainDown }
\score
{
<<
% \context Dynamics = VD { \dynamicUp \voiceDyn }
\addlyrics
\context Staff = mel
{
\property Staff.automaticMelismata= ##t
{ \clef "G_8" \new Voice <<
\global
{ \dynamicUp \voiceDyn }
\melody>> }
}
\context Lyrics = melLyr { \text }
\context PianoStaff
<<
\context Staff = upper \upper
\context Dynamics = PD \pianoDyn
\context Staff = lower { \clef bass \new Voice <<
\property Staff.pedalSustainStyle = #'bracket
\pedalIndications
\lower >>}
>>
% \context Dynamics = pedals { \property Staff.pedalSustainStyle
= #'bracket \pedalIndications }
>>
\paper
{
linewidth = 427.05\pt % 6.5in #3 staff / 1.10
\translator { \RemoveEmptyStaffContext }
\translator
{
\type "Engraver_group_engraver"
\name Dynamics
\consists "Output_property_engraver"
minimumVerticalExtent = #'(-1 . 1)
pedalSustainStrings = #'("Ped." "*Ped." "*")
pedalUnaCordaStrings = #'("una corda" "" "tre corde")
\consists "Piano_pedal_engraver"
\consists "Script_engraver"
\consists "Dynamic_engraver"
\consists "Text_engraver"
TextScript \override #'font-relative-size = #1
TextScript \override #'font-shape = #'italic
DynamicText \override #'extra-offset = #'(0 . 2.5)
Hairpin \override #'extra-offset = #'(0 . 2.5)
\consists "Skip_event_swallow_translator"
\consistsend "Axis_group_engraver"
}
\translator
{
\PianoStaffContext
\accepts Dynamics
VerticalAlignment \override #'forced-distance = #9
}
\translator
{
\ScoreContext
\accepts Dynamics
% If you want larger separation between music and dynamics
DynamicLineSpanner \override #'padding = #2
% If you want larger separation between music and pedal marks
SustainPedalLineSpanner \override #'padding = #3
}
}
}
------------------------------------------------
/Mats
Kieren Richard MacMillan wrote:
[ Mac OS X 10.2.8; Lilypond 2.0.1 ]
Hello, all --
For some reason, I'm getting this warning when processing:
Calculating line breaks... warning: No spacing wishes found. Does your
score have a staff?
warning: No spacing wishes found. Does your score have a staff?
Furthermore, the items don't appear in the order they should (I think) ,
based on my input (included below this email; actual note values reduced
here for space reasons). Any thoughts as to what I'm doing wrong would
be appreciated!
Thanks,
Kieren.
______________________
\version "2.0.1"
\include "paper16.ly"
\include "english.ly"
global = \notes { \time 6/8 s8*6*10 }
voiceDyn = \notes { s2.\mp }
melody = \notes \relative c' { a4. b }
text = \lyrics { some words }
pianoDyn = \notes { s2.\p }
upper = \notes \relative c'' { c4. d }
lower = \notes \relative c' { e4. f }
pedalIndications = \notes { s4.\sustainDown s4.\sustainUp\sustainDown }
\score
{
<<
\global
\context Dynamics = VD { \dynamicUp \voiceDyn }
\addlyrics
\context Staff = mel
{
\property Staff.automaticMelismata= ##t
<< \clef "G_8" \melody >>
}
\context Lyrics = melLyr { \text }
\context PianoStaff
<<
\context Staff = upper \upper
\context Dynamics = PD \pianoDyn
\context Staff = lower << \clef bass \lower >>
>>
\context Dynamics = pedals { \property Staff.pedalSustainStyle =
#'bracket \pedalIndications }
>>
\paper
{
linewidth = 427.05\pt % 6.5in #3 staff / 1.10
\translator { \RemoveEmptyStaffContext }
\translator
{
\type "Engraver_group_engraver"
\name Dynamics
\consists "Output_property_engraver"
minimumVerticalExtent = #'(-1 . 1)
pedalSustainStrings = #'("Ped." "*Ped." "*")
pedalUnaCordaStrings = #'("una corda" "" "tre corde")
\consists "Piano_pedal_engraver"
\consists "Script_engraver"
\consists "Dynamic_engraver"
\consists "Text_engraver"
TextScript \override #'font-relative-size = #1
TextScript \override #'font-shape = #'italic
DynamicText \override #'extra-offset = #'(0 . 2.5)
Hairpin \override #'extra-offset = #'(0 . 2.5)
\consists "Skip_event_swallow_translator"
\consistsend "Axis_group_engraver"
}
\translator
{
\PianoStaffContext
\accepts Dynamics
VerticalAlignment \override #'forced-distance = #9
}
}
}
_______________________________________________
Lilypond-user mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/lilypond-user
--
=============================================
Mats Bengtsson
Signal Processing
Signals, Sensors and Systems
Royal Institute of Technology
SE-100 44 STOCKHOLM
Sweden
Phone: (+46) 8 790 8463
Fax: (+46) 8 790 7260
Email: address@hidden
WWW: http://www.s3.kth.se/~mabe
=============================================