denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Flexa


From: Andreas Schneider
Subject: Re: [Denemo-devel] Flexa
Date: Mon, 23 Jan 2017 20:23:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0

Am 16.01.2017 um 18:52 schrieb Richard Shann:
> Well, here is a sample script that does that - better it allows you to
> enter two punctae and then hit flexa and it does the selection of the
> two notes for you.
> 
> 
> (let ((tag "Flexa"))
> (if (and (not (d-HasSelection)) (d-PrevChord))
>       (begin
>               (d-SetMark)
>               (d-NextChord)
>               (d-SetPoint)))
>       
> (if (MoveToSelectionBeginningInThisStaff)
>       (begin
>               (d-DirectivePut-chord-prefix tag "\\[ ")
>               (d-DirectivePut-chord-postfix tag "\\flexa ")
>               (d-DirectivePut-chord-display tag "fl--")
>               (d-DirectivePut-chord-override tag 16)
>               (if (d-NextChord)
>                       (begin
>                       
>                               (d-DirectivePut-chord-postfix tag "\\]  ")
>                               (d-DirectivePut-chord-display tag "--]")
>                               (d-DirectivePut-chord-override tag 16)))
>                               (d-MoveCursorRight)
>               (d-SetSaved #f))
>       (d-WarningDialog (_ "You must select two notes"))))

The Flexa command creates directives on two notes with different
contents. Should both have the same tag, or should they have different
tags? My thinking is that it might be better for further editing if they
have different tags. Or am I overlooking something? I have modified your
script as follows:

(let ((tag "Flexa"))
(if (and (not (d-HasSelection)) (d-PrevChord))
        (begin
                (d-SetMark)
                (d-NextChord)
                (d-SetPoint)))
        
(if (MoveToSelectionBeginningInThisStaff)
        (begin
                (d-DirectivePut-chord-prefix (string-append tag "Start") "\\[ ")
                (d-DirectivePut-chord-postfix (string-append tag "Start") 
"\\flexa ")
                (d-DirectivePut-chord-display (string-append tag "Start") 
"fl--")
                (d-DirectivePut-chord-override (string-append tag "Start") 16)
                (if (d-NextChord)
                        (begin
                        
                                (d-DirectivePut-chord-postfix (string-append 
tag "End") "\\]  ")
                                (d-DirectivePut-chord-display (string-append 
tag "End") "--]")
                                (d-DirectivePut-chord-override (string-append 
tag "End") 16)))
                                (d-MoveCursorRight)
                (d-SetSaved #f))
        (d-WarningDialog (_ "You must select two notes"))))

Maybe, FlexaStart and FlexaEnd should be present as well if one wants to
edit the directives.

By the way, I don't find the object explorer any more. Previously I
could access it from the context menu over a note, but now the
Notes/Rests menu from the ObjectMenu is shown instead, and I don't see
how to access a list of directives (which is useful for debugging purposes).

Andreas



reply via email to

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