Re: Removing (or not) empty staves

2023-01-17 Thread Xavier Scheuer
On Wed, 18 Jan 2023 at 04:12, Ralph Palmer 
wrote:
>
> Hi -
>
> Thanks for all your work, for helping users, and for LilyPond itself.
I've been using LilyPond and Frescobaldi for a long time, mostly on
Linux/Ubuntu.
>
> I'm currently running LilyPond 2.24.0 and Frescobaldi 3.2 on Linux/Ubuntu.
>
> I'm trying to transcribe the viola parts for Saint-Saens' Le Deluge for
my personal use, but trying to keep it close to the original. My problem is
that there are 8 lines of score with single staves, and then multiple lines
with Solo and Tutti staves. The first line with two staves has all rests in
the Solo staff. I can get LilyPond to go single staff for the opening, but
I can't get it to do that and keep the first (all rests) line of the Solo
part. I'm attaching a photo of the original score where it switches from
single staff to two staves per system, as well as two .ly files and their
PDFs from my attempts to reproduce the original. It's not a make or break
problem, but I would like to know what I might be doing wrong or what I
might do differently. I'm using \Staff \RemoveEmptyStaves in \context.

Hello,

In that case I would use a Keep_alive_together_engraver and different
VerticalAxisGroup remove-layer values and setting/unsetting
Staff.keepAliveInterfaces where desired.
There is a small example with Violins I & II and separate staves V I and V
II in the documentation.
NR 1.6.2 Modifying single staves > Hiding staves
https://lilypond.org/doc/v2.24/Documentation/notation/modifying-single-staves#hiding-staves

Otherwise if you want to keep your \RemoveEmptyStaves solution you can
cheat and include a transparent note at the beginning of the Andantino
Solo.

Cheers,
Xavier

-- 
Xavier Scheuer 


Re: irrational meters

2023-01-17 Thread David Nalesnik
On Tue, Jan 17, 2023 at 6:47 PM H. S. Teoh via LilyPond user discussion <
lilypond-user@gnu.org> wrote:

> On Tue, Jan 17, 2023 at 07:08:41PM -0500, David Zelinsky wrote:
> > Kieren MacMillan  writes:
> >
> > > Hi Silvain,
> > >
> > >> I wonder about the term “irrational” meter. Should not we say
> > >> “irregular” ??  as in mathematics, an irrational number is a number
> > >> which cannot be represented as a fraction...
> > >
> > > As both a published composer *and* a published number theorist, I
> > > wholeheartedly concur with your intuition — I’ve been pushing for
> > > decades against “irrational” as a descriptor for time signatures
> > > [except where it actually applies, of course, as in π/4].
> > >
> > > “Irregular” is better… but ultimately I prefer “non-dyadic” to
> > > describe any time signature where the bottom number (a.k.a.
> > > “denominator”, a label I also avoid) is not an integer power of 2.
> [...]
> > As another professional number theorist and musician (though not a
> > composer), I also find this use of "irrational" to mean "non-dyadic"
> > very grating.  But I once said as much on the Music Engraving Tips
> > facebook group, and got summarily shot down as ignorant and elitist.
> > The argument, such as it was, held that this is about *music*, not
> > *mathematics*, so there's no reason to adopt mathematicians' quirky
> > terminology.  This left me rather speechless, so I gave up.  However,
> > if I ever have reason to discuss this type of meter, will always call
> > it "non-dyadic".
> [...]
>
> This is off-topic, but it would be interesting if somebody composed a
> piece with an actually irrational meter, like π/4 or 3/π.  Only thing
> is, it would be impossible for human performers to play correctly, since
> there isn't any way to count the beats correctly (counting beats implies
> a rational fraction, since by definition it's impossible to count up to
> an irrational ratio by counting finite parts).


Speaking of non-human performers, you’ll find examples in the player piano
studies of Conlon Nancarrow.

Best,
David


Re: irrational meters

2023-01-17 Thread David Zelinsky
Jean Abou Samra  writes:

> Le 18/01/2023 à 01:29, David Zelinsky a écrit :
>> No, it's really not quirky.  A "rational" number is a ratio of two
>> integers.  An irrational number is one that cannot be so expressed.  The
>> word "ratio" comes from Latin for calculation.  The common english usage
>> of "rational" meaning sensible presumably stems from the ancient Greeks
>> view that only rational numbers make sense.  But the mathematical
>> definition is really more fundamental.  More rational, one might say :)
>
>
> Oh, I was being sarcastic against the fallacious “argument”.
> I know what a rational number is; I've been a math student,
> you know :)


Sorry I missed the sarcasm :)  But in fact it's not an unreasoble
question.  If one thinks the mathematical usage originally came from the
common english usage, then it does seem pretty arbitrary.  I myself had
to think for a second when first presented this argument, to realize
that's not the etymology of the mathematical term.

-David



Re: Spontini-Editor 1.20 released

2023-01-17 Thread Paolo Prete
There is an executable for Linux too.
Download it here:

Spontini-Editor-1.20_alfa-linux_x86_64.tar.gz


then click on SpontiniServer (_not_ SpontiniServer.py) and the program runs
without any installation.



On Wed, Jan 18, 2023 at 2:37 AM Knute Snortum  wrote:

> On Mon, Jan 16, 2023 at 10:07 AM Paolo Prete  wrote:
>
> > You just have to run the executable, not the .py file.
>
> But I'm on Linux.
>
> --
> Knute Snortum
>


Re: Spontini-Editor 1.20 released

2023-01-17 Thread Knute Snortum
On Mon, Jan 16, 2023 at 10:07 AM Paolo Prete  wrote:

> You just have to run the executable, not the .py file.

But I'm on Linux.

--
Knute Snortum



Re: irrational meters

2023-01-17 Thread Saul Tobin
Doesn't "Night Fantasies" by Elliott Carter use an extremely obscure
structural polyrhythm? Not an actual irrational meter but similar idea.

On Tue, Jan 17, 2023 at 4:47 PM H. S. Teoh via LilyPond user discussion <
lilypond-user@gnu.org> wrote:

