denemo-devel
[Top][All Lists]
Advanced

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

Re: Analysis brackets (with labels) in Denemo


From: Lib Lists
Subject: Re: Analysis brackets (with labels) in Denemo
Date: Thu, 21 Oct 2021 17:07:17 +0300

Hi,
thank you for your detailed answer.
I have a couple of problems, see the attached images).

1. (picture Denemo.png) The bracket on the left is made with the
following code (added to the Scheme script):
\once \override HorizontalBracket.direction = #UP \startGroup
while the one on the right with \startGroup only.
The problem is that in order to get the bracket around two notes, in
the first case I need to put the startGroup before the first note and
the stopGroup after the second note, while in the second case both the
startGroup and stopGroup are placed after the notes I want to group
with the bracket.
I understand that this is related to the fact that Lilypond wants to
have the starting note for the bracket right before the startGroup
command,  after the override. Is there any workaround for this?

2. (picture Denemo2.png)
I used the your code, the one with
 (d-DirectivePut-standalone-display tag "This will label the Denemo Directive")
 (d-DirectivePut-standalone-tx tag 20)
 (d-DirectivePut-standalone-ty tag -20)
and as you can see from the picture it shows four 'Directive' signs
(sorry I won't know yet how those are called in Denemo). Is this the
expected behaviour?

Cheers,
Lib



On Thu, 21 Oct 2021 at 11:17, Richard Shann <richard@rshann.plus.com> wrote:
>
> On Thu, 2021-10-21 at 10:28 +0300, Lib Lists wrote:
> > Hi, thank you, now it works.
> > I'm now trying to add labels
> the simplest is to add a line giving some display text
> and (optionally) lines giving the x,y placing of the label.
>
> ;start analysis bracket
> (let ((tag "Analysis"))
>  (d-DirectivePut-standalone-postfix tag "\\startGroup")
>  (d-DirectivePut-standalone-display tag "This will label the Denemo 
> Directive")
>  (d-DirectivePut-standalone-tx tag 20)
>  (d-DirectivePut-standalone-ty tag -20)
>  (d-DirectivePut-layout-postfix
> "Analysis" "  \\context {\\Voice  \\consists
> \"Horizontal_bracket_engraver\" }"))
>
> If you examine the code of some of the other commands (right click on
> the menu item and get the script into the Scheme window) you will see
> that you can do more than just that e.g. specifying font etc and/or
> specifying a graphic to draw instead of the default lollipop.
>
> >  and flip the bracket direction, and I
> > understand that I need to modify the HorizontalBracket.direction and
> > the HorizontalBracketText.text. My knowledge of Scheme
>
> You don't need knowledge of Scheme to do this (apart from being
> sensitive to the importance of quoting backslashes, " etc), it is
> knowing the correct LilyPond syntax that you want to insert. Having
> sorted that out you can just replace the simple
>
> "\\startGroup"
>
> with
>
> "\\once \\override HorizontalBracket.direction = #UP blah blah \\startGroup"
>
> or whatever the LilyPond syntax is. When you insert some LilyPond
> syntax like this you can double click to get up the Object Editor which
> will tell you what LilyPond syntax you are actually emitting, to check
> all is well (or you can copy and paste the syntax you have from the
> View->LilyPond window into a LilyPond file or editor and check that it
> is correct).
>
> >  is so limited
> > that I wouldn't know how to add this to your code without seeing an
> > example, but in general, what would be the best way to do this kind
> > of
> > changes in Denemo (adding a new command
> a new user-created command is always a bit of Scheme code
> > vs. changing the Scheme code
> > for that specific case, etc.)?
>
> We can come to this once you have a good idea what bits of LilyPond
> syntax you want to emit.
>
> Richard

Attachment: Denemo.png
Description: PNG image

Attachment: Denemo2.png
Description: PNG image


reply via email to

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