Re: PDF bookmark questions

2022-02-01 Thread Lukas-Fabian Moser

Hi Nate,

Am 01.02.22 um 22:11 schrieb Nate Whetsell:

I’m trying to add PDF bookmarks (to display in PDF readers) to a collection of 
studies. I’m having three issues:

1. If several studies appear on the same page, the bookmarks appear in reverse 
order.

2. The bookmarks seem to navigate to the *page* on which a study appears, not 
the study itself.

3. It doesn’t seem to be possible to add PDF bookmarks without also using 
`\markuplist \table-of-contents` to add a table of content.

Below is an example illustrating the issues I’m having. Is there a way to 
create PDF bookmarks without using `\markuplist \table-of-contents`, have them 
appear in the expected order, and have them navigate to the expected position?
Forgive me for barging in without having something to contribute to your 
actual question:

```
\version "2.22.0"

\book {
   \markuplist \table-of-contents

   #(do ((study-number 1 (1+ study-number)))
   ((> study-number 15))
 (let ((header (make-module)))
   (module-define! header 'piece (number->string study-number))
   (let* (
   (score (scorify-music #{
 \new Staff <<
   \tocItem \markup { #(number->string study-number) }
   \new Voice { c' }
 >>
   #})))
 (begin
   (ly:score-set-header! score header)
   (add-score score)
}
```


Are you aware that you can do almost all of this using LilyPond syntax?

\version "2.22.0"