> On Tue, Jan 17, 2023 at 07:08:41PM -0500, David Zelinsky wrote:
> > Kieren MacMillan  writes:
> >
> > > Hi Silvain,
> > >
> > >> I wonder about the term “irrational” meter. Should not we say
> > >> “irregular” ??  as in mathematics, an irrational number is a number
> > >> which cannot be represented as a fraction...
> > >
> > > As both a published composer *and* a published number theorist, I
> > > wholeheartedly concur with your intuition — I’ve been pushing for
> > > decades against “irrational” as a descriptor for time signatures
> > > [except where it actually applies, of course, as in π/4].
> > >
> > > “Irregular” is better… but ultimately I prefer “non-dyadic” to
> > > describe any time signature where the bottom number (a.k.a.
> > > “denominator”, a label I also avoid) is not an integer power of 2.
> [...]
> > As another professional number theorist and musician (though not a
> > composer), I also find this use of "irrational" to mean "non-dyadic"
> > very grating.  But I once said as much on the Music Engraving Tips
> > facebook group, and got summarily shot down as ignorant and elitist.
> > The argument, such as it was, held that this is about *music*, not
> > *mathematics*, so there's no reason to adopt mathematicians' quirky
> > terminology.  This left me rather speechless, so I gave up.  However,
> > if I ever have reason to discuss this type of meter, will always call
> > it "non-dyadic".
> [...]
>
> This is off-topic, but it would be interesting if somebody composed a
> piece with an actually irrational meter, like π/4 or 3/π.  Only thing
> is, it would be impossible for human performers to play correctly, since
> there isn't any way to count the beats correctly (counting beats implies
> a rational fraction, since by definition it's impossible to count up to
> an irrational ratio by counting finite parts).
>
> But perhaps a more practicable approach is to use an irrational fraction
> as an endless source of diverse beat divisions that has no long-term
> patterns (because another property of an irrational number is that its
> base-n expansion does not produce a repeating sequence).  For example,
> one could take the digits of π (in whatever base one fancies) and use
> that as the number of beats to divide each bar into. In base 10, the
> first bar would be 3/4, the second bar 1/4, the third 4/4, then 1/4,
> then 5/4, etc..  Or, if one wishes, use pairs of digits for time
> signatures: 3/1, 4/1, 5/9, ... etc.. It doesn't have to be base 10, of
> course. Base 12 would yield 3/1, 8/4, 8/0, and so on (not sure how to
> interpret 8/0, but I'm sure someone could come up with something).
>
>
> T
>
> --
> "The whole problem with the world is that fools and fanatics are always so
> certain of themselves, but wiser people so full of doubts." -- Bertrand
> Russell. "How come he didn't put 'I think' at the end of it?" -- Anonymous
>
>


Re: irrational meters

2023-01-17 Thread H. S. Teoh
On Tue, Jan 17, 2023 at 07:08:41PM -0500, David Zelinsky wrote:
> Kieren MacMillan  writes:
> 
> > Hi Silvain,
> >
> >> I wonder about the term “irrational” meter. Should not we say
> >> “irregular” ??  as in mathematics, an irrational number is a number
> >> which cannot be represented as a fraction...
> >
> > As both a published composer *and* a published number theorist, I
> > wholeheartedly concur with your intuition — I’ve been pushing for
> > decades against “irrational” as a descriptor for time signatures
> > [except where it actually applies, of course, as in π/4].
> >
> > “Irregular” is better… but ultimately I prefer “non-dyadic” to
> > describe any time signature where the bottom number (a.k.a.
> > “denominator”, a label I also avoid) is not an integer power of 2.
[...]
> As another professional number theorist and musician (though not a
> composer), I also find this use of "irrational" to mean "non-dyadic"
> very grating.  But I once said as much on the Music Engraving Tips
> facebook group, and got summarily shot down as ignorant and elitist.
> The argument, such as it was, held that this is about *music*, not
> *mathematics*, so there's no reason to adopt mathematicians' quirky
> terminology.  This left me rather speechless, so I gave up.  However,
> if I ever have reason to discuss this type of meter, will always call
> it "non-dyadic".
[...]

This is off-topic, but it would be interesting if somebody composed a
piece with an actually irrational meter, like π/4 or 3/π.  Only thing
is, it would be impossible for human performers to play correctly, since
there isn't any way to count the beats correctly (counting beats implies
a rational fraction, since by definition it's impossible to count up to
an irrational ratio by counting finite parts).

But perhaps a more practicable approach is to use an irrational fraction
as an endless source of diverse beat divisions that has no long-term
patterns (because another property of an irrational number is that its
base-n expansion does not produce a repeating sequence).  For example,
one could take the digits of π (in whatever base one fancies) and use
that as the number of beats to divide each bar into. In base 10, the
first bar would be 3/4, the second bar 1/4, the third 4/4, then 1/4,
then 5/4, etc..  Or, if one wishes, use pairs of digits for time
signatures: 3/1, 4/1, 5/9, ... etc.. It doesn't have to be base 10, of
course. Base 12 would yield 3/1, 8/4, 8/0, and so on (not sure how to
interpret 8/0, but I'm sure someone could come up with something).


T

-- 
"The whole problem with the world is that fools and fanatics are always so 
certain of themselves, but wiser people so full of doubts." -- Bertrand 
Russell. "How come he didn't put 'I think' at the end of it?" -- Anonymous



Re: irrational meters

2023-01-17 Thread Jean Abou Samra

Le 18/01/2023 à 01:29, David Zelinsky a écrit :

No, it's really not quirky.  A "rational" number is a ratio of two
integers.  An irrational number is one that cannot be so expressed.  The
word "ratio" comes from Latin for calculation.  The common english usage
of "rational" meaning sensible presumably stems from the ancient Greeks
view that only rational numbers make sense.  But the mathematical
definition is really more fundamental.  More rational, one might say :)



Oh, I was being sarcastic against the fallacious “argument”.
I know what a rational number is; I've been a math student,
you know :)



OpenPGP_signature
Description: OpenPGP digital signature


Re: irrational meters

2023-01-17 Thread David Zelinsky
Jean Abou Samra  writes:

> Le 18/01/2023 à 01:08, David Zelinsky a écrit :
>> As another professional number theorist and musician (though not a
>> composer), I also find this use of "irrational" to mean "non-dyadic"
>> very grating.  But I once said as much on the Music Engraving Tips
>> facebook group, and got summarily shot down as ignorant and elitist.
>> The argument, such as it was, held that this is about *music*, not
>> *mathematics*, so there's no reason to adopt mathematicians' quirky
>> terminology.  This left me rather speechless, so I gave up.  However, if
>> I ever have reason to discuss this type of meter, will always call it
>> "non-dyadic".
>
>
>
> An interesting argument, given that “irrational” *is* “quirky” mathematic
> terminology in the first place ...
>
> Cheers,
> Jean

