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: Richard Shann
Subject: Re: Analysis brackets (with labels) in Denemo
Date: Thu, 21 Oct 2021 09:17:40 +0100

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



reply via email to

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