\book {
  \markuplist \table-of-contents

  #(do ((study-number 1 (1+ study-number)))
  ((> study-number 15))
  (add-score
   #{
 \score {
   \header {
 piece = #(number->string study-number)
   }
  \new Staff <<
    \tocItem \markup { #(number->string study-number) }
    \new Voice { c' }
  >>
 }
   #}))
}

Lukas




Re: Delay for list posts to arrive

2022-02-01 Thread Colin Campbell
I found much the same delay this afternoon, sending the patch list to 
the developers list took about 3 hours to show up in my mail.



Cheers,

Colin

On 2022-02-01 15:50, Jean Abou Samra wrote:

Hi,

Lately I've found myself a couple times duplicating answers
already provided on this list by others up to almost three
hours earlier because I had not received these replies yet.
Now the little delay for posts to get in inboxes is a quirk
inherent to mailing lists, but three hours seems a bit much.
I'm wondering: are others experiencing this as well?

Thanks,
Jean






Re: Delay for list posts to arrive

2022-02-01 Thread Werner LEMBERG


>> Lately I've found myself a couple times duplicating answers already
>> provided on this list by others up to almost three hours earlier
>> because I had not received these replies yet.  [...]
>
> Check the timestamps in the email headers.  This tends to be what I
> see: [...]

There were indeed downtime issues.  You can have a look at

  https://hostux.social/@fsfstatus

to check whether there are known problems.

Note, however, that the GNU mailserver quite often has hiccups due to
heavy loads.


   Werner



Re: Delay for list posts to arrive

2022-02-01 Thread David Kastrup
Jean Abou Samra  writes:

> Hi,
>
> Lately I've found myself a couple times duplicating answers
> already provided on this list by others up to almost three
> hours earlier because I had not received these replies yet.
> Now the little delay for posts to get in inboxes is a quirk
> inherent to mailing lists, but three hours seems a bit much.
> I'm wondering: are others experiencing this as well?

Well, my mail account is on fencepost.gnu.org and fencepost has been
down at least several hours recently, presumably due to updates.  I
would not be surprised if that has been similar with either the mailing
list servers and/or the mail transport server itself for gnu.org.

-- 
David Kastrup



Re: Delay for list posts to arrive

2022-02-01 Thread Valentin Petzel
Hello Jean,

The only metrics I have for this is time until I receive mails I composed 
myself. Usually these come back pretty fast, but occasionally they can take a 
few hours.

Best,
Valentin

Am Dienstag, 1. Februar 2022, 23:50:33 CET schrieb Jean Abou Samra:
> Hi,
> 
> Lately I've found myself a couple times duplicating answers
> already provided on this list by others up to almost three
> hours earlier because I had not received these replies yet.
> Now the little delay for posts to get in inboxes is a quirk
> inherent to mailing lists, but three hours seems a bit much.
> I'm wondering: are others experiencing this as well?
> 
> Thanks,
> Jean

signature.asc
Description: This is a digitally signed message part.


Re: Want "Fine" to be right adjacent to the 3rd beat bar line (2/2), not to the left

2022-02-01 Thread Valentin Petzel
Hi Ken,

Currently you are applying this tweak to the note c2. You should instead put 
the tweak command in front of the mark command to apply it to the 
RehearsalMark.

Also note that \mark is *not* and after-event, but a full music event standing 
by its own like \tempo, \time or \key. So differently to the note^”text” 
version (which produces a TextScript attached to the note) the \mark is not in 
fact attached to any note.

Cheers,
Valentin

Am Mittwoch, 2. Februar 2022, 01:19:14 CET schrieb Kenneth Wolcott:
> Hi Valentin;
> 
>   Thank you for your valiant attempt to understand past my ambiguity.
> 
>   I will attach the pdf from which I am using as an example and the
> current resultant pdf from my attempts to implement your suggestion.
> 
>   The first one is from Michael Kravchuk and contains lyrics.
> 
>   My attempt does not (yet) have lyrics.
> 
>   Please see that the "Fine" in my attempt is now too far to the right.
> 
>   Earlier it was too far to the left.
> 
>   The following is the code snippet that I am using:
> 
>   \tweak self-alignment-X #RIGHT
> %  \tweak break-visibility #begin-of-line-invisible
>   c'2.^1\mark \markup { \fontsize #4 \italic "Fine" }
> 
>   I tried the visibility line initially. With or without this line,
> the "Fine" is now too far to the right.
> 
> Thanks so much for your help,
> Ken
> 
> On Tue, Feb 1, 2022 at 12:32 AM Valentin Petzel  wrote:
> > Hi Ken,
> > 
> > Your screenshots are of limited use, as they fail to explain which one is
> > the behaviour you want. Thus I’ve created an example for you
> > demonstrating both.
> > 
> > \paper {
> > 
> >   ragged-right = ##f
> > 
> > }
> > 
> > {
> > 
> >   \time 3/4
> >   s2.*2 2.^\markup\italic"Fine"
> > 
> > }
> > 
> > {
> > 
> >   \time 3/4
> >   s2.*2 2.
> >   \tweak self-alignment-X #RIGHT
> >   \tweak break-visibility #begin-of-line-invisible
> >   \mark\markup\smaller\smaller\italic"Fine"
> > 
> > }
> > 
> > Cheers,
> > Valentin
> > 
> > Am Dienstag, 1. Februar 2022, 04:09:49 CET schrieb Kenneth Wolcott:
> > > HI;
> > > 
> > >   I want the "Fine" to be right adjacent to the 3rd beat bar line
> > > 
> > > (2/2), not aligned to the left (previous) bar line.
> > > 
> > >   Please see the attached screenshots.
> > > 
> > > Thanks,
> > > Ken Wolcott

signature.asc
Description: This is a digitally signed message part.


Re: Delay for list posts to arrive

2022-02-01 Thread Ralph Palmer
On Tue, Feb 1, 2022 at 3:56 PM Jean Abou Samra  wrote:

> Hi,
>
> Lately I've found myself a couple times duplicating answers
> already provided on this list by others up to almost three
> hours earlier because I had not received these replies yet.
> Now the little delay for posts to get in inboxes is a quirk
> inherent to mailing lists, but three hours seems a bit much.
> I'm wondering: are others experiencing this as well?
>
> Thanks,
> Jean
>

Hi -

I'm noticing it, but not experiencing it, because I haven't done much
"help"ing recently.
All the best,
Ralph


-- 
Ralph Palmer
Seattle
USA
(he, him, his)
palmer.r.vio...@gmail.com


Re: \include inside function

2022-02-01 Thread Valentin Petzel
Hello Jean,

I expected something like this might be possible, thank you for this simple 
solution! I surely could not have done this this elegantly!

Maybe I’ll try to extend this to allow for specifying paths.

Maybe also it could work to set custom toplevel handlers to have scores and 
bookparts and stuff instead collected in some list.

Cheers,
Valentin

Am Dienstag, 1. Februar 2022, 23:17:51 CET schrieb Jean Abou Samra:
> Le 01/02/2022 à 23:14, Jean Abou Samra a écrit :
> > Well, if you are ready to get evil, you can do
> > 
> > \version "2.23.5"
> > 
> > includeNamespace =
> > #(define-scheme-function (filename) (string?)
> >(let ((new-parser (ly:parser-clone)))
> >  (ly:parser-parse-string
> >   new-parser
> >   (format #f "\\include ~s" filename))
> >  (define-music-function (name) (symbol?)
> 
> Whoops! This one should rather be
> define-scheme-function to allow lookup of arbitrary
> values and not just music.

signature.asc
Description: This is a digitally signed message part.


Re: Want "Fine" to be right adjacent to the 3rd beat bar line (2/2), not to the left

2022-02-01 Thread Kenneth Wolcott
Ah!!  I got it.  Thank you!

On Tue, Feb 1, 2022 at 4:27 PM Valentin Petzel  wrote:
>
> Hi Ken,
>
> Currently you are applying this tweak to the note c2. You should instead put
> the tweak command in front of the mark command to apply it to the
> RehearsalMark.
>
> Also note that \mark is *not* and after-event, but a full music event standing
> by its own like \tempo, \time or \key. So differently to the note^”text”
> version (which produces a TextScript attached to the note) the \mark is not in
> fact attached to any note.
>
> Cheers,
> Valentin
>
> Am Mittwoch, 2. Februar 2022, 01:19:14 CET schrieb Kenneth Wolcott:
> > Hi Valentin;
> >
> >   Thank you for your valiant attempt to understand past my ambiguity.
> >
> >   I will attach the pdf from which I am using as an example and the
> > current resultant pdf from my attempts to implement your suggestion.
> >
> >   The first one is from Michael Kravchuk and contains lyrics.
> >
> >   My attempt does not (yet) have lyrics.
> >
> >   Please see that the "Fine" in my attempt is now too far to the right.
> >
> >   Earlier it was too far to the left.
> >
> >   The following is the code snippet that I am using:
> >
> >   \tweak self-alignment-X #RIGHT
> > %  \tweak break-visibility #begin-of-line-invisible
> >   c'2.^1\mark \markup { \fontsize #4 \italic "Fine" }
> >
> >   I tried the visibility line initially. With or without this line,
> > the "Fine" is now too far to the right.
> >
> > Thanks so much for your help,
> > Ken
> >
> > On Tue, Feb 1, 2022 at 12:32 AM Valentin Petzel  wrote:
> > > Hi Ken,
> > >
> > > Your screenshots are of limited use, as they fail to explain which one is
> > > the behaviour you want. Thus I’ve created an example for you
> > > demonstrating both.
> > >
> > > \paper {
> > >
> > >   ragged-right = ##f
> > >
> > > }
> > >
> > > {
> > >
> > >   \time 3/4
> > >   s2.*2 2.^\markup\italic"Fine"
> > >
> > > }
> > >
> > > {
> > >
> > >   \time 3/4
> > >   s2.*2 2.
> > >   \tweak self-alignment-X #RIGHT
> > >   \tweak break-visibility #begin-of-line-invisible
> > >   \mark\markup\smaller\smaller\italic"Fine"
> > >
> > > }
> > >
> > > Cheers,
> > > Valentin
> > >
> > > Am Dienstag, 1. Februar 2022, 04:09:49 CET schrieb Kenneth Wolcott:
> > > > HI;
> > > >
> > > >   I want the "Fine" to be right adjacent to the 3rd beat bar line
> > > >
> > > > (2/2), not aligned to the left (previous) bar line.
> > > >
> > > >   Please see the attached screenshots.
> > > >
> > > > Thanks,
> > > > Ken Wolcott



Re: \include inside function

2022-02-01 Thread Valentin Petzel
> You won't get far without parsing the file.

I was rather talking about the relevant functionality essentially being done 
after parsing the included file.

> Feel free to create an implementation.  That will apparently be easier
> than to prove viability to me.

First I’ll have to do some source digging, to see if this is actually viable, 
or if it strays to far from how lilypond’s parser is implemented.

Cheers,
Valentin

signature.asc
Description: This is a digitally signed message part.


Re: help!

2022-02-01 Thread Valentin Petzel
Hello Jean,

Again I have learned something from you, thank you very much.

Best,
Valentin

Am Dienstag, 1. Februar 2022, 23:04:45 CET schrieb Jean Abou Samra:
> Le 01/02/2022 à 18:34, Valentin Petzel a écrit :
> > Thank you. As it seems prior to 2.23 the Volta Bracket engraver would
> > override the text property even if you had manually specified this. So we
> > can either directly modify this in the repeat command (which I consider a
> > bit ugly), or try some workaround like this: (Basically this checks if
> > details.text is set and sets text to details.text if so before
> > calculating the stencil):
> > 
> > \version "2.22"
> > 
> > {
> > 
> >\override Score.VoltaBracket.stencil =
> >#(lambda (grob)
> >
> >   (let* ((det (ly:grob-property grob 'details))
> >   
> >  (det-text (assoc-get 'text det #f)))
> > 
> > (if (markup? det-text)
> > 
> > (ly:grob-set-property! grob 'text det-text))
> > 
> > (ly:volta-bracket-interface::print grob)))
> >
> >\repeat volta 2 {
> >
> >  c' d' e' f'
> >
> >}
> >\alternative {
> >
> >  {
> >  
> >\once\override Score.VoltaBracket.details.text =
> >\markup\smaller"bla
> > 
> > bla"
> > 
> >\once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
> >g' a' b' c'' \mark\markup\smaller\smaller\musicglyph
> >#"scripts.segno"
> >  
> >  }
> >  {
> >  
> >\once\override Score.VoltaBracket.details.text =
> >\markup\smaller"blu
> > 
> > blu"
> > 
> >\once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
> >c'1
> >  
> >  }
> >
> >}
> > 
> > }
> 
> Or use:
> 
> \version "2.22"
> 
> {
>\repeat volta 2 {
>  c' d' e' f'
>}
>\alternative {
>  {
>\overrideProperty Score.VoltaBracket.text \markup\smaller"bla bla"
>\once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
>g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno"
> }
>  {
>\overrideProperty Score.VoltaBracket.text \markup\smaller"blu blu"
>\once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
>c'1
>  }
>}
> }
> 
> 
> \overrideProperty is the typical workaround for this
> kind of issue as it operates later than \override
> (at engraver acknowledge time) and thus can override
> decisions made in the meantime.
> 
> Best,
> Jean

signature.asc
Description: This is a digitally signed message part.


Re: \include inside function

2022-02-01 Thread David Kastrup
David Wright  writes:

> On Tue 01 Feb 2022 at 16:09:01 (+0100), Leo Correia de Verdier wrote:
>> 
>> Is there a way to have an \include inside a function?
>> In the attached file includeinfunction.ly the commented out line
>> doesn’t work (probably for some very logical reason, but still
>> unknown to me). Is there a way to work around that and have includes
>> inside functions?
>
> NR § 3.1.5 File structure
>
> At any point in a file, any of the following /lexical/ instructions can be 
> entered:
> • \version
> • \include
> [ … ]
>
> (my emphasis)
>
> So it's not going to work, because you can't "call" it.
> It just inserts the contents of the file at that point.

The point of calling \include was between #{ ... #} and nothing in there
inherently gets "called".  But you cannot place assignments in there.

-- 
David Kastrup



Re: \include inside function

2022-02-01 Thread David Kastrup
Valentin Petzel  writes:

>> And it still breaks down because at the top level, LilyPond input does
>> not reflect a static structure but directs actions, actions that have
>> immediate consequences _while_ still reading ahead.
>
> I do not understand why this matters here? Doesn’t this only matter
> while we are parsing the file?

You won't get far without parsing the file.

> I understand that delayed scheme calls to variables defined in the
> subfile poses some challenge, but such things should be rather
> uncommon.

Feel free to create an implementation.  That will apparently be easier
than to prove viability to me.

-- 
David Kastrup



Re: \include inside function

2022-02-01 Thread Jean Abou Samra

Le 01/02/2022 à 23:14, Jean Abou Samra a écrit :

Well, if you are ready to get evil, you can do

\version "2.23.5"

includeNamespace =
#(define-scheme-function (filename) (string?)
   (let ((new-parser (ly:parser-clone)))
 (ly:parser-parse-string
  new-parser
  (format #f "\\include ~s" filename))
 (define-music-function (name) (symbol?)



Whoops! This one should rather be
define-scheme-function to allow lookup of arbitrary
values and not just music.




Re: \include inside function

2022-02-01 Thread Valentin Petzel
> Since you removed every single bit of context, it's not even possible to
> say anymore what you want to be talking about.

But I’ve been saying this since the beginning. The idea would be to have a way 
to parse a ly file (or a string) within a different scope, and then make the 
scope accessible from the root document as scheme structure. It might not be 
viable, but surely not impossible.

Valentin

signature.asc
Description: This is a digitally signed message part.


Re: \include inside function

2022-02-01 Thread Jean Abou Samra

Le 01/02/2022 à 20:10, Valentin Petzel a écrit :

Hello David,

An assignment basically adds a pair (symbol, value) to some assignment table.
So shouldn’t it be possible to parse a file with a new assignment table and
then convert this assignment table into a scheme accessible structure?

I do not mean to say that assignments should not be performed, but that they
should be performed in a different scope, which we then make accessible from
the original scope.

This could also enable some sort of name-spacing. Let’s say we have different
Ly files that were not written with name-spacing in mind and then we want to do
a project to combine these. Then instead of needing to rename assignment in
one file we could do something like

fileA = \include "fileA.ly"
\fileA.score

or something, whatever.



Well, if you are ready to get evil, you can do

\version "2.23.5"

includeNamespace =
#(define-scheme-function (filename) (string?)
   (let ((new-parser (ly:parser-clone)))
 (ly:parser-parse-string
  new-parser
  (format #f "\\include ~s" filename))
 (define-music-function (name) (symbol?)
   (with-fluid* (@@ (lily) %parser)
    new-parser
    (lambda ()
  (ly:parser-lookup name))

tmp = \includeNamespace "/home/jean/tmp/tmp.ly"

{ \tmp var }


For some reason that I don't have the time to figure
out, this requires a development version.

Jean




Re: \include inside function

2022-02-01 Thread Valentin Petzel
> That's just wild handwaving.  Something like
> 
> bing = cis'
> bing = { $bing 2-2 }
> \score {
>   \bing
> }
> 
> does not resolve in such a manner since the _structure_ of the
> expression containing $bing cannot be resolved without knowing the type
> of bing at the time $bing is encountered.  You cannot postpone
> assignments when parsing at the top level file level.

Yes, but I do not understand how this would be a problem? I’m not at all 
talking about postponing assignment.

> > I do not mean to say that assignments should not be performed, but
> > that they should be performed in a different scope, which we then make
> > accessible from the original scope.
> 
> That has nothing whatsoever to do with parsing and parsing structures.

Yes it does. Lilypond appears to handle this in the symbol definition and 
lookup in the lexer, but still it is part of what a parser needs to do.

signature.asc
Description: This is a digitally signed message part.


Re: Delay for list posts to arrive

2022-02-01 Thread Aaron Hill

On 2022-02-01 2:50 pm, Jean Abou Samra wrote:

Lately I've found myself a couple times duplicating answers
already provided on this list by others up to almost three
hours earlier because I had not received these replies yet.
Now the little delay for posts to get in inboxes is a quirk
inherent to mailing lists, but three hours seems a bit much.
I'm wondering: are others experiencing this as well?


Yes.  Though it is inconsistent.

Check the timestamps in the email headers.  This tends to be what I see:

- Original sender's mail goes from their server to the eggs.gnu.org (the 
spam filter, IIUC).

- eggs.gnu.org processes the mail and hands it off to lists.gnu.org.
- The email goes from "localhost" (?) to lists.gnu.org.  [This is where 
the delay usually happens.]

- My mail server gets the email from lists.gnu.org.


-- Aaron Hill



Re: \include inside function

2022-02-01 Thread David Kastrup
Valentin Petzel  writes:

> Hello David,
>
> An assignment basically adds a pair (symbol, value) to some assignment table. 
> So shouldn’t it be possible to parse a file with a new assignment table and 
> then convert this assignment table into a scheme accessible structure?

That's just wild handwaving.  Something like

bing = cis'
bing = { $bing 2-2 }
\score {
  \bing
}

does not resolve in such a manner since the _structure_ of the
expression containing $bing cannot be resolved without knowing the type
of bing at the time $bing is encountered.  You cannot postpone
assignments when parsing at the top level file level.

> I do not mean to say that assignments should not be performed, but
> that they should be performed in a different scope, which we then make
> accessible from the original scope.

That has nothing whatsoever to do with parsing and parsing structures.

> This could also enable some sort of name-spacing. Let’s say we have different 
> Ly files that were not written with name-spacing in mind and then we want to 
> do 
> a project to combine these. Then instead of needing to rename assignment in 
> one file we could do something like
>
> fileA = \include "fileA.ly"
> \fileA.score
>
> or something, whatever.

Indeed, whatever all over.

-- 
David Kastrup



PDF bookmark questions

2022-02-01 Thread Nate Whetsell
I’m trying to add PDF bookmarks (to display in PDF readers) to a collection of 
studies. I’m having three issues:

1. If several studies appear on the same page, the bookmarks appear in reverse 
order.

2. The bookmarks seem to navigate to the *page* on which a study appears, not 
the study itself.

3. It doesn’t seem to be possible to add PDF bookmarks without also using 
`\markuplist \table-of-contents` to add a table of content.

Below is an example illustrating the issues I’m having. Is there a way to 
create PDF bookmarks without using `\markuplist \table-of-contents`, have them 
appear in the expected order, and have them navigate to the expected position?

Thanks,
Nate

```
\version "2.22.0"

\book {
  \markuplist \table-of-contents

  #(do ((study-number 1 (1+ study-number)))
  ((> study-number 15))
(let ((header (make-module)))
  (module-define! header 'piece (number->string study-number))
  (let* (
  (score (scorify-music #{
\new Staff <<
  \tocItem \markup { #(number->string study-number) }
  \new Voice { c' }
>>
  #})))
(begin
  (ly:score-set-header! score header)
  (add-score score)
}
```


Re: \include inside function

2022-02-01 Thread Valentin Petzel
> And it still breaks down because at the top level, LilyPond input does
> not reflect a static structure but directs actions, actions that have
> immediate consequences _while_ still reading ahead.

I do not understand why this matters here? Doesn’t this only matter while we 
are parsing the file? I understand that delayed scheme calls to variables 
defined in the subfile poses some challenge, but such things should be rather 
uncommon.

Valentin

signature.asc
Description: This is a digitally signed message part.


Delay for list posts to arrive

2022-02-01 Thread Jean Abou Samra

Hi,

Lately I've found myself a couple times duplicating answers
already provided on this list by others up to almost three
hours earlier because I had not received these replies yet.
Now the little delay for posts to get in inboxes is a quirk
inherent to mailing lists, but three hours seems a bit much.
I'm wondering: are others experiencing this as well?

Thanks,
Jean




Re: help!

2022-02-01 Thread Jean Abou Samra




Le 01/02/2022 à 18:34, Valentin Petzel a écrit :

Thank you. As it seems prior to 2.23 the Volta Bracket engraver would override
the text property even if you had manually specified this. So we can either
directly modify this in the repeat command (which I consider a bit ugly), or
try some workaround like this: (Basically this checks if details.text is set
and sets text to details.text if so before calculating the stencil):

\version "2.22"

{
   \override Score.VoltaBracket.stencil =
   #(lambda (grob)
  (let* ((det (ly:grob-property grob 'details))
 (det-text (assoc-get 'text det #f)))
(if (markup? det-text)
(ly:grob-set-property! grob 'text det-text))
(ly:volta-bracket-interface::print grob)))
   \repeat volta 2 {
 c' d' e' f'
   }
   \alternative {
 {
   \once\override Score.VoltaBracket.details.text = \markup\smaller"bla
bla"
   \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
   g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno"
 }
 {
   \once\override Score.VoltaBracket.details.text = \markup\smaller"blu
blu"
   \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
   c'1
 }
   }
}



Or use:

\version "2.22"

{
  \repeat volta 2 {
    c' d' e' f'
  }
  \alternative {
    {
  \overrideProperty Score.VoltaBracket.text \markup\smaller"bla bla"
  \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
  g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno"
    }
    {
  \overrideProperty Score.VoltaBracket.text \markup\smaller"blu blu"
  \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
  c'1
    }
  }
}


\overrideProperty is the typical workaround for this
kind of issue as it operates later than \override
(at engraver acknowledge time) and thus can override
decisions made in the meantime.

Best,
Jean





Re: \include inside function

2022-02-01 Thread David Kastrup
Valentin Petzel  writes:

>> Since you removed every single bit of context, it's not even possible to
>> say anymore what you want to be talking about.
>
> But I’ve been saying this since the beginning. The idea would be to have a 
> way 
> to parse a ly file (or a string) within a different scope, and then make the 
> scope accessible from the root document as scheme structure. It might not be 
> viable, but surely not impossible.

And it still breaks down because at the top level, LilyPond input does
not reflect a static structure but directs actions, actions that have
immediate consequences _while_ still reading ahead.

-- 
David Kastrup



Re: \include inside function

2022-02-01 Thread David Kastrup
Valentin Petzel  writes:

>> That's just wild handwaving.  Something like
>> 
>> bing = cis'
>> bing = { $bing 2-2 }
>> \score {
>>   \bing
>> }
>> 
>> does not resolve in such a manner since the _structure_ of the
>> expression containing $bing cannot be resolved without knowing the type
>> of bing at the time $bing is encountered.  You cannot postpone
>> assignments when parsing at the top level file level.
>
> Yes, but I do not understand how this would be a problem? I’m not at all 
> talking about postponing assignment.

Since you removed every single bit of context, it's not even possible to
say anymore what you want to be talking about.

-- 
David Kastrup



Re: help!

2022-02-01 Thread Valentin Petzel
Thank you. As it seems prior to 2.23 the Volta Bracket engraver would override 
the text property even if you had manually specified this. So we can either 
directly modify this in the repeat command (which I consider a bit ugly), or 
try some workaround like this: (Basically this checks if details.text is set 
and sets text to details.text if so before calculating the stencil):

\version "2.22"

{
  \override Score.VoltaBracket.stencil =
  #(lambda (grob)
 (let* ((det (ly:grob-property grob 'details))
(det-text (assoc-get 'text det #f)))
   (if (markup? det-text)
   (ly:grob-set-property! grob 'text det-text))
   (ly:volta-bracket-interface::print grob)))
  \repeat volta 2 {
c' d' e' f'
  }
  \alternative {
{
  \once\override Score.VoltaBracket.details.text = \markup\smaller"bla 
bla"
  \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
  g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno"
}
{
  \once\override Score.VoltaBracket.details.text = \markup\smaller"blu 
blu"
  \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
  c'1
}
  }
}


Am Dienstag, 1. Februar 2022, 17:18:41 CET schrieb Виноградов Юрий:
> Okey!
>  
> \version "2.22.0"
>  
>  
> С уважением,
> Виноградов Юрий.
>  
>  
>  
> 01.02.2022, 19:15, "Valentin Petzel" :
> Your mailing programm might have an option to reply to all recipients, or
> you can simply add lilypond-user@gnu.org to the recipients.
> 
> For finding the problem: What Lilypond version are you on?
> 
> Cheers,
> Valentin
>  
> 
> 01.02.2022 16:52:13 Виноградов Юрий :
> 
> Hello. Here is your code. He does not write a text in volta. Check with
> yourself. I copy it completely as it is.  I'm sorry, I didn't understand
> how I could do this - Please keep lust in the addresses. 
> {
>   \repeat volta 2 {
> c' d' e' f'
>   }
>   \alternative {
> {
>   \once\override Score.VoltaBracket.text = \markup\smaller"bla bla"
>   \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
>   g' a' b' c'' \mark\markup { \smaller\smaller\musicglyph
> #"scripts.segno" } }
> {
>   \once\override Score.VoltaBracket.text = \markup\smaller"blu blu"
>   \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
>   c'1
> }
>   }
> }
>  
> С уважением,
> Виноградов Юрий.
>  
>  
>  
> 01.02.2022, 18:29, "Valentin Petzel" :
> Please keep the list in the addressates.
> 
> VoltaBracket should not have a space in between. If you do have that, can
> you tell if this outputs ans error?
> 
> Valentin
>  
> 
> 01.02.2022 15:58:25 Виноградов Юрий :
> 
> Hello. I figured out the sign. It helped. And that part of the code "
> \once\override Score.Volta Bracket.text = \markup\smaller"bla bla" " This
> part of the code does not work. You can offer another option. Thank you for
> your help! 
>  
> С уважением,
> Виноградов Юрий.
>  
>  
>  
> 01.02.2022, 11:52, "Valentin Petzel" :
> 
> Also if you want to get the text in the brackets you can do it like this:
> 
> {
>   \repeat volta 2 {
> c' d' e' f'
>   }
>   \alternative {
> {
>   \once\override Score.VoltaBracket.text = \markup\smaller"bla bla"
>   \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
>   g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno"
> }
> {
>   \once\override Score.VoltaBracket.text = \markup\smaller"blu blu"
>   \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
>   c'1
> }
>   }
> }
> 
> Cheers,
> Valentin
> 
> Am Dienstag, 1. Februar 2022, 09:24:21 CET schrieb Valentin Petzel:
> 
>  Hello Виноградов,
>  
>  Maybe this could do the trick?
>  
>  {
>\repeat volta 2 {
>  c' d' e' f'
>}
>\alternative {
>  {
>\once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
>g' a' b' c'' \mark\markup\smaller\musicglyph #"scripts.segno"
>  }
>  {
>\once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
>c'1
>  }
>}
>  }
>  
>  Cheers,
>  Valentin
>  
>  Am Montag, 31. Jänner 2022, 16:55:43 CET schrieb Виноградов Юрий:
>  > Hello. Help please. I have two volts of repetition. You need to put a
>  > segno
>  > sign between them. Example on the screenshot. I am grateful to you in
>  > advance.
>  >
>  >
>  > С уважением,
>  > Виноградов Юрий.

signature.asc
Description: This is a digitally signed message part.


Re: \include inside function

2022-02-01 Thread Valentin Petzel
Hello Leo,

Here are two ways to do it, one by using \include and one directly parsing the 
contents of the file.

Cheers,
Valentin

Am Dienstag, 1. Februar 2022, 16:09:01 CET schrieb Leo Correia de Verdier:
> Dear list!
> 
> Is there a way to have an \include inside a function?
> In the attached file includeinfunction.ly the commented out line doesn’t
> work (probably for some very logical reason, but still unknown to me). Is
> there a way to work around that and have includes inside functions?
> 
> (The function in this case is indeed meaningless, in my real use case the
> function will hopefully construct midi files from the variables in the
> included files combined in different ways)
> 
> Thanks a lot!
> 
> /Leo\version "2.23.3"

music = { b1 }\version "2.23.3"

includeFunction = #(define-void-function (filename) (string?)
 (ly:parser-parse-string (ly:parser-clone) (ly:gulp-file filename)))

%% or alternatively

includeFunctionB = #(define-void-function (filename) (string?)
 (ly:parser-parse-string (ly:parser-clone) (format "\\include \"~a\"" filename)))

%\include "includetest.ily"

\includeFunction "includetest.ily"

\score { \music }

signature.asc
Description: This is a digitally signed message part.


Re: \include inside function

2022-02-01 Thread Valentin Petzel
Hello David,

An assignment basically adds a pair (symbol, value) to some assignment table. 
So shouldn’t it be possible to parse a file with a new assignment table and 
then convert this assignment table into a scheme accessible structure?

I do not mean to say that assignments should not be performed, but that they 
should be performed in a different scope, which we then make accessible from 
the original scope.

This could also enable some sort of name-spacing. Let’s say we have different 
Ly files that were not written with name-spacing in mind and then we want to do 
a project to combine these. Then instead of needing to rename assignment in 
one file we could do something like

fileA = \include "fileA.ly"
\fileA.score

or something, whatever.

Cheers,
Valentin

Am Dienstag, 1. Februar 2022, 19:39:20 CET schrieb David Kastrup:
> Valentin Petzel  writes:
> > Hi David!
> > 
> > I suppose it might be useful to have something like a parsing function
> > that does parse a file internally, but returns a scheme structure
> > containing all variables, functions, scores, books, whatever defined
> > in that file. This would make using stuff in a different file much
> > more clean than the current include method.
> 
> That's not possible because things like assignments aren't structure but
> action, and the subsequent interpretation of the file may well depend on
> those assignments being executed.

signature.asc
Description: This is a digitally signed message part.


Re: \include inside function

2022-02-01 Thread David Kastrup
Valentin Petzel  writes:

> Hi David!
>
> I suppose it might be useful to have something like a parsing function
> that does parse a file internally, but returns a scheme structure
> containing all variables, functions, scores, books, whatever defined
> in that file. This would make using stuff in a different file much
> more clean than the current include method.

That's not possible because things like assignments aren't structure but
action, and the subsequent interpretation of the file may well depend on
those assignments being executed.


-- 
David Kastrup



Re: \include inside function

2022-02-01 Thread Valentin Petzel
Hi David!

I suppose it might be useful to have something like a parsing function that 
does parse a file internally, but returns a scheme structure containing all 
variables, functions, scores, books, whatever defined in that file. This would 
make using stuff in a different file much more clean than the current include 
method.

Cheers,
Valentin

Am Dienstag, 1. Februar 2022, 17:33:13 CET schrieb David Kastrup:
> Leo Correia de Verdier  writes:
> > Dear list!
> > 
> > Is there a way to have an \include inside a function?
> > In the attached file includeinfunction.ly the commented out line
> > doesn’t work (probably for some very logical reason, but still unknown
> > to me).
> 
> Uh, if you write the content of the included file _exactly_ where
> \include #filename now is, you get _exactly_ the same error.  Your
> inclusion works perfectly fine.  It's just that the syntax in the file
> is not valid syntax inside of #{ ... #}.
> 
> If you want to include the file instead at the _top_ level, try
> 
> includeFunction = #(define-void-function (filename) (string?)
>  (ly:parser-include-string (format "\\include ~s"
> filename)))
> 
> However, depending on the context you use this in, you might get
> surprised by just _when_ the inclusion happens.
> 
> > Is there a way to work around that and have includes inside functions?
> > 
> > (The function in this case is indeed meaningless, in my real use case
> > the function will hopefully construct midi files from the variables in
> > the included files combined in different ways)
> > 
> > Thanks a lot!
> > 
> > /Leo
> > 
> > \version "2.23.3"
> > 
> > includeFunction = #(define-void-function (filename) (string?)
> > 
> >  #{ \include #filename #} )
> > 
> > \include "includetest.ily"
> > 
> > % \includeFunction "includetest.ily"
> > 
> > \score { \music }

signature.asc
Description: This is a digitally signed message part.


Re: help!

2022-02-01 Thread Виноградов Юрий
Thanks. Everything worked out.  С уважением,Виноградов Юрий.   01.02.2022, 20:34, "Valentin Petzel" :Thank you. As it seems prior to 2.23 the Volta Bracket engraver would overridethe text property even if you had manually specified this. So we can eitherdirectly modify this in the repeat command (which I consider a bit ugly), ortry some workaround like this: (Basically this checks if details.text is setand sets text to details.text if so before calculating the stencil):\version "2.22"{  \override Score.VoltaBracket.stencil =  #(lambda (grob) (let* ((det (ly:grob-property grob 'details))(det-text (assoc-get 'text det #f)))   (if (markup? det-text)   (ly:grob-set-property! grob 'text det-text))   (ly:volta-bracket-interface::print grob)))  \repeat volta 2 {c' d' e' f'  }  \alternative {{  \once\override Score.VoltaBracket.details.text = \markup\smaller"blabla"  \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)  g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno"}{  \once\override Score.VoltaBracket.details.text = \markup\smaller"blublu"  \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)  c'1}  }}Am Dienstag, 1. Februar 2022, 17:18:41 CET schrieb Виноградов Юрий: Okey!   \version "2.22.0" С уважением, Виноградов Юрий.   01.02.2022, 19:15, "Valentin Petzel" : Your mailing programm might have an option to reply to all recipients, or you can simply add lilypond-user@gnu.org to the recipients.  For finding the problem: What Lilypond version are you on?  Cheers, Valentin01.02.2022 16:52:13 Виноградов Юрий :  Hello. Here is your code. He does not write a text in volta. Check with yourself. I copy it completely as it is. I'm sorry, I didn't understand how I could do this - Please keep lust in the addresses. {   \repeat volta 2 { c' d' e' f'   }   \alternative { {   \once\override Score.VoltaBracket.text = \markup\smaller"bla bla"   \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)   g' a' b' c'' \mark\markup { \smaller\smaller\musicglyph #"scripts.segno" } } {   \once\override Score.VoltaBracket.text = \markup\smaller"blu blu"   \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)   c'1 }   } }   С уважением, Виноградов Юрий.   01.02.2022, 18:29, "Valentin Petzel" : Please keep the list in the addressates.  VoltaBracket should not have a space in between. If you do have that, can you tell if this outputs ans error?  Valentin01.02.2022 15:58:25 Виноградов Юрий :  Hello. I figured out the sign. It helped. And that part of the code " \once\override Score.Volta Bracket.text = \markup\smaller"bla bla" " This part of the code does not work. You can offer another option. Thank you for your help!   С уважением, Виноградов Юрий.   01.02.2022, 11:52, "Valentin Petzel" :  Also if you want to get the text in the brackets you can do it like this:  {   \repeat volta 2 { c' d' e' f'   }   \alternative { {   \once\override Score.VoltaBracket.text = \markup\smaller"bla bla"   \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)   g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno" } {   \once\override Score.VoltaBracket.text = \markup\smaller"blu blu"   \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)   c'1 }   } }  Cheers, Valentin  Am Dienstag, 1. Februar 2022, 09:24:21 CET schrieb Valentin Petzel:   Hello Виноградов,Maybe this could do the trick?{\repeat volta 2 {  c' d' e' f'}\alternative {  {\once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)g' a' b' c'' \mark\markup\smaller\musicglyph #"scripts.segno"  }  {\once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)c'1  }}  }Cheers,  ValentinAm Montag, 31. Jänner 2022, 16:55:43 CET schrieb Виноградов Юрий:  > Hello. Help please. I have two volts of repetition. You need to put a  > segno  > sign between them. Example on the screenshot. I am grateful to you in  > advance.  >  >  > С уважением,  > Виноградов Юрий.

Re: \include inside function

2022-02-01 Thread David Wright
On Tue 01 Feb 2022 at 16:09:01 (+0100), Leo Correia de Verdier wrote:
> 
> Is there a way to have an \include inside a function?
> In the attached file includeinfunction.ly the commented out line doesn’t work 
> (probably for some very logical reason, but still unknown to me). Is there a 
> way to work around that and have includes inside functions?

NR § 3.1.5 File structure

At any point in a file, any of the following /lexical/ instructions can be 
entered:
• \version
• \include
[ … ]

(my emphasis)

So it's not going to work, because you can't "call" it.
It just inserts the contents of the file at that point.

Cheers,
David.



Re: \include inside function

2022-02-01 Thread David Kastrup
Leo Correia de Verdier  writes:

> Dear list!
>
> Is there a way to have an \include inside a function?
> In the attached file includeinfunction.ly the commented out line
> doesn’t work (probably for some very logical reason, but still unknown
> to me).

Uh, if you write the content of the included file _exactly_ where
\include #filename now is, you get _exactly_ the same error.  Your
inclusion works perfectly fine.  It's just that the syntax in the file
is not valid syntax inside of #{ ... #}.

If you want to include the file instead at the _top_ level, try

includeFunction = #(define-void-function (filename) (string?)
 (ly:parser-include-string (format "\\include ~s" 
filename)))

However, depending on the context you use this in, you might get
surprised by just _when_ the inclusion happens.

> Is there a way to work around that and have includes inside functions?
>
> (The function in this case is indeed meaningless, in my real use case
> the function will hopefully construct midi files from the variables in
> the included files combined in different ways)
>
> Thanks a lot!
>
> /Leo
>
> \version "2.23.3"
>
> includeFunction = #(define-void-function (filename) (string?)
>  #{ \include #filename #} )
>
> \include "includetest.ily"
>
> % \includeFunction "includetest.ily"
>
> \score { \music }
>
>

-- 
David Kastrup



Re: help!

2022-02-01 Thread Виноградов Юрий
Okey! \version "2.22.0"  С уважением,Виноградов Юрий.   01.02.2022, 19:15, "Valentin Petzel" :Your mailing programm might have an option to reply to all recipients, or you can simply add lilypond-user@gnu.org to the recipients.For finding the problem: What Lilypond version are you on?Cheers,Valentin 01.02.2022 16:52:13 Виноградов Юрий :Hello. Here is your code. He does not write a text in volta. Check with yourself. I copy it completely as it is. I'm sorry, I didn't understand how I could do this - Please keep lust in the addresses. {  \repeat volta 2 {    c' d' e' f'  }  \alternative {    {      \once\override Score.VoltaBracket.text = \markup\smaller"bla bla"      \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)      g' a' b' c'' \mark\markup { \smaller\smaller\musicglyph #"scripts.segno" }    }    {      \once\override Score.VoltaBracket.text = \markup\smaller"blu blu"      \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)      c'1    }  }} С уважением,Виноградов Юрий.   01.02.2022, 18:29, "Valentin Petzel" :Please keep the list in the addressates.VoltaBracket should not have a space in between. If you do have that, can you tell if this outputs ans error?Valentin 01.02.2022 15:58:25 Виноградов Юрий :Hello. I figured out the sign. It helped. And that part of the code " \once\override Score.Volta Bracket.text = \markup\smaller"bla bla" " This part of the code does not work. You can offer another option. Thank you for your help!  С уважением,Виноградов Юрий.   01.02.2022, 11:52, "Valentin Petzel" :Also if you want to get the text in the brackets you can do it like this:{  \repeat volta 2 {c' d' e' f'  }  \alternative {{  \once\override Score.VoltaBracket.text = \markup\smaller"bla bla"  \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)  g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno"}{  \once\override Score.VoltaBracket.text = \markup\smaller"blu blu"  \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)  c'1}  }}Cheers,ValentinAm Dienstag, 1. Februar 2022, 09:24:21 CET schrieb Valentin Petzel: Hello Виноградов,  Maybe this could do the trick?  {   \repeat volta 2 { c' d' e' f'   }   \alternative { {   \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)   g' a' b' c'' \mark\markup\smaller\musicglyph #"scripts.segno" } {   \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)   c'1 }   } }  Cheers, Valentin  Am Montag, 31. Jänner 2022, 16:55:43 CET schrieb Виноградов Юрий: > Hello. Help please. I have two volts of repetition. You need to put a > segno > sign between them. Example on the screenshot. I am grateful to you in > advance. > > > С уважением, > Виноградов Юрий.

Re: help!

2022-02-01 Thread Valentin Petzel
Your mailing programm might have an option to reply to all recipients, or you 
can simply add lilypond-user@gnu.org to the recipients.

For finding the problem: What Lilypond version are you on?

Cheers,
Valentin

01.02.2022 16:52:13 Виноградов Юрий :

> Hello. Here is your code. He does not write a text in volta. Check with 
> yourself. I copy it completely as it is. 
> I'm sorry, I didn't understand how I could do this - Please keep lust in the 
> addresses.
>  
> {
>   \repeat volta 2 {
>     c' d' e' f'
>   }
>   \alternative {
>     {
>       \once\override Score.VoltaBracket.text = \markup\smaller"bla bla"
>       \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
>       g' a' b' c'' \mark\markup { \smaller\smaller\musicglyph 
> #"scripts.segno" }
>     }
>     {
>       \once\override Score.VoltaBracket.text = \markup\smaller"blu blu"
>       \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
>       c'1
>     }
>   }
> }
>  
> С уважением,
> Виноградов Юрий.
>  
>  
>  
> 01.02.2022, 18:29, "Valentin Petzel" :
> Please keep the list in the addressates.
> 
> VoltaBracket should not have a space in between. If you do have that, can you 
> tell if this outputs ans error?
> 
> Valentin
>  
> 
> 01.02.2022 15:58:25 Виноградов Юрий :
> 
> Hello. I figured out the sign. It helped. And that part of the code " 
> \once\override Score.Volta Bracket.text = \markup\smaller"bla bla" " This 
> part of the code does not work. You can offer another option. Thank you for 
> your help!
>  
>  
> С уважением,
> Виноградов Юрий.
>  
>  
>  
> 01.02.2022, 11:52, "Valentin Petzel" :
> 
> Also if you want to get the text in the brackets you can do it like this:
> 
> {
>   \repeat volta 2 {
> c' d' e' f'
>   }
>   \alternative {
> {
>   \once\override Score.VoltaBracket.text = \markup\smaller"bla bla"
>   \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
>   g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno"
> }
> {
>   \once\override Score.VoltaBracket.text = \markup\smaller"blu blu"
>   \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
>   c'1
> }
>   }
> }
> 
> Cheers,
> Valentin
> 
> Am Dienstag, 1. Februar 2022, 09:24:21 CET schrieb Valentin Petzel:
> 
>  Hello Виноградов,
>  
>  Maybe this could do the trick?
>  
>  {
>    \repeat volta 2 {
>  c' d' e' f'
>    }
>    \alternative {
>  {
>    \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
>    g' a' b' c'' \mark\markup\smaller\musicglyph #"scripts.segno"
>  }
>  {
>    \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
>    c'1
>  }
>    }
>  }
>  
>  Cheers,
>  Valentin
>  
>  Am Montag, 31. Jänner 2022, 16:55:43 CET schrieb Виноградов Юрий:
>  > Hello. Help please. I have two volts of repetition. You need to put a
>  > segno
>  > sign between them. Example on the screenshot. I am grateful to you in
>  > advance.
>  >
>  >
>  > С уважением,
>  > Виноградов Юрий.


Re: help!

2022-02-01 Thread Valentin Petzel
Please keep the list in the addressates.

VoltaBracket should not have a space in between. If you do have that, can you 
tell if this outputs ans error?

Valentin

01.02.2022 15:58:25 Виноградов Юрий :

> Hello. I figured out the sign. It helped. And that part of the code " 
> \once\override Score.Volta Bracket.text = \markup\smaller"bla bla" " This 
> part of the code does not work. You can offer another option. Thank you for 
> your help!
>  
>  
> С уважением,
> Виноградов Юрий.
>  
>  
>  
> 01.02.2022, 11:52, "Valentin Petzel" :
> 
> Also if you want to get the text in the brackets you can do it like this:
> 
> {
>   \repeat volta 2 {
> c' d' e' f'
>   }
>   \alternative {
> {
>   \once\override Score.VoltaBracket.text = \markup\smaller"bla bla"
>   \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
>   g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno"
> }
> {
>   \once\override Score.VoltaBracket.text = \markup\smaller"blu blu"
>   \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
>   c'1
> }
>   }
> }
> 
> Cheers,
> Valentin
> 
> Am Dienstag, 1. Februar 2022, 09:24:21 CET schrieb Valentin Petzel:
> 
>  Hello Виноградов,
>  
>  Maybe this could do the trick?
>  
>  {
>    \repeat volta 2 {
>  c' d' e' f'
>    }
>    \alternative {
>  {
>    \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
>    g' a' b' c'' \mark\markup\smaller\musicglyph #"scripts.segno"
>  }
>  {
>    \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
>    c'1
>  }
>    }
>  }
>  
>  Cheers,
>  Valentin
>  
>  Am Montag, 31. Jänner 2022, 16:55:43 CET schrieb Виноградов Юрий:
>  > Hello. Help please. I have two volts of repetition. You need to put a
>  > segno
>  > sign between them. Example on the screenshot. I am grateful to you in
>  > advance.
>  >
>  >
>  > С уважением,
>  > Виноградов Юрий.


\include inside function

2022-02-01 Thread Leo Correia de Verdier
Dear list!

Is there a way to have an \include inside a function?
In the attached file includeinfunction.ly the commented out line doesn’t work 
(probably for some very logical reason, but still unknown to me). Is there a 
way to work around that and have includes inside functions?

(The function in this case is indeed meaningless, in my real use case the 
function will hopefully construct midi files from the variables in the included 
files combined in different ways)

Thanks a lot!

/Leo


includeinfunction.ly
Description: Binary data


includetest.ily
Description: Binary data


Re: help!

2022-02-01 Thread Valentin Petzel
Also if you want to get the text in the brackets you can do it like this:

{
  \repeat volta 2 {
c' d' e' f'
  }
  \alternative {
{
  \once\override Score.VoltaBracket.text = \markup\smaller"bla bla"
  \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
  g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno"
}
{
  \once\override Score.VoltaBracket.text = \markup\smaller"blu blu"
  \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
  c'1
}
  }
}

Cheers,
Valentin

Am Dienstag, 1. Februar 2022, 09:24:21 CET schrieb Valentin Petzel:
> Hello Виноградов,
> 
> Maybe this could do the trick?
> 
> {
>   \repeat volta 2 {
> c' d' e' f'
>   }
>   \alternative {
> {
>   \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
>   g' a' b' c'' \mark\markup\smaller\musicglyph #"scripts.segno"
> }
> {
>   \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
>   c'1
> }
>   }
> }
> 
> Cheers,
> Valentin
> 
> Am Montag, 31. Jänner 2022, 16:55:43 CET schrieb Виноградов Юрий:
> > Hello. Help please. I have two volts of repetition. You need to put a
> > segno
> > sign between them. Example on the screenshot. I am grateful to you in
> > advance.
> > 
> > 
> > С уважением,
> > Виноградов Юрий.

signature.asc
Description: This is a digitally signed message part.


Re: help!

2022-02-01 Thread Valentin Petzel
Hello Виноградов,

Maybe this could do the trick?

{
  \repeat volta 2 {
c' d' e' f'
  }
  \alternative {
{
  \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1)
  g' a' b' c'' \mark\markup\smaller\musicglyph #"scripts.segno"
}
{
  \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1)
  c'1
}
  }
}

Cheers,
Valentin

Am Montag, 31. Jänner 2022, 16:55:43 CET schrieb Виноградов Юрий:
> Hello. Help please. I have two volts of repetition. You need to put a segno
> sign between them. Example on the screenshot. I am grateful to you in
> advance.
>  
>  
> С уважением,
> Виноградов Юрий.
>  

signature.asc
Description: This is a digitally signed message part.


Re: help!

2022-02-01 Thread Виноградов Юрий
Okey.Юрий Виноградов10:36, 1 февраля 2022 г., Jacques Menu :Hello Виноградов,It will be easier for the people on this list to help you if you provide a minial working example (MWE).JM Le 31 janv. 2022 à 16:55, Виноградов Юрий  a écrit :  Hello. Help please. I have two volts of repetition. You need to put a segno sign between them. Example on the screenshot. I am grateful to you in advance. С уважением, Виноградов Юрий.   



Re: help!

2022-02-01 Thread Pierre Perol-Schneider

  
  
Hi,
How about:


\version "2.23.5"
  
  \paper { ragged-right = ##f }
  
  voltaA = \markup\large { \text "Для повторения" }
  voltaB = \markup\large { \text "Для окончания" }
  
  \score {
    \new Staff 
    \with { \omit Clef \omit TimeSignature \autoBeamOff } 
    \fixed c' <<
      \new Voice { 
    \voiceOne \time 2/4
    \repeat volta 2 {
      s2*3
      \override Score.VoltaBracket.shorten-pair = #'(0 . 2)
      \set Score.repeatCommands = #(list (list 'volta voltaA)
  'start-repeat)
      { b4 f8 g e2 \mark\markup\musicglyph #"scripts.segno" }
      \override Score.VoltaBracket.shorten-pair = #'(3 . 0)
      \set Score.repeatCommands = #(list (list 'volta voltaB)
  'end-repeat)
      { b4 cis'8 dis' e'2 \fermata \bar "|." }
      \set Score.repeatCommands = #'((volta #f))
    }
      }
      \new Voice { 
    \voiceTwo
    \repeat volta 2 {
      s2*3
      \alternative {
    { g4 f8 g e2 }
    { g4 b8 a g2 \fermata }
      }
    }
      }
    >>
    \layout {}
  }


Cheers,
Pierre


Le 31/01/2022 à 16:55, Виноградов Юрий
  a écrit :


  
  
Hello. Help please. I have two volts of repetition. You
  need to put a segno sign between them. Example on the
  screenshot.
I am grateful to you in advance.
  
   
   
  С уважением,
  Виноградов Юрий.
   

  




Re: Want "Fine" to be right adjacent to the 3rd beat bar line (2/2), not to the left

2022-02-01 Thread Valentin Petzel
Hi Ken,

Your screenshots are of limited use, as they fail to explain which one is the 
behaviour you want. Thus I’ve created an example for you demonstrating both.

\paper {
  ragged-right = ##f
}

{
  \time 3/4
  s2.*2 2.^\markup\italic"Fine"
}

{
  \time 3/4
  s2.*2 2.
  \tweak self-alignment-X #RIGHT
  \tweak break-visibility #begin-of-line-invisible
  \mark\markup\smaller\smaller\italic"Fine"
}

Cheers,
Valentin

Am Dienstag, 1. Februar 2022, 04:09:49 CET schrieb Kenneth Wolcott:
> HI;
> 
>   I want the "Fine" to be right adjacent to the 3rd beat bar line
> (2/2), not aligned to the left (previous) bar line.
> 
>   Please see the attached screenshots.
> 
> Thanks,
> Ken Wolcott

signature.asc
Description: This is a digitally signed message part.