[Top][All Lists]

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

Re: Incipit

From: Richard Shann
Subject: Re: Incipit
Date: Sun, 17 Dec 2023 10:49:52 +0000
User-agent: Evolution 3.46.4-2

On Sat, 2023-12-16 at 21:25 +0100, Andreas Schneider wrote:
> Thank you very much for your help. One more question: how can I get
> the
> current indent 

There are two indent commands

Command: Indent
Alter the indent of the opening system for the current movement.
Location: Object Menu ▶ Movements ▶ Typesetter ▶ Print Layout
Internal Name: Indent


Command: Indent
Indent the first system of every movement by the given amount.
Location: Object Menu ▶ Score ▶ Typesetter ▶ Print Layout
Internal Name: ScoreIndent

The Instrument name command

Command: Instrument Name
Print Instrument name before staff at start of score,
Location: Object Menu ▶ Staffs/Voices ▶ Staff Properties
Internal Name: InstrumentName

runs the second (*) of those Indent commands, so to retrieve the value
set you need 
(d-DirectiveGet-score-data "ScoreIndent")
to get that value.
The value set by InstrumentName is just a very crude guess based on the
length of the name, a proper job would require querying LilyPond about
how much space is required ...

(*) I don't know why this is so, it was a long time ago and perhaps it
would be better to do otherwise...

> so that I can compare to the incipit length and increase
> it if necessary? I'm trying the following after looking at
> Indent.scm,
> but I always get #f
> ;;;StaffIncipit
> (let ((tag  "StaffIncipit") (current "") (incipitLength 10) (indent
> "15.0") )
> (set! current (d-GetUserInput (_ "Incipit") (_ "Give incipit for
> current staff:") current))
> (if (string? current)
>    (begin
>    (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-layout-data "Indent"))
>    (disp (number? indent) (string? indent) indent)
>    (if (and (string? indent) (string->number indent))
>      (if (> incipitLength (string->number indent))
>        (d-Indent incipitLength))))))
> Andreas

reply via email to

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