Can not tweak objects in Debian's Version 2.5.0

2021-10-21 Thread Robert Lewis
Hello - 

OS:  Linux; Debian Bullseye
Denemo Version:  2.5.0 from the Debian repository

In this version I am unable to tweak Textual Annotations, Dynamics, Rehearsal 
Numbers, etc. in the Print View window.  A right-click gives me the context 
menu (Help for Tweaks, Red dots and crosses, Score size), but there are no 
prompts when I left-click on the object when the hand pointer appears.

Any suggestions?

Regards,
Robert





Re: Analysis brackets (with labels) in Denemo

2021-10-21 Thread Richard Shann
On Thu, 2021-10-21 at 17:07 +0300, Lib Lists wrote:
> 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?

Yes, the simplest would be to put the override syntax in a separate
Denemo Directive (you can use the command

Command: Insert Lilypond
Insert or edit a directive in the LilyPond music typesetting language.
This can be used for extra spacing, transposing or almost anything. See
LilyPond documentation for ideas.
Location: Object Menu ▶ Directives
Internal Name: InsertStandaloneDirective


 to do this, but you will want to improve the display by editing it
after creation, and then perhaps making a palette button to insert it).

You would miss out the \once bit of the syntax in this case so it
applies to all the brackets following.

> 
> 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?

Sorry, yes I should have put (d-MoveCursorLeft) after the first command
as it creates the Denemo Directive and moves to the right straight
away, so that the subsequent commands create new directives instead of
editing the old one. There is a wrapper function that does a whole
bunch of this for you called (StandAloneDirectiveProto ...) which is
used in the script for that InsertStandaloneDirective command I
referenced above. But to keep things simple:

 (d-DirectivePut-standalone-display tag "This will label the Denemo Directive")
 (d-MoveCursorLeft)
 (d-DirectivePut-standalone-tx tag 20)
 (d-DirectivePut-standalone-ty tag -20)

would do the trick (the subsequent d-DirectivePut-... are editing so
they don't move the cursor right, the cursor always moves right after
inserting an object).

HTH

Richard






Re: Analysis brackets (with labels) in Denemo

2021-10-21 Thread Lib Lists
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  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


Re: Analysis brackets (with labels) in Denemo

2021-10-21 Thread Richard Shann
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



Re: Analysis brackets (with labels) in Denemo

2021-10-21 Thread Lib Lists
Hi, thank you, now it works.
I'm now trying to add labels and flip the bracket direction, and I
understand that I need to modify the HorizontalBracket.direction and
the HorizontalBracketText.text. My knowledge of Scheme 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 vs. changing the Scheme code
for that specific case, etc.)?
Thank you in advance for your help,
Lib

On Wed, 20 Oct 2021 at 23:52, Richard Shann  wrote:
>
> On Wed, 2021-10-20 at 19:12 +0300, Lib Lists wrote:
> > Thank you for the quick reply!
> > I get an error message when I execute your script,
>
> The problem is that the email has added a line-feed at the hyphen
>
> (d-DirectivePut-
> standalone-postfix tag "\\startGroup")
>
> should not split d-DirectivePut-standalone-postfix
> up into two words. I told my email client to keep the formatting, but
> on receipt it had been split up. I should use attachments...
>
> Richard
>
>
> >  but your example
> > works perfectly, so there's clearly a mistake from my side. I'll test
> > more and come back if I don't find the (probably quite obvious)
> > solution.
> > Cheers,
> > Lib
> >
> > On Wed, 20 Oct 2021 at 17:38, Richard Shann 
> > wrote:
> > >
> > > On Wed, 2021-10-20 at 16:56 +0300, Lib Lists wrote:
> > > > Hello,
> > > > is there a way to insert analysis brackets (with or without
> > > > labels)
> > > > in
> > > > Denemo? If it already exists, I wasn't able to find the command.
> > >
> > > Well I see it is documented in LilyPond:
> > >
> > > https://lilypond.org/doc/v2.21/Documentation/notation/outside-the-s
> > > taff#analysis-brackets
> > >
> > > So to do this in Denemo you need to insert \startGroup and
> > > \stopGroup
> > > between the relevant notes. You also need to include a special
> > > engraver, so putting these two together gives two bits of Scheme:
> > >
> > > ;start analysis bracket
> > > (let ((tag "Analysis"))
> > >  (d-DirectivePut-
> > > standalone-postfix tag "\\startGroup")
> > >  (d-DirectivePut-layout-postfix
> > > "Analysis" "  \\context {\\Voice  \\consists
> > > \"Horizontal_bracket_engraver\" }"))
> > >
> > > ;stop analysis bracket
> > > (let ((tag "Analysis"))
> > >  (d-DirectivePut-standalone-postfix tag "\\stopGroup"))
> > >
> > > If you put these one at a time into the Scheme window and create a
> > > palette button from them then you can insert your analysis brackets
> > > with those. I've attached an example. Of course, it could be made a
> > > bit
> > > more swish by adding stuff to display more nicely...
> > >
> > > If you need help with any of that, please ask.
> > >
> > > Richard
>