Re: Analysis brackets (with labels) in Denemo

2021-10-22 Thread Richard Shann
On Fri, 2021-10-22 at 18:52 +0300, Lib Lists wrote:
> eece
> 
> On Fri, 22 Oct 2021 at 18:20, Richard Shann 
> wrote:
> > 
> > On Fri, 2021-10-22 at 16:18 +0300, Lib Lists wrote:
> > > Hi Richard,
> > > 
> > > > > 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).
> > > 
> > > I changed the code and I now get two Directive symbols (see
> > > attached
> > > screenshot), is that correct?
> > 
> > Sorry I was a bit too terse, here is your code commented
> > 
> > > ;start analysis bracket
> > > (let ((tag "Analysis"))
> > >  (d-DirectivePut-standalone-postfix tag "\\startGroup")
> > 
> > this inserts a standalone Denemo Directive object before the cursor
> > (assuming the cursor is not already on one with that tag) and moves
> > the
> > cursor right for the next insertion.
> > 
> > >  (d-DirectivePut-standalone-display tag "Start Analysis Bracket
> > > DOWN")
> > 
> > the cursor is on the note now so this inserts a *second* Denemo
> > Directive which just displays the label, and moves the cursor right
> > 
> > >  (d-MoveCursorLeft)
> > 
> > this moves the cursor left so it is on that second Denemo
> > Directive, so
> > now it is ready to be edited
> > >  (d-DirectivePut-standalone-tx tag 20)
> > 
> > this edits that second one, filling in the tx field, positioning
> > your
> > label displaced by 20 staff spaces leftwards, it doesn't move the
> > cursor as it is editing not inserting.
> > 
> > >  (d-DirectivePut-standalone-ty tag -20)
> > 
> > likewise edits for the y position of the label
> > 
> > >  (d-DirectivePut-layout-postfix
> > > "Analysis" "  \\context {\\Voice  \\consists
> > > \"Horizontal_bracket_engraver\" }"))
> > 
> > this puts a Denemo Directive into the layout block of the movement
> > (it
> > doesn't matter where the cursor is as this is not a standalone
> > directive). You can look in the Movement->Movement Properties
> > Editor
> > and see that this directive has appeared in the layout directives.
> > 
> > So your code should have been:
> > 
> > ;start analysis bracket
> > (let ((tag "Analysis"))
> >  (d-DirectivePut-standalone-postfix tag "\\startGroup")
> >  (d-MoveCursorLeft)
> >  (d-DirectivePut-standalone-display tag "Start Analysis Bracket
> > DOWN")
> >  (d-DirectivePut-standalone-tx tag 20)
> >  (d-DirectivePut-standalone-ty tag -20)
> >  (d-DirectivePut-layout-postfix
> > "Analysis" "  \\context {\\Voice  \\consists
> > \"Horizontal_bracket_engraver\" }"))
> > 
> > where the move left into the editing position is one line earlier.
> > 
> > But you probably don't want such a long label and you perhaps don't
> > want to alter the default position of the label, so you could write
> > 
> > ;start analysis bracket
> > (let ((tag "Analysis"))
> >  (d-DirectivePut-standalone-postfix tag "\\startGroup")
> >  (d-MoveCursorLeft)
> >  (d-DirectivePut-standalone-display tag "Analysis___")
> >  (d-DirectivePut-layout-postfix
> > "Analysis" "  \\context {\\Voice  \\consists
> > \"Horizontal_bracket_engraver\" }"))
> > 
> > where I've made the label shorter and omitted the tx and ty lines
> > as
> > they were just examples to play with, the default is usually ok.
> > 
> > HTH
> > 
> > Richard
> 
> Awesome, thank you once again! Now it is fully clear.
> A side question about scripts. Every time I modify a script (and I
> assume I create one) and I save the denemo file

If you want to save your script you can use the File menu of the Scheme
window or if you want to use it in future scores you could put it into
a palette button (or create a command in 

Re: Analysis brackets (with labels) in Denemo

2021-10-22 Thread Lib Lists
eece

On Fri, 22 Oct 2021 at 18:20, Richard Shann  wrote:
>
> On Fri, 2021-10-22 at 16:18 +0300, Lib Lists wrote:
> > Hi Richard,
> >
> > > > 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).
> >
> > I changed the code and I now get two Directive symbols (see attached
> > screenshot), is that correct?
>
> Sorry I was a bit too terse, here is your code commented
>
> > ;start analysis bracket
> > (let ((tag "Analysis"))
> >  (d-DirectivePut-standalone-postfix tag "\\startGroup")
>
> this inserts a standalone Denemo Directive object before the cursor
> (assuming the cursor is not already on one with that tag) and moves the
> cursor right for the next insertion.
>
> >  (d-DirectivePut-standalone-display tag "Start Analysis Bracket
> > DOWN")
>
> the cursor is on the note now so this inserts a *second* Denemo
> Directive which just displays the label, and moves the cursor right
>
> >  (d-MoveCursorLeft)
>
> this moves the cursor left so it is on that second Denemo Directive, so
> now it is ready to be edited
> >  (d-DirectivePut-standalone-tx tag 20)
> this edits that second one, filling in the tx field, positioning your
> label displaced by 20 staff spaces leftwards, it doesn't move the
> cursor as it is editing not inserting.
>
> >  (d-DirectivePut-standalone-ty tag -20)
> likewise edits for the y position of the label
>
> >  (d-DirectivePut-layout-postfix
> > "Analysis" "  \\context {\\Voice  \\consists
> > \"Horizontal_bracket_engraver\" }"))
>
> this puts a Denemo Directive into the layout block of the movement (it
> doesn't matter where the cursor is as this is not a standalone
> directive). You can look in the Movement->Movement Properties Editor
> and see that this directive has appeared in the layout directives.
>
> So your code should have been:
>
> ;start analysis bracket
> (let ((tag "Analysis"))
>  (d-DirectivePut-standalone-postfix tag "\\startGroup")
>  (d-MoveCursorLeft)
>  (d-DirectivePut-standalone-display tag "Start Analysis Bracket DOWN")
>  (d-DirectivePut-standalone-tx tag 20)
>  (d-DirectivePut-standalone-ty tag -20)
>  (d-DirectivePut-layout-postfix
> "Analysis" "  \\context {\\Voice  \\consists
> \"Horizontal_bracket_engraver\" }"))
>
> where the move left into the editing position is one line earlier.
>
> But you probably don't want such a long label and you perhaps don't
> want to alter the default position of the label, so you could write
>
> ;start analysis bracket
> (let ((tag "Analysis"))
>  (d-DirectivePut-standalone-postfix tag "\\startGroup")
>  (d-MoveCursorLeft)
>  (d-DirectivePut-standalone-display tag "Analysis___")
>  (d-DirectivePut-layout-postfix
> "Analysis" "  \\context {\\Voice  \\consists
> \"Horizontal_bracket_engraver\" }"))
>
> where I've made the label shorter and omitted the tx and ty lines as
> they were just examples to play with, the default is usually ok.
>
> HTH
>
> Richard

Awesome, thank you once again! Now it is fully clear.
A side question about scripts. Every time I modify a script (and I
assume I create one) and I save the denemo file, I get the warning
'You have a script defined, and the choice between Normal Save and
Advanced: Execute the script etc.
I always press Normal Save, but I'd like to understand what the other
option means and when it should be used.

Cheers,
Lib



Re: Analysis brackets (with labels) in Denemo

2021-10-22 Thread Richard Shann
On Fri, 2021-10-22 at 16:18 +0300, Lib Lists wrote:
> Hi Richard,
> 
> > > 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).
> 
> I changed the code and I now get two Directive symbols (see attached
> screenshot), is that correct? 

Sorry I was a bit too terse, here is your code commented

> ;start analysis bracket
> (let ((tag "Analysis"))
>  (d-DirectivePut-standalone-postfix tag "\\startGroup")

this inserts a standalone Denemo Directive object before the cursor
(assuming the cursor is not already on one with that tag) and moves the
cursor right for the next insertion.

>  (d-DirectivePut-standalone-display tag "Start Analysis Bracket
> DOWN")

the cursor is on the note now so this inserts a *second* Denemo
Directive which just displays the label, and moves the cursor right

>  (d-MoveCursorLeft)

this moves the cursor left so it is on that second Denemo Directive, so
now it is ready to be edited
>  (d-DirectivePut-standalone-tx tag 20)
this edits that second one, filling in the tx field, positioning your
label displaced by 20 staff spaces leftwards, it doesn't move the
cursor as it is editing not inserting.

>  (d-DirectivePut-standalone-ty tag -20)
likewise edits for the y position of the label

>  (d-DirectivePut-layout-postfix
> "Analysis" "  \\context {\\Voice  \\consists
> \"Horizontal_bracket_engraver\" }"))

this puts a Denemo Directive into the layout block of the movement (it
doesn't matter where the cursor is as this is not a standalone
directive). You can look in the Movement->Movement Properties Editor
and see that this directive has appeared in the layout directives.

So your code should have been:

;start analysis bracket
(let ((tag "Analysis"))
 (d-DirectivePut-standalone-postfix tag "\\startGroup")
 (d-MoveCursorLeft)
 (d-DirectivePut-standalone-display tag "Start Analysis Bracket DOWN")
 (d-DirectivePut-standalone-tx tag 20)
 (d-DirectivePut-standalone-ty tag -20)
 (d-DirectivePut-layout-postfix
"Analysis" "  \\context {\\Voice  \\consists
\"Horizontal_bracket_engraver\" }"))

where the move left into the editing position is one line earlier.

But you probably don't want such a long label and you perhaps don't
want to alter the default position of the label, so you could write

;start analysis bracket
(let ((tag "Analysis"))
 (d-DirectivePut-standalone-postfix tag "\\startGroup")
 (d-MoveCursorLeft)
 (d-DirectivePut-standalone-display tag "Analysis___")
 (d-DirectivePut-layout-postfix
"Analysis" "  \\context {\\Voice  \\consists
\"Horizontal_bracket_engraver\" }"))

where I've made the label shorter and omitted the tx and ty lines as
they were just examples to play with, the default is usually ok.

HTH

Richard






Re: Analysis brackets (with labels) in Denemo

2021-10-22 Thread Lib Lists
Hi Richard,

> > 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).

I changed the code and I now get two Directive symbols (see attached
screenshot), is that correct? Just for the sake of clarity, here's my
code:

;start analysis bracket
(let ((tag "Analysis"))
 (d-DirectivePut-standalone-postfix tag "\\startGroup")
 (d-DirectivePut-standalone-display tag "Start Analysis Bracket DOWN")
 (d-MoveCursorLeft)
 (d-DirectivePut-standalone-tx tag 20)
 (d-DirectivePut-standalone-ty tag -20)
 (d-DirectivePut-layout-postfix
"Analysis" "  \\context {\\Voice  \\consists
\"Horizontal_bracket_engraver\" }"))

Cheers,
Lib


Re: Can not tweak objects in Debian's Version 2.5.0

2021-10-22 Thread Richard Shann
On Thu, 2021-10-21 at 16:47 -0300, Robert Lewis wrote:
> 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

left-click starts playback from the object left-clicked on. Right-click 
gives you a menu - if you are off any object it is the (Help for
Tweaks, Red dots and crosses, Score size) menu whereas if you are on an
object (hand pointer) it gives you the context sensitive menu for
tweaking.

Incidentally, if you have already clicked an object (blue square on the
object) then left-clicking will give you the context sensitive menu,
rather than just starting playing straight away, you can play from that
menu anyway.

>  on the object when the hand pointer appears.
> 
> Any suggestions?

so, right not left click.

Richard