Re: Checkpoints (was re: Adding durations (for \after))

2022-11-19 Thread Kieren MacMillan
Hi Mark, > Oh, goodness… This is like a Plato’s Cave moment for me in Lilypond. I honestly can’t believe I haven’t had this in my quiver. Unless somebody (Jean? David K?) says this is somehow a sub-optimal implementation, I am using this in everything from now on. Thank you so much! Kieren.

Re: Checkpoints (was re: Adding durations (for \after))

2022-11-19 Thread Mark Knoop
At 08:59 on 19 Nov 2022, Kieren MacMillan wrote: >> I have been using \alignTo for years for this purpose, I think >> originally from this thread: >> https://lists.gnu.org/archive/html/lilypond-user/2013-12/msg01296.html > I'm somewhat embarrassed to say that I was on that thread and totally > f

Re: Checkpoints (was re: Adding durations (for \after))

2022-11-19 Thread Kieren MacMillan
Hi Mark, > I have been using \alignTo for years for this purpose, I think originally > from this thread: > https://lists.gnu.org/archive/html/lilypond-user/2013-12/msg01296.html I'm somewhat embarrassed to say that I was on that thread and totally forgot about it! Can you provide a MWE of the

Re: Checkpoints (was re: Adding durations (for \after))

2022-11-18 Thread Mark Knoop
At 11:01 on 18 Nov 2022, Kieren MacMillan wrote: > Hi Jean, >> Well, it's not too hard to implement them. > In the hopes that it’s also not too hard for Super-Jean to implement > anchors… ;) > Is there a world in which one could write something like > global = { > \anchor #'intro > s1*8 >

Re: Checkpoints (was re: Adding durations (for \after))

2022-11-18 Thread David Kastrup
Kieren MacMillan writes: > Hi Jean, > >> Well, it's not too hard to implement them. > > In the hopes that it’s also not too hard for Super-Jean to implement anchors… > ;) > > Is there a world in which one could write something like > > global = { > \anchor #'intro > s1*8 > \anchor #'verse

Re: Checkpoints (was re: Adding durations (for \after))

2022-11-18 Thread Kieren MacMillan
Hi Jean, > Well, it's not too hard to implement them. In the hopes that it’s also not too hard for Super-Jean to implement anchors… ;) Is there a world in which one could write something like global = { \anchor #'intro s1*8 \anchor #'verse s1*8 \anchor #'chorus s1*8 } and then cho

Re: Checkpoints (was re: Adding durations (for \after))

2022-11-18 Thread Jean Abou Samra
Le 17/11/2022 à 17:50, Joel C. Salomon a écrit : Yes.  And I already have tags for MIDI vs print output, so I can give different checks for the version with unrolled repeats. A complication is that I've copied the piece so it produces scoreA, scoreB, scoreC, and a combined scoreABC, and it's o

Re: Checkpoints (was re: Adding durations (for \after))

