Re: Should \partial accept music instead of duration?

2022-03-27 Thread David Kastrup
Jean Abou Samra writes: > Le 27/03/2022 à 16:23, David Kastrup a écrit : >> It doesn't share the same music objects for different notes since $(...) >> makes a ly:music-deep-copy anyway that will deduplicate the elements of >> SequentialMusic while copying them. The intermediate expression is >>

Re: Should \partial accept music instead of duration?

2022-03-27 Thread Jean Abou Samra
Le 27/03/2022 à 16:23, David Kastrup a écrit : It doesn't share the same music objects for different notes since $(...) makes a ly:music-deep-copy anyway that will deduplicate the elements of SequentialMusic while copying them. The intermediate expression is indeed not fit for every use, but the

Re: Should \partial accept music instead of duration?

2022-03-27 Thread David Kastrup
Jean Abou Samra writes: > Le 26/03/2022 à 03:23, Kieren MacMillan a écrit : >> Hope that makes it clearer? > > > Yes, I understand better, thanks. I'd just suggest changing your > snippet to > > \version "2.23.7" > > $(let ((notes (ly:music-property #{ d'> #} 'elements))) >     (make-sequential-

Re: Should \partial accept music instead of duration?

2022-03-27 Thread Kieren MacMillan
Hi Jean, > Yes, I understand better, thanks. I can give you uncountable examples of "sugar" being more powerful than just about anything else that's visible in Lilypond. [We all know that sugar isn't as powerful as the amazing code underneath… but for the purposes of Lily-vangelizing, it's the

Re: Should \partial accept music instead of duration?

2022-03-27 Thread Jean Abou Samra
Le 26/03/2022 à 03:23, Kieren MacMillan a écrit : Hope that makes it clearer? Yes, I understand better, thanks. I'd just suggest changing your snippet to \version "2.23.7" $(let ((notes (ly:music-property #{ d'> #} 'elements)))     (make-sequential-music (map (lambda (x) (ly:music-deep

Re: Should \partial accept music instead of duration?

2022-03-25 Thread Kieren MacMillan
Hi Jean, >> but for me, it's the highest-impact sales tool when I'm Lily-vangelizing. :) > I'm curious, could you say more? When I show someone that you can install "vanilla" Lilypond, just type something like \version "2.23.4" randomNotes = { $@(let ((notes (ly:music-property #{ #} 'e

Re: Should \partial accept music instead of duration?

2022-03-25 Thread Jean Abou Samra
Le 25/03/2022 à 14:13, Kieren MacMillan a écrit : but for me, it's the highest-impact sales tool when I'm Lily-vangelizing. :) I'm curious, could you say more? Jean

Re: Should \partial accept music instead of duration?

2022-03-25 Thread Kieren MacMillan
Hi all, > This can be a snippet in the docs, as far as I'm concerned. Why wouldn't this be a candidate for a patch? I feel like some developers have an aversion to sugar… but for me, it's the highest-impact sales tool when I'm Lily-vangelizing. :) Cheers, Kieren.

Re: Should \partial accept music instead of duration?

2022-03-24 Thread Carl Sorensen
On Thu, Mar 24, 2022 at 3:18 PM Valentin Petzel wrote: > Hello Carl, > > I don’t think recreating \partial is the best thing to do. After all we > can > simply do > > pickupNotes = > #(define-music-function (mus) (ly:music?) >(let* ((mom (ly:music-length mus)) > (dur (make-duration-

Re: Should \partial accept music instead of duration?

2022-03-24 Thread Valentin Petzel
Hello Carl, I don’t think recreating \partial is the best thing to do. After all we can simply do pickupNotes = #(define-music-function (mus) (ly:music?) (let* ((mom (ly:music-length mus)) (dur (make-duration-of-length mom))) #{ \partial #dur #mus #})) Cheer

Re: Should \partial accept music instead of duration?

2022-03-24 Thread Carl Sorensen
On Thu, Mar 24, 2022 at 12:48 PM Valentin Petzel wrote: > Another idea: We could have a command like partialDuring or partialWith. > Here's what I wrote, renaming Aaron's function: pickupNotes = #(define-music-function (mus) (ly:music?) (_i "Make a partial measure.") (let* ((mom (ly:music

Re: Should \partial accept music instead of duration?

2022-03-24 Thread Valentin Petzel
> > Cc: lilyp...@hillvisions.com, dan@lyric.works, thomasmorle...@gmail.com, > > lilypond-de...@gnu.org, lilypond-user@gnu.org > > Bcc: > > Date: Sun, 20 Mar 2022 12:01:25 -0500 > > Subject: Re: Should \partial accept music instead of duration? > > > > &g

Re: Should \partial accept music instead of duration?

2022-03-21 Thread David Kastrup
Tim's Bitstream writes: >> On Mar 20, 2022, at 2:24 AM, Werner LEMBERG wrote: >> >> What about providing a new command `\upbeat` and moving `\partial` >> into oblivion? Compare this to `\tuplet` vs. `\times`. > > Perhaps this is an American jazzism, but we would refer to those as > \pickup not

Re: Should \partial accept music instead of duration?

2022-03-20 Thread Flaming Hakama by Elaine
> -- Forwarded message -- > From: "Tim's Bitstream" > To: Werner LEMBERG > Cc: lilyp...@hillvisions.com, dan@lyric.works, thomasmorle...@gmail.com, > lilypond-de...@gnu.org, lilypond-user@gnu.org > Bcc: > Date: Sun, 20 Mar 2022 12:01:25 -0500 &

