Re: detecting parallel fifths and octaves in figured bass

2023-07-19 Thread Eef Weenink
Op 16 jul. 2023, om 10:33 heeft Vaughan McAlley mailto:vaug...@mcalley.net.au>> het volgende geschreven: I wrote a script in Lua to check MIDI files for consecutives. It assumes one voice per track, so may not suit your needs for figured bass. I need to make it more user-friendly, but would b

Re: Staggered/Tabled display

2023-07-19 Thread Werner LEMBERG
> I am trying to look into if a particular layout is possible with > Lilypond. I'd like to display small groups of short musical examples > as a "table", or "staggered". I'm not sure what to call it so I've > attached a photoshopped markup of what I am trying to achieve. > > I'd like to display i

Help with satb.ly and repeated lyrics

2023-07-19 Thread Mark Probert
Hi. I am setting a hymn, using the satb.ly template, that has an A1A2B structure where there are different lyrics for A1 and A2 and the same music. My first attempt is: \version "2.24" SopranoMusic = \relative { \repeat volta 2 {a' a a a } } AltoMusic = \relative { f' f f f } TenorMu

Staggered/Tabled display

2023-07-19 Thread josh
I am trying to look into if a particular layout is possible with Lilypond. I'd like to display small groups of short musical examples as a "table", or "staggered". I'm not sure what to call it so I've attached a photoshopped markup of what I am trying to achieve. I'd like to display it this wa

Re: How to return markup conditionally?

2023-07-19 Thread Jean Abou Samra
Le jeudi 20 juillet 2023 à 00:06 +0200, Jean Abou Samra a écrit : > There is definitely a point in having this rule that constants > are read-only. What I don't find fine is Guile segfaulting on > a simple set-car! call. I mean, either doing it silently or > checking and raising an exception would

Re: How to return markup conditionally?

2023-07-19 Thread Jean Abou Samra
> I debugged for half an eternity on a failed assertion because the failed > assertion pinpointed a call site that was not actually being used other > than some unrelated code jumping to its abort () call in order to save a > byte of instruction. Wow, thank you for sharing that anecdote. It is ..

Re: How to return markup conditionally?

2023-07-19 Thread Valentin Petzel
> That is indeed a problem, but note that the same problem exists with before- > line-breaking (you can't write two independent before-line-breaking > overrides, you need to combine them). Sure, that is also something where it would be nice to actually have a list of procedures. Of course one cou

Re: How to return markup conditionally?

2023-07-19 Thread David Kastrup
Jean Abou Samra writes: > Lol, now I understand. > > `module/language/cps/lower-primcalls.scm`: > > ``` > ;; precondition: pair is mutable pair > (define-primcall-lowerer (set-car! cps k src #f (pair val)) > (with-cps cps > (build-term > ($continue k src > ($primcall 'scm-set!

Re: How to return markup conditionally?

2023-07-19 Thread Jean Abou Samra
Le mercredi 19 juillet 2023 à 21:57 +0200, Jean Abou Samra a écrit : > (In recent Guile versions, it can even lead to true "nasal demons" undefined > behavior ­— when you enable byte-compilation and optimizations, (set-car! '(1 > . 2) 3) outright segfaults. The time I looked at the bug, I could

Re: How to return markup conditionally?

2023-07-19 Thread Valentin Petzel
Good point, I didn’t think of that! Also I know that using a callback on bound-details would work as well, but I’m not sure if this is the best way to replace a single value in an alist (what if you want to change other parts of the alist independently?). Maybe the whole transformer thing shoul

Re: How to return markup conditionally?

2023-07-19 Thread Jean Abou Samra
Le mercredi 19 juillet 2023 à 22:11 +0200, Valentin Petzel a écrit : > Good point, I didn’t think of that! Also I know that using a callback on > bound-details would work as well, but I’m not sure if this is the best way to > replace a single value in an alist (what if you want to change other pa

Re: How to return markup conditionally?

2023-07-19 Thread Jean Abou Samra
> ``` >        (let* ((bound-details (ly:grob-property grob 'bound-details)) >   (left (assoc-get 'left bound-details)) >   (left (assoc-set! > left > ``` If you add another red text spanner, you will see that it gets the text "foo" in spite of \once.

Re: Tweak grobs with callback output?

2023-07-19 Thread Trevor Bača
On Wed, Jul 19, 2023 at 3:41 PM Jean Abou Samra wrote: > \tweak color #(if (equal? DOWN (ly:grob-property grob 'direction)) red > blue) > > You just forgot to wrap the expression in (lambda (grob) ...) . > Yes, that's it: %%% BEGIN %%% \version "2.25.3" \markup "Conditionally colors both t

Re: Tweak grobs with callback output?

2023-07-19 Thread Jean Abou Samra
>     \tweak color #(if (equal? DOWN (ly:grob-property grob 'direction)) red > blue) You just forgot to wrap the expression in `(lambda (grob) ...)` . Best, Jean signature.asc Description: This is a digitally signed message part

Re: How to return markup conditionally?

2023-07-19 Thread Valentin Petzel
Hello Trevor, instead of trying to use a callback on bound-details.left.text you can use the before-line-breaking and after-line-breaking hooks to modifiy this property: %%% BEGIN %%% \version "2.24" % no left text set { \once \override TextSpanner.before-line-breaking = #(lambda (grob)

Tweak grobs with callback output?

2023-07-19 Thread Trevor Bača
Hi, Two examples appear below. The first works; it uses \override with a callback. The second doesn't work; it attempts to use \tweak with a callback: %%% BEGIN %%% \version "2.25.3" \markup "Conditionally colors both tuplet brackets:" \markup \vspace #1 { \once \override TupletBracket.colo

Re: How to return markup conditionally?

2023-07-19 Thread Trevor Bača
On Wed, Jul 19, 2023 at 2:24 AM David Kastrup wrote: > Trevor Bača writes: > > > Hi, > > > > I'd like the left text of red text spanners to be set to "foo", and to > set > > the left text of all other text spanners to "bar". > > > > But I misunderstand how to return markup: > > > > %%% BEGIN %%%