No, it's really not quirky.  A "rational" number is a ratio of two
integers.  An irrational number is one that cannot be so expressed.  The
word "ratio" comes from Latin for calculation.  The common english usage
of "rational" meaning sensible presumably stems from the ancient Greeks
view that only rational numbers make sense.  But the mathematical
definition is really more fundamental.  More rational, one might say :)

-David



Re: irrational meters

2023-01-17 Thread Jean Abou Samra

Le 18/01/2023 à 01:08, David Zelinsky a écrit :

As another professional number theorist and musician (though not a
composer), I also find this use of "irrational" to mean "non-dyadic"
very grating.  But I once said as much on the Music Engraving Tips
facebook group, and got summarily shot down as ignorant and elitist.
The argument, such as it was, held that this is about *music*, not
*mathematics*, so there's no reason to adopt mathematicians' quirky
terminology.  This left me rather speechless, so I gave up.  However, if
I ever have reason to discuss this type of meter, will always call it
"non-dyadic".




An interesting argument, given that “irrational” *is* “quirky” mathematic
terminology in the first place ...

Cheers,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: irrational meters

2023-01-17 Thread David Zelinsky
Kieren MacMillan  writes:

> Hi Silvain,
>
>> I wonder about the term “irrational” meter. Should not we say “irregular” ??
>> as in mathematics, an irrational number is a number which cannot be 
>> represented as a fraction...
>
> As both a published composer *and* a published number theorist, I
> wholeheartedly concur with your intuition — I’ve been pushing for
> decades against “irrational” as a descriptor for time signatures
> [except where it actually applies, of course, as in π/4].
>
> “Irregular” is better… but ultimately I prefer “non-dyadic” to
> describe any time signature where the bottom number
> (a.k.a. “denominator”, a label I also avoid) is not an integer power
> of 2.
>
> Cheers,
> Kieren.

As another professional number theorist and musician (though not a
composer), I also find this use of "irrational" to mean "non-dyadic"
very grating.  But I once said as much on the Music Engraving Tips
facebook group, and got summarily shot down as ignorant and elitist.
The argument, such as it was, held that this is about *music*, not
*mathematics*, so there's no reason to adopt mathematicians' quirky
terminology.  This left me rather speechless, so I gave up.  However, if
I ever have reason to discuss this type of meter, will always call it
"non-dyadic".

-David



Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Graham King
Thanks William, that's very useful.

and thanks to everyone who has helped out tonight.  The lilypond community is 
truly a great advert for our species.

-- Graham

