Re: Analysis brackets (with labels) in Denemo
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
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
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
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: Analysis brackets (with labels) in Denemo
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
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
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
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 >
Re: Analysis brackets (with labels) in Denemo
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
Re: Analysis brackets (with labels) in Denemo
Thank you for the quick reply! I get an error message when I execute your script, 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-staff#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
Re: Analysis brackets (with labels) in Denemo
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-staff#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 AnalysisBrackets.denemo Description: application/wine-extension-denemo
Analysis brackets (with labels) in Denemo
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. Cheers, Lib