2022-11-17 Thread Joel C. Salomon
On 11/17/22 11:12, Jean Abou Samra wrote: Le 17/11/2022 à 16:58, Joel C. Salomon a écrit : (Motivation: I got bit by the "programming error: could not find this grob's vertical axis group in the vertical alignment" issue in one score.  Searching the list indicates this is probably a misalignmen

Re: Checkpoints (was re: Adding durations (for \after))

2022-11-17 Thread Jean Abou Samra
Le 17/11/2022 à 16:58, Joel C. Salomon a écrit : (Motivation: I got bit by the "programming error: could not find this grob's vertical axis group in the vertical alignment" issue in one score.  Searching the list indicates this is probably a misalignment somewhere, but I've still not succeeded

Re: Checkpoints (was re: Adding durations (for \after))

2022-11-17 Thread Kieren MacMillan
Hi Joel, > Is it even possible to query the temporal position, to enable some form of > checkpoints? This is the complement to my "anchor" idea (which would define the checkpoint), so I imagine they could both be implemented together, as a pair of interconnected features…? Cheers, Kieren.

Checkpoints (was re: Adding durations (for \after))

2022-11-17 Thread Joel C. Salomon
On 11/12/22 09:42, Kieren MacMillan wrote: Here's one concrete example: https://lists.gnu.org/archive/html/lilypond-user/2010-12/msg00790.html “Annoyance: the expressive part needs skips of the durations corresponding to the notes in between the expressive marks. Someday, I hope that LilyPond

Re: Adding durations (for \after)

2022-11-12 Thread Kieren MacMillan
Hi Lukas, > The thread on "addAt" was in 2014 > (https://lists.gnu.org/archive/html/lilypond-user/2014-01/msg00660.html). > > When I was working on making \after "official", I searched for the earlist > version (basically I wanted to take stock of the various versions that came > up over the y

Re: Adding durations (for \after)

2022-11-12 Thread Kieren MacMillan
Hi Jean, > On Nov 11, 2022, at 5:53 PM, Kieren MacMillan > wrote: >> Are you referring to one specific mailing list thread, or several of them? > Many of them, over several decades. =) Here's one concrete example: https://lists.gnu.org/archive/html/lilypond-user/2010-12/msg00790.html “Annoya

Re: Adding durations (for \after)

2022-11-11 Thread Lukas-Fabian Moser
Hi Kieren, It's one of the reasons I first suggested the "anchors" idea over 13 years ago (see https://lists.gnu.org/archive/html/lilypond-user/2009-07/msg00498.html); when I picked up the idea again (search for "addAt"), that thread eventually revealed the edition-engraver, and may have led

Re: Adding durations (for \after)

2022-11-11 Thread Kieren MacMillan
Hi Jean, > Have you tried out arranger.ly? A long time ago… Seemed like too much overhead for what I need. > Are you referring to one specific mailing list thread, or several of them? Many of them, over several decades. =) It's one of the reasons I first suggested the "anchors" idea over 13 y

Re: Adding durations (for \after)

2022-11-11 Thread Jean Abou Samra
> Le 11 nov. 2022 à 15:02, Kieren MacMillan a > écrit : > > Hi Jean (et al.), > >> Personally, I find it striking that the *only* two LilyPond >> libraries I am hearing about regularly on mailing lists, >> edition-engraver and arranger.ly, are both about >> inserting / replacing music in a

Re: Adding durations (for \after)

2022-11-11 Thread Lukas-Fabian Moser
Hi Joel, Am 11.11.22 um 15:37 schrieb Joel C. Salomon: But if that can be done from a Scheme function, it’s probably sufficient; no need to tamper with Lilypond grammar. To use Lucas’s example: [which was wrong, as I forgot the tied notes, sigh - but that doesn't matter.] r8 es2.-8 f2 ges8

Re: Adding durations (for \after)

2022-11-11 Thread Aaron Hill
On 2022-11-11 6:37 am, Joel C. Salomon wrote: can r8 es \duration_subtract{2.}{8} f2 … be made to work? (With whatever syntax.) Similarly, I have music that would benefit from: dyn_part = { % \p at start, \f at third bar, \p at second-to last bar <>\p \after 1*2 \f

Re: Adding durations (for \after)

2022-11-11 Thread Joel C. Salomon
On 11/11/22 08:33, Jean Abou Samra wrote: Le 11/11/2022 à 03:37, David Kastrup a écrit : I think we should avoid piling on arbitrary stuff without clear need for expressing music into the LilyPond grammar. Personally, I find it striking that the *only* two LilyPond libraries I am hearing about

Re: Adding durations (for \after)

2022-11-11 Thread Kieren MacMillan
Hi Jean (et al.), > Personally, I find it striking that the *only* two LilyPond > libraries I am hearing about regularly on mailing lists, > edition-engraver and arranger.ly, are both about > inserting / replacing music in a score at a certain > point in time, although with different purposes > (t

Re: Adding durations (for \after)

2022-11-11 Thread Jean Abou Samra
Le 11/11/2022 à 03:37, David Kastrup a écrit : I think we should avoid piling on arbitrary stuff without clear need for expressing music into the LilyPond grammar. Personally, I find it striking that the *only* two LilyPond libraries I am hearing about regularly on mailing lists, edition-engr

Re: Adding durations (for \after)

2022-11-10 Thread David Kastrup
"Joel C. Salomon" writes: > On 11/10/22 18:48, Jean Abou Samra wrote: >> Le 11/11/2022 à 00:40, Jean Abou Samra a écrit : >>> But I don't know what syntax to pick for that, or if it's essential >>> to have one or if "+" alone is already useful enough on its own. >>> 1`16 is the best I could find,

Re: Adding durations (for \after)

2022-11-10 Thread Joel C. Salomon
On 11/10/22 18:48, Jean Abou Samra wrote: Le 11/11/2022 à 00:40, Jean Abou Samra a écrit : But I don't know what syntax to pick for that, or if it's essential to have one or if "+" alone is already useful enough on its own. 1`16 is the best I could find, but it's not wonderfully mnemonic. I thin

Re: Adding durations (for \after)

2022-11-10 Thread David Kastrup
Lukas-Fabian Moser writes: > Well, duration-or-music? already exists and it's used by \skip. > > Ah, my bad, I didn't think of looking whether it might already > exist. I'm surprised that such an either-/or type predicate doesn't > wreak havoc with the parser. The parser doesn't have a hardwire

Re: Adding durations (for \after)

2022-11-10 Thread Jean Abou Samra
Le 11/11/2022 à 00:40, Jean Abou Samra a écrit : But I don't know what syntax to pick for that, or if it's essential to have one or if "+" alone is already useful enough on its own. 1`16 is the best I could find, but it's not wonderfully mnemonic. I think the reason why I can feel like it's a dif

Re: Adding durations (for \after)

2022-11-10 Thread Jean Abou Samra
Le 11/11/2022 à 00:14, Lukas-Fabian Moser a écrit : Well, duration-or-music? already exists and it's used by \skip. Ah, my bad, I didn't think of looking whether it might already exist. I'm surprised that such an either-/or type predicate doesn't wreak havoc with the parser. It is somethin

Re: Adding durations (for \after)

2022-11-10 Thread Lukas-Fabian Moser
Well, duration-or-music? already exists and it's used by \skip. Ah, my bad, I didn't think of looking whether it might already exist. I'm surprised that such an either-/or type predicate doesn't wreak havoc with the parser. However, this makes for the slight oddity that \skip 4 ... does not s

Re: Adding durations (for \after)

2022-11-09 Thread Joel C. Salomon
On 11/9/22 13:21, Lukas-Fabian Moser wrote: Am 09.11.22 um 16:11 schrieb David Kastrup: Maybe something like     \after #(make-duration-of-length (ly:music-length #{ 2. 4. #})) Or, with a bit of added sugar: \version "2.23.4" #(define (duration-or-music? x)    (or (ly:duration? x) (l

Re: Adding durations (for \after)

2022-11-09 Thread Jean Abou Samra
Le 09/11/2022 à 19:21, Lukas-Fabian Moser a écrit : I'm a bit surprised that \version "2.23.4" #(define (duration-or-music? x)    (or (ly:duration? x) (ly:music? x))) duration = #(define-scheme-function (x) (duration-or-music?)    (if (ly:duration? x)    x    (make-duration-of-length (

Re: Adding durations (for \after)

2022-11-09 Thread Lukas-Fabian Moser
Hi all, Am 09.11.22 um 16:11 schrieb David Kastrup: says: Factors may also be added by using Scheme expressions evaluating to a number or musical length like `*#(ly:music-length music)`. Is there an exam

Re: Adding durations (for \after)

2022-11-09 Thread David Kastrup
"Joel C. Salomon" writes: > > says: > >> Factors may also be added by using Scheme expressions evaluating to a >> number or musical length like `*#(ly:music-length music)`. > > Is there an example of such ad