denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Ligatures


From: Richard Shann
Subject: Re: [Denemo-devel] Ligatures
Date: Tue, 09 Aug 2016 20:23:23 +0100

On Tue, 2016-08-09 at 20:22 +0200, Andreas Schneider wrote:
> I have written the following simple scheme scripts to insert ligatures:
> 
> ToggleStartLigature.scm:
> (ToggleDirective "chord" "prefix" (cons "Ligature"  "(lig") "\\[ " )

The default "prefix" position is before the duration so you have to
apply an override to the prefix, thus:


(ToggleDirective "chord" "prefix" (cons "Ligature"  "(lig") "\\[ " )
(d-DirectivePut-chord-override "Ligature" DENEMO_OVERRIDE_AFFIX)

The first line is creating a Denemo Directive tagged "Ligature" and the
second one is changing its override field to the value
DENEMO_OVERRIDE_AFFIX which means use the alternative position for
"prefix".


> 
> ToggleEndLigature.scm:
> (ToggleDirective "chord" "postfix" (cons "Ligature"  "lig)") " \\]" )

This one does put the postfix after the duration ie, it is working as
you wish (???)

Note that you have used the same tag "Ligature" for these two, which
differs from the command names, if you tag them "ToggleStartLigature"
and "ToggleEndLigature" then you can repeat the command to remove the
ligature (that's what the Toggle bit in the (ToggleDirective ...) means.

The slightly tricky thing about creating these scripts is that many
notes don't have an explicit duration if it is the same as the previous
one, so to test be sure to use notes of different durations. Otherwise
it may appear to work on a series of quarter notes but then fail when
the durations are explicitly generated (as when you have quarter note,
half note, quarter note etc).

HTH

Richard



> However, they do not work as desired. In the attachment, you find a
> sample file for the use. I get the Lilypond code
>  a'\[ 2( b' \]\AutoBarline
>  c''2) a' \AutoEndMovementBarline
> which gives an error. What I want is
>  \[ a'2( b' \]\AutoBarline
>  c''2) a' \AutoEndMovementBarline
> which compiles correctly. What is the correct version of the scripts?
> 
> Andreas
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/denemo-devel





reply via email to

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