denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incipit


From: Richard Shann
Subject: Re: Incipit
Date: Sun, 21 Jan 2024 18:19:46 +0000
User-agent: Evolution 3.46.4-2

On Sun, 2024-01-21 at 19:04 +0100, Andreas Schneider wrote:
> Thanks a lot, now it works as intended. Plus I have finally
> understood
> what the postfix and prefix tags do.

The prefix and postfix fields do different things for the various
directives, and where they put themselves can be further altered by the
setting of the override field, but generally the prefix field gets
inserted earlier in the syntax than the postfix field.

Richard



> 
> Andreas
> 
> 
> On 21.01.24 18:57, Richard Shann wrote:
> > On Sun, 2024-01-21 at 14:13 +0100, Andreas Schneider wrote:
> > > Yes, that is what I tried to describe. The correct syntax would
> > > be
> > > 
> > > \new Voice = "MvmntIVoiceI" { \incipit { \clef "mensural-c1" \key
> > > g
> > > \dorian r2 g'8 a' bes' c'' }
> > >     \clef treble    \key d \minor    \time 2/2   \MvmntIVoiceI }
> > > 
> > > instead of
> > > 
> > > \new Voice = "MvmntIVoiceI" \incipit { \clef "mensural-c1" \key g
> > > \dorian r2 g'8 a' bes' c'' } {
> > >     \clef treble    \key d \minor    \time 2/2   \MvmntIVoiceI }
> > 
> > In the samples directory is a score
> > AllDenemoDirectiveOutputs.denemo
> > and loading this and looking in the LilyPond view you can see the
> > directive needed to put text there:
> > 
> > [..................]
> > %Start of Staff
> > \new Staff = "Part 1" %{staff prefix%}
> >   << %{staff postfix%}
> > 
> >   \new Voice = "MvmntIVoiceI" %{voice prefix%}
> >   { %{voice postfix%}
> > 
> >   %{clef prefix%}
> >   \clef treble %{clef postfix%}
> >     \key c \major    \time 4/4   \MvmntIVoiceI
> >                          } %End of voice
> > 
> >                          >> %End of Staff
> > [.......]
> > The one you want is marked %{voice postfix%}
> > the one you have is marked  %{voice prefix%}
> > so all you need to do is replace prefix with postfix in the
> > procedure
> > call
> > 
> > (d-DirectivePut-voice-prefix tag (string-append "\\incipit
> > { "
> > current " }"))
> > 
> > and all should be well.
> > 
> > Richard
> > 
> > > 
> > > that is the incipit is after the opening brace of the voice
> > > instead
> > > before.
> > > 
> > > Andreas
> > > 
> > > 
> > > On 21.01.24 13:58, Richard Shann wrote:
> > > > On Sun, 2024-01-21 at 13:31 +0100, Andreas Schneider wrote:
> > > > > With my incipit script I have the problem that lyrics are not
> > > > > displayed.
> > > > > Looking into the lilypond code, I notice that the problem is
> > > > > that
> > > > > the
> > > > > incipit is inserted before the opening brace in the voice and
> > > > > not
> > > > > after.
> > > > > This can be seen in attached score, in which the incipit is
> > > > > inserted
> > > > > directly after \new Voice = "MvmntIVoiceI" while the correct
> > > > > position
> > > > > would be after the opening brace
> > > > 
> > > > where is that (in terms of the LilyPond syntax). That is, have
> > > > you
> > > > worked out the LilyPond syntax you need to get what you want.
> > > > You
> > > > have
> > > > to do this before you can hope to write a script that generates
> > > > it
> > > > (of
> > > > course).
> > > > I used the Customize Score Layout option in the LilyPond View
> > > > (continuous typesetting off, click on the "Score Layout
> > > > Options"
> > > > button) and the moved the incipit to after
> > > > 
> > > > \new ChoirStaff <<
> > > > 
> > > > and this created an extra staff. You can ask on
> > > > lilypond-user@gnu.org
> > > > if the docs don't help.
> > > > 
> > > > HTH
> > > > 
> > > > Richard
> > > > ps I haven't had a chance to investigate your script yet, I'll
> > > > try
> > > > to
> > > > get to it as you said there was some undesirably hard coded
> > > > value
> > > > in
> > > > it.
> > > > 
> > > > 
> > > > >    that now follows the incipit. What do I
> > > > > need to change in the script to insert the incipit at the
> > > > > correct
> > > > > place?
> > > > > You find the script below.
> > > > > 
> > > > > Thanks in advance
> > > > > 
> > > > > Andreas
> > > > > 
> > > > > 
> > > > > ;;;StaffIncipit
> > > > > (let ((tag  "StaffIncipit") (current "") (lengthInput "15")
> > > > > (incipitLength 15) (indent "20.0") (indentLength 20) )
> > > > > (set! current (d-DirectiveGet-voice-data tag))
> > > > > (if (not (string? current)) (set! current ""))
> > > > > (set! current (d-GetUserInput (_ "Incipit") (_ "Give incipit
> > > > > for
> > > > > current
> > > > > staff:") current))
> > > > > (if (string? current)
> > > > >        (begin
> > > > >        (set! lengthInput (d-GetUserInput (_ "Incipit") (_
> > > > > "Give
> > > > > incipit
> > > > > length for current staff:") lengthInput))
> > > > >        (if (and (string? indent) (string->number
> > > > > lengthInput))
> > > > >            (set! incipitLength (string->number lengthInput)))
> > > > >        (d-DirectivePut-voice-data tag current)
> > > > >        (d-DirectivePut-voice-prefix tag (string-append
> > > > > "\\incipit
> > > > > { "
> > > > > current " }"))
> > > > >        (d-DirectivePut-layout-postfix tag (string-append "
> > > > > incipit-
> > > > > width
> > > > > = " (number->string incipitLength) "\n"))
> > > > >        (set! indent (d-DirectiveGet-score-data
> > > > > "ScoreIndent"))
> > > > >        (if (and (string? indent) (string->number indent))
> > > > >          (begin
> > > > >          (set! indentLength (string->number indent))
> > > > >          (if (> incipitLength indentLength)
> > > > >            (d-ScoreIndent (+ incipitLength
> > > > > indentLength))))))))
> > > > 
> > > 
> > > 
> > 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]