Re: Should \partial accept music instead of duration?

2022-03-20 Thread Tim's Bitstream
> On Mar 20, 2022, at 2:24 AM, Werner LEMBERG wrote: > > What about providing a new command `\upbeat` and moving `\partial` > into oblivion? Compare this to `\tuplet` vs. `\times`. Perhaps this is an American jazzism, but we would refer to those as \pickup notes.

Re: Should \partial accept music instead of duration?

2022-03-20 Thread Jean Abou Samra
Le 20/03/2022 à 10:01, Aaron Hill a écrit : All of those things *are* music, as far as LilyPond is concerned.  It is just that commands like \tempo have no duration, so the following is nonsensical since the music has zero length:    \partial \tempo 4 = 90 Your "global" variable likely uses s

Re: Should \partial accept music instead of duration?

2022-03-20 Thread Luca Fascione
What if instead of `\upbeat` (which is weirdly named when used in the end-of-music/phrase/hymn/passage scenario) this new thing is just called `\partialMusic`? It's backward compatible, does something easy to use in some simple scenarios, leaves everything else in place for more refined use cases,

Re: Should \partial accept music instead of duration?

2022-03-20 Thread Valentin Petzel
I do not really like the idea that much to be honest. Of course it would be cool if we just have to specify the music and no duration, but in the end \partial is not really a command about the music, but about the measure structure. Binding it to some music would be a bit like having \time take

Re: Should \partial accept music instead of duration?

2022-03-20 Thread Aaron Hill
On 2022-03-20 3:17 am, David Kastrup wrote: Aaron Hill writes: Fair point, though the intention here would be that backwards compatibility would only need to exist for a time. I strongly disagree since \partial with a duration is the natural and proper expression when writing a separate timin

Re: Should \partial accept music instead of duration?

2022-03-20 Thread David Kastrup
Aaron Hill writes: > On 2022-03-19 7:53 pm, Dan Eble wrote: >> On Mar 19, 2022, at 20:53, Aaron Hill wrote: >> ... > A convert-ly rule would probably not be possible given the > limited power > of regular expressions. As such, \partial might need to support > both > duration

Re: Should \partial accept music instead of duration?

2022-03-20 Thread Aaron Hill
On 2022-03-20 1:13 am, Leo Correia de Verdier wrote: Entirely replacing the actual syntax would not be desirable in my opinion. Consider the case when it is used in a “global” part/variable in an orchestral score that usually contains rehearsal marks, tempo, key and time signature changes and suc

Re: Should \partial accept music instead of duration?

2022-03-20 Thread Leo Correia de Verdier
Entirely replacing the actual syntax would not be desirable in my opinion. Consider the case when it is used in a “global” part/variable in an orchestral score that usually contains rehearsal marks, tempo, key and time signature changes and such. As I understand it having \partial to accept only

Re: Should \partial accept music instead of duration?

2022-03-20 Thread Luca Fascione
What if you rotate them instead? Rename the current \partial \partialDuration, convert.ly now is just s/partial/partialDuration/ and \partial always takes music from now on It's the same as Werner said, but keeps the good name L On Sun, 20 Mar 2022, 08:24 Werner LEMBERG, wrote: > > > A con

Re: Should \partial accept music instead of duration?

2022-03-20 Thread Werner LEMBERG
> A convert-ly rule would probably not be possible given the > limited power of regular expressions. As such, \partial might > need to support both duration and music arguments. Initially I > thought this might not be possible, given that a naked duration > can be treated as

Re: Should \partial accept music instead of duration?

2022-03-19 Thread Aaron Hill
On 2022-03-19 7:53 pm, Dan Eble wrote: On Mar 19, 2022, at 20:53, Aaron Hill wrote: ... A convert-ly rule would probably not be possible given the limited power of regular expressions. As such, \partial might need to support both duration and music arguments. Initially I thought this might

Re: Should \partial accept music instead of duration?

2022-03-19 Thread Dan Eble
On Mar 19, 2022, at 20:53, Aaron Hill wrote: ... >>> A convert-ly rule would probably not be possible given the limited power >>> of regular expressions. As such, \partial might need to support both >>> duration and music arguments. Initially I thought this might not be >>> possible, given that

Re: Should \partial accept music instead of duration?

2022-03-19 Thread Kenneth Wolcott
Hi Aaron; I **LIKE** it. Thanks, Ken Wolcott On Sat, Mar 19, 2022 at 5:54 PM Aaron Hill wrote: > > On 2022-03-19 5:46 pm, Thomas Morley wrote: > > Am So., 20. März 2022 um 00:02 Uhr schrieb Aaron Hill > > : > >> > >> Here would be a possible refactoring: > >> > >> > >> \version "2.22.0"

Re: Should \partial accept music instead of duration?

2022-03-19 Thread Aaron Hill
On 2022-03-19 5:46 pm, Thomas Morley wrote: Am So., 20. März 2022 um 00:02 Uhr schrieb Aaron Hill : Here would be a possible refactoring: \version "2.22.0" partial = #(define-music-function (mus) (ly:music?) (_i "Make a partial measure.") (let* ((mom (ly:music-length mus))

Re: Should \partial accept music instead of duration?

2022-03-19 Thread Thomas Morley
Am So., 20. März 2022 um 00:02 Uhr schrieb Aaron Hill : > > Here would be a possible refactoring: > > > \version "2.22.0" > > partial = > #(define-music-function (mus) (ly:music?) >(_i "Make a partial measure.") >(let* ((mom (ly:music-length mus)) > (dur (make-duration-of-len