> On 17 Jan 2023, at 21:27, William Rehwinkel  
> wrote:
> 
> Dear Graham,
> 
> This can actually be solved with layers. You can configure which glyphs will 
> be drawn after each other, so that the whiteout does not infringe on them. 
> You could do a little bit like the following:
> 
> -William
> 
> \version "2.24.0"
> 
> \new PianoStaff <<
>  \new Staff \with {
>  } { s1 s1 }
>  \new Staff \with {
>  } { r4 r4 r4 r8 c''8^[ c''8] c8^[ c'] }
> >>
> 
> \layout {
>  \context {
>\Staff
>\omit BarLine
>\override Beam.whiteout-style = #'outline
>\override Beam.whiteout = #2
>\override Beam.layer = #-1
>%\override Stem.layer = #2
>  }
>  \context {
>\Score
>\override SpanBar.layer = #-2
>  }
> }
> 
> 
>> On 1/17/23 16:08, Graham King wrote:
>>> On 2023-01-17 20:52, Graham King wrote:
>>> On 2023-01-17 20:06, Lukas-Fabian Moser wrote:
 Hi,
 
>>> As a secondary question: Is there a straightforward way to avoid 
>>> collisions of mensurstriche with beams?
>> 
>> Do you have an example?
> Here's an extract from the de Wert, that illustrates the "problem" 
> (lilypond 2.25.0):
 
 The way I see it, this would be a case for just accepting the crossing
 and maybe making it look nice using whiteout.
 
 Lukas
>>> 
>>> Thanks Lukas,
>>> 
>>>   \once \override Beam.whiteout-style = #'outline
>>>   \once \override Beam.whiteout = #2
>>> 
>>> works for me.  And I'm celebrating my first successful foray into the
>>> Internals Reference :)
>> Ah well, I got happy too quickly.  This override causes the stems to 
>> separate from the beams.
>> And it interferes with some staff-lines.
>> Never mind; I'll live with the collisions.
> 
> -- 
> + -- +
> |William Rehwinkel - Oberlin College and |
> |   Conservatory '24 |
> |  will...@williamrehwinkel.net  |
> | PGP key:   |
> | https://williamrehwinkel.net/static/pubkey.txt |
> + -- +




Re: Help understanding event listeners

2023-01-17 Thread Saul Tobin
Yeah, I played around with it a bit more and discovered the same thing. So
the autoTransposeEngraver is listening to the event, and it's transposing
the pitch-alist, but the Key_engraver is still actually engraving the
untransposed version. A slightly different problem than what I initially
thought but I'm just as confused.

On Tue, Jan 17, 2023 at 1:15 PM Jean Abou Samra  wrote:

> Le 17/01/2023 à 10:10, Saul Tobin a écrit :
> > What I can't figure out is why when my autoKeysigEngraver broadcasts a
> > KeyChangeEvent, it gets picked up by the Key_engraver but not by the
> > autoTransposeEngraver.
>
> What do you mean? If I insert ly:message calls, I see the event from
> autoKeySigEngraver being listened by autoTransposeEngraver...
>
>
>


Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread William Rehwinkel

Dear Graham,

This can actually be solved with layers. You can configure which glyphs 
will be drawn after each other, so that the whiteout does not infringe 
on them. You could do a little bit like the following:


-William

\version "2.24.0"

\new PianoStaff <<
  \new Staff \with {
  } { s1 s1 }
  \new Staff \with {
  } { r4 r4 r4 r8 c''8^[ c''8] c8^[ c'] }
>>

\layout {
  \context {
\Staff
\omit BarLine
\override Beam.whiteout-style = #'outline
\override Beam.whiteout = #2
\override Beam.layer = #-1
%\override Stem.layer = #2
  }
  \context {
\Score
\override SpanBar.layer = #-2
  }
}


On 1/17/23 16:08, Graham King wrote:

On 2023-01-17 20:52, Graham King wrote:

On 2023-01-17 20:06, Lukas-Fabian Moser wrote:

Hi,

As a secondary question: Is there a straightforward way to avoid 
collisions of mensurstriche with beams?


Do you have an example?
Here's an extract from the de Wert, that illustrates the "problem" 
(lilypond 2.25.0):


The way I see it, this would be a case for just accepting the crossing
and maybe making it look nice using whiteout.

Lukas


Thanks Lukas,

  \once \override Beam.whiteout-style = #'outline
  \once \override Beam.whiteout = #2

works for me.  And I'm celebrating my first successful foray into the
Internals Reference :)


Ah well, I got happy too quickly.  This override causes the stems to 
separate from the beams.

And it interferes with some staff-lines.
Never mind; I'll live with the collisions.



--
+ -- +
|William Rehwinkel - Oberlin College and |
|   Conservatory '24 |
|  will...@williamrehwinkel.net  |
| PGP key:   |
| https://williamrehwinkel.net/static/pubkey.txt |
+ -- +


OpenPGP_signature
Description: OpenPGP digital signature


Re: Help understanding event listeners

2023-01-17 Thread Jean Abou Samra

Le 17/01/2023 à 10:10, Saul Tobin a écrit :
What I can't figure out is why when my autoKeysigEngraver broadcasts a 
KeyChangeEvent, it gets picked up by the Key_engraver but not by the 
autoTransposeEngraver.


What do you mean? If I insert ly:message calls, I see the event from 
autoKeySigEngraver being listened by autoTransposeEngraver...





OpenPGP_signature
Description: OpenPGP digital signature


Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Graham King

On 2023-01-17 20:52, Graham King wrote:

On 2023-01-17 20:06, Lukas-Fabian Moser wrote:

Hi,

As a secondary question: Is there a straightforward way to avoid 
collisions of mensurstriche with beams?


Do you have an example?
Here's an extract from the de Wert, that illustrates the "problem" 
(lilypond 2.25.0):


The way I see it, this would be a case for just accepting the crossing
and maybe making it look nice using whiteout.

Lukas


Thanks Lukas,

  \once \override Beam.whiteout-style = #'outline
  \once \override Beam.whiteout = #2

works for me.  And I'm celebrating my first successful foray into the
Internals Reference :)


Ah well, I got happy too quickly.  This override causes the stems to 
separate from the beams.

And it interferes with some staff-lines.
Never mind; I'll live with the collisions.



Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Valentin Petzel
Hello Graham, hello Jean,

this is a proof of concept how something like this could be done (which is not 
necessarily a *should* be done):

\layout {
  \context {
\Voice
\remove Note_heads_engraver
\consists Completion_heads_engraver
\override Tie.before-line-breaking =
#(lambda (grob)
   (let* ((h1 (ly:spanner-bound grob LEFT))
  (h2 (ly:spanner-bound grob RIGHT))
  (c1 (ly:grob-property h1 'cause))
  (is_autosplit (ly:event-property c1 'autosplit-end)))
 (if is_autosplit
 (ly:grob-set-object! h1 'completed-tie grob
\override NoteHead.after-line-breaking =
#(lambda (grob)
   (let* ((ctie (ly:grob-object grob 'completed-tie))
  (otie (if (ly:grob? ctie) (ly:grob-original ctie)))
  (chead (if (ly:grob? otie) (ly:spanner-bound otie RIGHT
 (if (ly:grob? chead)
 (let* ((cause (ly:grob-property grob 'cause))
(mcause (ly:event-property cause 'music-cause))
(mdur (ly:music-property mcause 'duration))
(stem (ly:grob-object grob 'stem)))
   (if (null? (ly:spanner-broken-into otie))
   (begin
(ly:grob-suicide! (ly:grob-object chead 'stem))
(ly:grob-suicide! chead)
(ly:grob-suicide! ctie)
(ly:grob-set-property! grob 'duration-log
   (ly:duration-log mdur))
(ly:grob-set-property! grob 'glyph-name
   (note-head::calc-glyph-name grob))
(ly:grob-set-property! grob 'stencil
   (ly:note-head::print grob))
(ly:grob-set-property! stem 'duration-log
   (ly:duration-log mdur
  }
}

{c'4 \repeat unfold 32 c'2 }

The basic idea is to create the completed note heads, and then if it is not 
broken to kill the tie and the completion note head and tweak the first note 
head to look as if it wasn’t split in the first place.

As I said this is a proof of concept and would need lots of additional rules 
to look proper and to handle all cases (what about one note being split 
overmore than two measures? Flags? Beams? Dots? Width of the NoteHead?).

But if one were willing to invest quite some effort into taking care of all of 
these details you’d be able to do this in an acceptable manner.

Alternatively you might use something like (again proof of concept!) to 
automatically get small notes after a line break or something:

\layout {
  \context {
\Voice
\remove "Forbid_line_break_engraver"
  }
}

compl = \with {
  \shiftOff
  \remove Note_heads_engraver
  \consists Completion_heads_engraver
  \override Tie.before-line-breaking =
  #(lambda (grob)
 (let* ((h1 (ly:spanner-bound grob LEFT))
(h2 (ly:spanner-bound grob RIGHT))
(c1 (ly:grob-property h1 'cause))
(is_autosplit (ly:event-property c1 'autosplit-end)))
   (if is_autosplit
   (ly:grob-set-object! h1 'completed-tie grob
  \override Tie.stencil = ##f
  \override NoteHead.stencil = ##f
  \override Stem.stencil = ##f
  \override NoteHead.after-line-breaking =
  #(lambda (grob)
 (let* ((ctie (ly:grob-object grob 'completed-tie))
(otie (if (ly:grob? ctie) (ly:grob-original ctie)))
(chead (if (ly:grob? otie) (ly:spanner-bound otie RIGHT
   (if (ly:grob? chead)
   (let* ((cause (ly:grob-property grob 'cause))
  (mcause (ly:event-property cause 'music-cause))
  (mdur (ly:music-property mcause 'duration))
  (stem (ly:grob-object grob 'stem))
  (stem2 (ly:grob-object chead 'stem)))
 (if (null? (ly:spanner-broken-into otie))
 (begin
  (ly:grob-suicide! stem2)
  (ly:grob-suicide! chead)
  (ly:grob-suicide! ctie)
  (ly:grob-suicide! stem)
  (ly:grob-suicide! grob))
 (begin
  (ly:grob-set-property! chead 'stencil
 (ly:note-head::print grob))
  
  (ly:grob-suicide! stem)
  (ly:grob-suicide! ctie)
  (ly:grob-suicide! grob))
  )
  \tiny
  \override NoteColumn.force-hshift = #-0.5
}

\new Staff <<
  {c'4 \repeat unfold 128 c'2 }
  \new Voice \with \compl {c'4 \repeat unfold 128 c'2 }
>>

although this one could be done cleanear with a separarate engraver and grob 
similar to the custos engraver.

Cheers,
Valentin

Am Dienstag, 17. Jänner 2023, 18:56:10 CET schrieb Jean Abou Samra:
> Le 17/01/2023 à 18:31, Graham King a écrit :
> 
> > I'm preparing an edition of de Wert's motet "Ascendente Jesu in naviculam"
> > which has an extended stretto 

Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Graham King

On 2023-01-17 20:06, Lukas-Fabian Moser wrote:

Hi,

As a secondary question: Is there a straightforward way to avoid 
collisions of mensurstriche with beams?


Do you have an example?
Here's an extract from the de Wert, that illustrates the "problem" 
(lilypond 2.25.0):


The way I see it, this would be a case for just accepting the crossing
and maybe making it look nice using whiteout.

Lukas


Thanks Lukas,

  \once \override Beam.whiteout-style = #'outline
  \once \override Beam.whiteout = #2

works for me.  And I'm celebrating my first successful foray into the 
Internals Reference :)




Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Lukas-Fabian Moser




I am afraid this would be exceedingly difficult technically.
Engravers run way earlier than line breaking, so the only
option would be to let the engraver create both notations
(with notes straddling over bar lines and with tied notes),
and remove one of them later, but there is a lot of code in
between that is not prepared for ignoring the collisions
that will unavoidably ensue, it would have consequences on
horizontal spacing, etc.


That's what I thought as well, but I think one wouldn't need to create 
both notations: Just create the tied notes only and, if not needed, 
tweak the note heads and kill some ties/other notes as late as possible. 
I _think_ this should be possible, involving some cheating for creating 
dots for situations of the type 2~ 4.


Still a mess, though, and spacing would be messed up by all the 
un-needed ties and extra notes.


Lukas




Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Lukas-Fabian Moser

Hi,


As a secondary question: Is there a straightforward way to avoid collisions of 
mensurstriche with beams?


Do you have an example?

Here's an extract from the de Wert, that illustrates the "problem" (lilypond 
2.25.0):


The way I see it, this would be a case for just accepting the crossing 
and maybe making it look nice using whiteout.


Lukas




Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Jean Abou Samra

Le 17/01/2023 à 20:33, Graham King a écrit :

I'm not really sure what best practice is here; it might be that these 
collisions are just to be expected?  (I can certainly live with them).




I don't have experience with this type of music, but my first question
would be: what is the alternative? If you were doing this with pen
and paper, how would you avoid those collisions? That's not clear to
me. You cannot really shorten all the beams, for some of them it would
look really bad ...

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Graham King


> On 17 Jan 2023, at 17:56, Jean Abou Samra  wrote:
> 
> Le 17/01/2023 à 18:31, Graham King a écrit :
>> I'm preparing an edition of de Wert's motet "Ascendente Jesu in naviculam" 
>> which has an extended stretto section with dotted rhythms across barlines.  
>> For this, Harm's Mensurstriche example in the Learning Manual produces a 
>> mostly beautiful result.
>> 
>> However, for the sake of those singers who, faced with this passage, find 
>> themselves  all at sea, I would like to avoid notes extending across 
>> line-breaks.  The idea is to use something like the 
>> Completion_heads_engraver that would take effect only at those barlines that 
>> coincide with a line break.  Does such a thing exist?
> 
> 
> 
> I am afraid this would be exceedingly difficult technically.
> Engravers run way earlier than line breaking, so the only
> option would be to let the engraver create both notations
> (with notes straddling over bar lines and with tied notes),
> and remove one of them later, but there is a lot of code in
> between that is not prepared for ignoring the collisions
> that will unavoidably ensue, it would have consequences on
> horizontal spacing, etc.

OK, that makes sense.  It's certainly not worth a lot of software development 
effort.
> 
> Also, I have to say I would find it confusing as a performer.
> In your shoes, I'd go either for modern notation with ties, or
> for ancient notation, but not a mixture of both.
> 
> 
>> As a secondary question: Is there a straightforward way to avoid collisions 
>> of mensurstriche with beams?
> 
> 
> Do you have an example?

Here's an extract from the de Wert, that illustrates the "problem" (lilypond 
2.25.0):

I'm not really sure what best practice is here; it might be that these 
collisions are just to be expected?  (I can certainly live with them).  If you 
would like an MWE with code, that'll take me a little while to prepare.  
(Probably not tonight).  Or I could just send you the .ly file (25kB).

-- Graham

> 
> Regards,
> Jean
> 


Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread David Poon
Note that some durations still require a tie despite using barless notation
(e.g. semibreve + crochet), so it wouldn't be completely heretical to have
a few ties across barlines. The whole problem lies in using scores instead
of partbooks. :)

I've seen one engraver use custodes at the end of a line to signal notes
being carried over the line break (rather than foreshowing the next note),
though I personally still find the empty space starting the following line
unsettling.

-David

On Tue, 17 Jan 2023 at 09:57, Jean Abou Samra  wrote:

> Le 17/01/2023 à 18:31, Graham King a écrit :
> > I'm preparing an edition of de Wert's motet "Ascendente Jesu in
> naviculam" which has an extended stretto section with dotted rhythms across
> barlines.  For this, Harm's Mensurstriche example in the Learning Manual
> produces a mostly beautiful result.
> >
> > However, for the sake of those singers who, faced with this passage,
> find themselves  all at sea, I would like to avoid notes extending
> across line-breaks.  The idea is to use something like the
> Completion_heads_engraver that would take effect only at those barlines
> that coincide with a line break.  Does such a thing exist?
>
>
>
> I am afraid this would be exceedingly difficult technically.
> Engravers run way earlier than line breaking, so the only
> option would be to let the engraver create both notations
> (with notes straddling over bar lines and with tied notes),
> and remove one of them later, but there is a lot of code in
> between that is not prepared for ignoring the collisions
> that will unavoidably ensue, it would have consequences on
> horizontal spacing, etc.
>
> Also, I have to say I would find it confusing as a performer.
> In your shoes, I'd go either for modern notation with ties, or
> for ancient notation, but not a mixture of both.
>
>
> > As a secondary question: Is there a straightforward way to avoid
> collisions of mensurstriche with beams?
>
>
> Do you have an example?
>
> Regards,
> Jean
>
>


Re: irrational meters

2023-01-17 Thread Hans Åberg
I gave an example [1] where the numerator is an irrational number, 8+2√5. It is 
implementable in LilyPond using continued fractions.

1. https://lists.gnu.org/archive/html/lilypond-user/2014-06/msg00237.html


> On 17 Jan 2023, at 18:40, Silvain Dupertuis  
> wrote:
> 
> Thanks for the reference.
> This wikipedia article in English does not have it's counterpart in my 
> language (French), but a corresponding but different French article which 
> does not mention this notion.
> So this term “irrational” is indeed used that way in music (at least in 
> English) ­­— but I still think it would be better to use the terme «non 
> dyadic», also mentioned in the article, so as to harmonize teminology between 
> music and maths
> Silvain
> 
> Le 17.01.23 à 15:52, Hans Åberg a écrit :
>> 
>>> On 17 Jan 2023, at 15:20, Silvain Dupertuis  
>>> wrote:
>>> 
>>> I wonder about the term “irrational” meter. Should not we say “irregular” ??
>>> as in mathematics, an irrational number is a number which cannot be 
>>> represented as a fraction...
>>> 
>> The denominator is not a power of two. See:
>> 
>> https://en.wikipedia.org/wiki/Time_signature#Irrational_meters
>> 
>> 
>> 
> 
> -- 
> Silvain Dupertuis
> Route de Lausanne 335
> 1293 Bellevue (Switzerland)
> tél. +41-(0)22-774.20.67
> portable +41-(0)79-604.87.52
> web: silvain-dupertuis.org




Re: Completion_heads_engraver for line-ends only?

2023-01-17 Thread Jean Abou Samra

Le 17/01/2023 à 18:31, Graham King a écrit :

I'm preparing an edition of de Wert's motet "Ascendente Jesu in naviculam" 
which has an extended stretto section with dotted rhythms across barlines.  For this, 
Harm's Mensurstriche example in the Learning Manual produces a mostly beautiful result.

However, for the sake of those singers who, faced with this passage, find themselves 
 all at sea, I would like to avoid notes extending across line-breaks.  
The idea is to use something like the Completion_heads_engraver that would take 
effect only at those barlines that coincide with a line break.  Does such a thing 
exist?




I am afraid this would be exceedingly difficult technically.
Engravers run way earlier than line breaking, so the only
option would be to let the engraver create both notations
(with notes straddling over bar lines and with tied notes),
and remove one of them later, but there is a lot of code in
between that is not prepared for ignoring the collisions
that will unavoidably ensue, it would have consequences on
horizontal spacing, etc.

Also, I have to say I would find it confusing as a performer.
In your shoes, I'd go either for modern notation with ties, or
for ancient notation, but not a mixture of both.



As a secondary question: Is there a straightforward way to avoid collisions of 
mensurstriche with beams?



Do you have an example?

Regards,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: irrational meters

2023-01-17 Thread David Poon
My $0.02 on terminology: if you think of the maths definition of
"irrational" as
"cannot be represented as a ratio of two integers",

we can translate this definition into music as
"cannot be represented as a ratio of an integer and a non-dotted,
non-tuplet note value".

I.e., treat the categorisation of integer->rational->irrational from maths
as "whole measure"->"basic" notes->"any duration" in music

-David

On Tue, 17 Jan 2023 at 09:41, Silvain Dupertuis <
silvain-dupert...@bluewin.ch> wrote:

> Thanks for the reference.
>
> This wikipedia article in English does not have it's counterpart in my
> language (French), but a corresponding but different French article which
> does not mention this notion.
>
> So this term “irrational” is indeed used that way in music (at least in
> English) ­­— but I still think it would be better to use the terme «non
> dyadic», also mentioned in the article, so as to harmonize teminology
> between music and maths
>
> Silvain
>
> Le 17.01.23 à 15:52, Hans Åberg a écrit :
>
> On 17 Jan 2023, at 15:20, Silvain Dupertuis  
>  wrote:
>
> I wonder about the term “irrational” meter. Should not we say “irregular” ??
> as in mathematics, an irrational number is a number which cannot be 
> represented as a fraction...
>
> The denominator is not a power of two. See:
> https://en.wikipedia.org/wiki/Time_signature#Irrational_meters
>
>
> --
> Silvain Dupertuis
> Route de Lausanne 335
> 1293 Bellevue (Switzerland)
> tél. +41-(0)22-774.20.67
> portable +41-(0)79-604.87.52
> web: silvain-dupertuis.org 
>


Re: irrational meters

2023-01-17 Thread Silvain Dupertuis

Thanks for the reference.

This wikipedia article in English does not have it's counterpart in my language (French), 
but a corresponding but different French article which does not mention this notion.


So this term “irrational” is indeed used that way in music (at least in English) ­­— but I 
still think it would be better to use the terme «non dyadic», also mentioned in the 
article, so as to harmonize teminology between music and maths


Silvain


Le 17.01.23 à 15:52, Hans Åberg a écrit :

On 17 Jan 2023, at 15:20, Silvain Dupertuis  
wrote:

I wonder about the term “irrational” meter. Should not we say “irregular” ??
as in mathematics, an irrational number is a number which cannot be represented 
as a fraction...

The denominator is not a power of two. See:

https://en.wikipedia.org/wiki/Time_signature#Irrational_meters




--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org 

Completion_heads_engraver for line-ends only?

2023-01-17 Thread Graham King
I'm preparing an edition of de Wert's motet "Ascendente Jesu in naviculam" 
which has an extended stretto section with dotted rhythms across barlines.  For 
this, Harm's Mensurstriche example in the Learning Manual produces a mostly 
beautiful result.

However, for the sake of those singers who, faced with this passage, find 
themselves  all at sea, I would like to avoid notes extending across 
line-breaks.  The idea is to use something like the Completion_heads_engraver 
that would take effect only at those barlines that coincide with a line break.  
Does such a thing exist?

As a secondary question: Is there a straightforward way to avoid collisions of 
mensurstriche with beams?


Re: irrational meters

2023-01-17 Thread Karim Haddad
Thank you a lot Leo for your advice.
I'll hence stick with solution #1 which looks preferable.

@all
Now about "irrational meter" (or "irrational" rhythms), well this denomination 
is from the fifties. I am aware that mathematically this is not correct since 
it is a fraction.However, "irregular" is somehow more vague and doesn't relate 
to anything in particular. Thanks to Hans' link that shows that it is a somehow 
a common terminology in music practice. 

Best to all of you, and thank you for all your comments.

Karim



On Tue, Jan 17, 2023 at 01:30:49PM +0100, Leo Correia de Verdier wrote:
> Hi Karim!
> 
> Your first example seems to work to me (I don’t do irrational meters 
> everyday, so there might be something I’m missing. I would probably write the 
> tuplets explicitly rather than use \scaleDurations). 
> \set Staff.timeSignatureFraction is superfluous, the time signature already 
> does that.
> 
> I’m not sure what you’re aiming at with the second example. One source of 
> error is that you have quoted ly:make-moment, and it wants its arguments as 
> elements of a list, not as a fraction, so: 
> #(ly:make-moment 16 25)
> , not
> #'(ly:make-moment 16/25)
> But it is still not the right amount of notes in the bar.
> 
> HTH
> /Leo
> 
> > 17 jan. 2023 kl. 12:16 skrev Karim Haddad :
> > 
> > Hi,
> > 
> > I am wondering which is the best way to write irrational meters (with tempo 
> > modulations)
> > 
> > 1)
> > %
> > \version "2.24.0"
> > \score {
> > {
> > 
> > \clef "G"
> > 
> > \scaleDurations 4/5 {
> > \time 4/5
> > \set Staff.timeSignatureFraction = #'(4 . 5)
> > \mark \markup {\left-column {{\line { \smaller \general-align #Y #DOWN  
> > \note {4} #1 " = 60 "}} \tiny "1"}}
> > c'4
> > c'4
> > c'4
> > c'4
> > |
> > }
> > \once \set Staff.whichBar = "|"
> > }
> > 
> > 
> > \layout {
> > 
> > \context {\Score
> > %measureBarType=#""
> >  }
> > 
> > }
> > }
> > %
> > 
> > or
> > 
> > 2)
> > 
> > %
> > \version "2.24.0"
> > \score {
> > {
> > \clef "G"
> > 
> > \time 4/5
> > \set Staff.timeSignatureFraction = #'(4 . 5)
> > \set Timing.measureLength = #'(ly:make-moment 16/25)
> > \mark \markup {\left-column {{\line { \smaller \general-align #Y #DOWN  
> > \note {4} #1 " = 60 "}} \tiny "1"}}
> > c'4
> > c'4
> > c'4
> > c'4
> > |
> > \once \set Staff.whichBar = "|"
> > }
> > 
> > \layout {
> > 
> > \context {\Score
> > measureBarType=#""
> >   }
> > 
> > }
> > }
> > %
> > 
> > 
> > Now the first solution outputs:
> > 
> > Processing `irr1.ly'
> > Parsing...
> > Interpreting music...
> > irr1.ly:13:1: warning: strange time signature found: 4/5
> > 
> > \time 4/5
> > Preprocessing graphical objects...
> > 
> > 
> > Which looks good to me as a warning
> > 
> > However, the second solution gives:
> > 
> > Processing `irr2.ly'
> > Parsing...
> > Interpreting music...
> > warning: type check for `measureLength' failed; value `(ly:make-moment 
> > 16/25)' must be of type `moment'
> > irr2.ly:12:1: warning: strange time signature found: 4/5
> > 
> > \time 4/5
> > irr2.ly:20:1: warning: barcheck failed at: 1/5
> > 
> > |
> > Preprocessing graphical objects...
> > 
> > 
> > And if we comment measureBarType=#"" we will have a strange bar at the end.
> > 
> > 
> > Best Regards
> > 
> > 
> > -- 
> > Karim Haddad
> > 
> > Music Representations Team, IRCAM
> > Research and development manager.
> > 
> > 
> 

-- 
Karim Haddad

Music Representations Team, IRCAM
Research and development manager.




Re: irrational meters

2023-01-17 Thread Hans Åberg


> On 17 Jan 2023, at 15:20, Silvain Dupertuis  
> wrote:
> 
> I wonder about the term “irrational” meter. Should not we say “irregular” ??
> as in mathematics, an irrational number is a number which cannot be 
> represented as a fraction...

The denominator is not a power of two. See:

https://en.wikipedia.org/wiki/Time_signature#Irrational_meters





Re: Help understanding event listeners

2023-01-17 Thread Kieren MacMillan
Hi Saul,

> I've been tinkering with the auto-transpose engraver from OLL, trying to 
> automatically print key signatures if the transposition has been changed.

I'm just here to say (or maybe even sing?) “Did you ever know that you’re my 
hero?”.  :)

Kieren.


Re: irrational meters

2023-01-17 Thread Kieren MacMillan
Hi Silvain,

> I wonder about the term “irrational” meter. Should not we say “irregular” ??
> as in mathematics, an irrational number is a number which cannot be 
> represented as a fraction...

As both a published composer *and* a published number theorist, I 
wholeheartedly concur with your intuition — I’ve been pushing for decades 
against “irrational” as a descriptor for time signatures [except where it 
actually applies, of course, as in π/4].

“Irregular” is better… but ultimately I prefer “non-dyadic” to describe any 
time signature where the bottom number (a.k.a. “denominator”, a label I also 
avoid) is not an integer power of 2.

Cheers,
Kieren.


Re: irrational meters

2023-01-17 Thread J Martin Rushton
I would have thought so.  I assumed this post was about weird modern
music.  Irregular grabs my attention though, I occasionally try to set
plainchant.Martin
On Tue, 2023-01-17 at 15:20 +0100, Silvain Dupertuis wrote:
> I wonder about the term “irrational”
>   meter. Should not we say “irregular” ??
> 
> 
> as in mathematics, an irrational number
>   is a number which cannot be represented as a fraction...
> 
> 
> 
> Le 17.01.23 à 13:30, Leo Correia de
>   Verdier a écrit :
> 
> 
> 
> >   Hi Karim!
> > Your first example seems to work to me (I don’t do irrational
> > meters everyday, so there might be something I’m missing. I would
> > probably write the tuplets explicitly rather than use
> > \scaleDurations). \set Staff.timeSignatureFraction is superfluous,
> > the time signature already does that.
> > 
> 
> 
> 
> -- 
> 
>   Silvain Dupertuis
> 
>   Route de Lausanne 335
> 
>   1293 Bellevue (Switzerland)
> 
>   tél. +41-(0)22-774.20.67
> 
>   portable +41-(0)79-604.87.52
> 
>   web: silvain-dupertuis.org
>   
> 
-- 
J Martin Rushton MBCS


Re: irrational meters

2023-01-17 Thread Silvain Dupertuis

I wonder about the term “irrational” meter. Should not we say “irregular” ??
as in mathematics, an irrational number is a number which cannot be represented as a 
fraction...


Le 17.01.23 à 13:30, Leo Correia de Verdier a écrit :

Hi Karim!

Your first example seems to work to me (I don’t do irrational meters everyday, 
so there might be something I’m missing. I would probably write the tuplets 
explicitly rather than use \scaleDurations).
\set Staff.timeSignatureFraction is superfluous, the time signature already 
does that.


--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org 

Re: irrational meters

2023-01-17 Thread Leo Correia de Verdier
Hi Karim!

Your first example seems to work to me (I don’t do irrational meters everyday, 
so there might be something I’m missing. I would probably write the tuplets 
explicitly rather than use \scaleDurations). 
\set Staff.timeSignatureFraction is superfluous, the time signature already 
does that.

I’m not sure what you’re aiming at with the second example. One source of error 
is that you have quoted ly:make-moment, and it wants its arguments as elements 
of a list, not as a fraction, so: 
#(ly:make-moment 16 25)
, not
#'(ly:make-moment 16/25)
But it is still not the right amount of notes in the bar.

HTH
/Leo

> 17 jan. 2023 kl. 12:16 skrev Karim Haddad :
> 
> Hi,
> 
> I am wondering which is the best way to write irrational meters (with tempo 
> modulations)
> 
> 1)
> %
> \version "2.24.0"
> \score {
> {
> 
> \clef "G"
> 
> \scaleDurations 4/5 {
> \time 4/5
> \set Staff.timeSignatureFraction = #'(4 . 5)
> \mark \markup {\left-column {{\line { \smaller \general-align #Y #DOWN  \note 
> {4} #1 " = 60 "}} \tiny "1"}}
> c'4
> c'4
> c'4
> c'4
> |
> }
> \once \set Staff.whichBar = "|"
> }
> 
> 
> \layout {
> 
> \context {\Score
> %measureBarType=#""
>  }
> 
> }
> }
> %
> 
> or
> 
> 2)
> 
> %
> \version "2.24.0"
> \score {
> {
> \clef "G"
> 
> \time 4/5
> \set Staff.timeSignatureFraction = #'(4 . 5)
> \set Timing.measureLength = #'(ly:make-moment 16/25)
> \mark \markup {\left-column {{\line { \smaller \general-align #Y #DOWN  \note 
> {4} #1 " = 60 "}} \tiny "1"}}
> c'4
> c'4
> c'4
> c'4
> |
> \once \set Staff.whichBar = "|"
> }
> 
> \layout {
> 
> \context {\Score
> measureBarType=#""
> }
> 
> }
> }
> %
> 
> 
> Now the first solution outputs:
> 
> Processing `irr1.ly'
> Parsing...
> Interpreting music...
> irr1.ly:13:1: warning: strange time signature found: 4/5
> 
> \time 4/5
> Preprocessing graphical objects...
> 
> 
> Which looks good to me as a warning
> 
> However, the second solution gives:
> 
> Processing `irr2.ly'
> Parsing...
> Interpreting music...
> warning: type check for `measureLength' failed; value `(ly:make-moment 
> 16/25)' must be of type `moment'
> irr2.ly:12:1: warning: strange time signature found: 4/5
> 
> \time 4/5
> irr2.ly:20:1: warning: barcheck failed at: 1/5
> 
> |
> Preprocessing graphical objects...
> 
> 
> And if we comment measureBarType=#"" we will have a strange bar at the end.
> 
> 
> Best Regards
> 
> 
> -- 
> Karim Haddad
> 
> Music Representations Team, IRCAM
> Research and development manager.
> 
> 




irrational meters

2023-01-17 Thread Karim Haddad
Hi,

I am wondering which is the best way to write irrational meters (with tempo 
modulations)

1)
%
\version "2.24.0"
\score {
{

\clef "G"

\scaleDurations 4/5 {
\time 4/5
\set Staff.timeSignatureFraction = #'(4 . 5)
\mark \markup {\left-column {{\line { \smaller \general-align #Y #DOWN  \note 
{4} #1 " = 60 "}} \tiny "1"}}
c'4
c'4
c'4
c'4
|
}
\once \set Staff.whichBar = "|"
}


\layout {

\context {\Score
 %measureBarType=#""
  }

}
}
%

or

2)

%
\version "2.24.0"
\score {
{
\clef "G"

\time 4/5
\set Staff.timeSignatureFraction = #'(4 . 5)
\set Timing.measureLength = #'(ly:make-moment 16/25)
\mark \markup {\left-column {{\line { \smaller \general-align #Y #DOWN  \note 
{4} #1 " = 60 "}} \tiny "1"}}
c'4
c'4
c'4
c'4
|
\once \set Staff.whichBar = "|"
}

\layout {

\context {\Score
 measureBarType=#""
  }

}
}
%


Now the first solution outputs:

Processing `irr1.ly'
Parsing...
Interpreting music...
irr1.ly:13:1: warning: strange time signature found: 4/5

\time 4/5
Preprocessing graphical objects...


Which looks good to me as a warning

However, the second solution gives:

Processing `irr2.ly'
Parsing...
Interpreting music...
warning: type check for `measureLength' failed; value `(ly:make-moment 16/25)' 
must be of type `moment'
irr2.ly:12:1: warning: strange time signature found: 4/5

\time 4/5
irr2.ly:20:1: warning: barcheck failed at: 1/5

|
Preprocessing graphical objects...


And if we comment measureBarType=#"" we will have a strange bar at the end.


Best Regards


-- 
Karim Haddad

Music Representations Team, IRCAM
Research and development manager.




Help understanding event listeners

2023-01-17 Thread Saul Tobin
I've been tinkering with the auto-transpose engraver from OLL, trying to
automatically print key signatures if the transposition has been changed.
In the original code it looks like the plan was to have the engraver
broadcast a KeyChangeEvent, but when I tried that it ended up in an
infinite loop of KeyChangeEvents, since the same engraver was also
listening for them.

Attached is my attempt, splitting into two engravers. What I can't figure
out is why when my autoKeysigEngraver broadcasts a KeyChangeEvent, it gets
picked up by the Key_engraver but not by the autoTransposeEngraver. I'd
love some help understanding what's going on here.

Apologies for the messy testing code.

Thanks!


auto-transpose.ily
Description: Binary data