unterminated slur event
Hello All, While achieving the desired layout \once \override Score.BreakAlignment.break-align-orders = #(make-vector 3 '(staff-bar clef)) produces a warning of unterminated slur event. Mark
Re: Beaming with magnifyStaff and stopStaff
values greater than 1 also yield odd results. On Sun, Mar 20, 2022 at 6:41 PM Knute Snortum wrote: > Hi all, > > I have run into another possible-bug-certainly-ugly issue that I found > trying to create an ossia bar. When a musical figure has beams and the > staff is reduced in size with magnifyStaff and there is a stopStaff > right after it, the stems are too short and the beams are too wide. > Here's a MWE: > > %%% > \version "2.23.6" > > \new Staff \with { \magnifyStaff #2/3 } { > \relative { > c''16 c \stopStaff s4. s2 | > } > } > %%% > > Is it a bug that I should post on the bugs list? Is there a work-around? > > -- > Knute Snortum > >
Re: Should \partial accept music instead of duration?
> -- 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 > Subject: Re: Should \partial accept music instead of duration? > > > > 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. > > I'm not swayed by this proposal \partial to me seems like \time the info being conveyed is how long the "measure" is and so it should not require a music expression If you are using global with spacers, this would not be too big a deal, but for more casual usage with structure and notes interspersed, it forces you to specify a distinct musical expression just for the part of the phrase that happens to be before the bar, which seems like an awkward pattern to enforce on note entry. In terms of US English usage "partial" means "less than whole" and is pretty clear and neutral, and thus I think a good name for this usage. "partial" may also refer to a specific overtone of a note, (as in "E3 is the 4th partial of C1") but I don't think there is any confusion with this usage. "upbeat" is used a few different ways which makes it not such a good candidate. It can mean the beat before the down beat, so in 4/4 beat 4, or in 2/4 beat 2. But "upbeat" can also refer to subdivisions, like counting "1 and 2 and 3 and 4 and" the numbers are "beats" or "on the beat" or sometimes "downbeats", whereas the "and"s are the upbeats. It is further confusing in compound time as you might, in line with 2/4, consider the second dotted quarter in 6/8 as the upbeat. But, if there are syncopations happening, you might consider the first subdivision after the downbeat as the upbeat, so in 6/8, subdivisions 2 and 5 would be the upbeats. Likewise, in a 3/4 waltz you might consider beat 2 as the upbeat, whereas in other 3/4 contexts you might consider beat 3 as the upbeat, in line with how we count 4/4. "anacrusis" is a term all musicians learn, but no one ever uses, unless you are an academic. It generally refers to the same thing as "pickup". For a lilypond term it might be fine since it is basically descriptive, but probably less guessable than "pickup". "pickup" generally refers to notes leading into a barline. Whether it is singular or plural depends on the context. If it is a single note, it is a pickup. Multiple notes may be either pickup as referring to the entire phrase, or pickups referring to each of the notes. "Let's take it from letter B, with pickups" There is also a practice--and I'm sure there are a great many opinions on the wisdom of this practice, but nonetheless it exists-- that if a pickup starts on an offbeat, the partial measure may include the preceding rest that occurs on the beat. In which case, the partial measure length is not the same as the length of the "pickup", which is understood musically only as the notes played. So, use of "pickup"/"anacrusis" to describe the length of the measure would not always semantically be accurate. So, I suggest we keep \partial as is If the motivation is just to eliminate having to type a single duration, which typically is used at most once per piece, I'm really not seeing the urgency of the problem it is solving. It seems like something that should more appropriately be syntactic sugar, and not change the core features, which seem appropriate to me. Elaine Alt 415 . 341 .4954 "*Confusion is highly underrated*" ela...@flaminghakama.com Producer ~ Composer ~ Instrumentalist ~ Educator -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Re:
While it’s hard to know without seeing the contents of the included files I would guess you could write \voiceOne before the includes of the voices that should point up and \voiceTwo before the ones that should point down. > 21 mars 2022 kl. 00:22 skrev Michael Dykes : > > > I have used the nwc2ly program to begin converting NWC files that my dear > friend Larkin who recently passed away to lilypond files. I have found that > the biggest "issue" is that since the scores are 4-part choral music, with > the original having soprano and tenor voices with stems upward, and alto and > bass voices with stems downward; while the converted lilypond file has both > soprano and alto with stems the same direction, and the same for tenor and > bass. > > I am not sure how to write a mwe, so I have attached a screen shot from > Frescobaldi. I would appreciate any help possible. > > Michael Dykes
Re:
Michael, I'm not at a computer where I can help you with this immediately. But since you're using Frescobaldi, check out it's Score Wizard. You can use it to create an SA-TB score like this one. It creates the LP structure, to which you then add notes and adjustments. That structure should give you the LP code you can add to this score (if I'm remembering correctly) to segregate those voice parts and get the stems going the right way. Alternatively, you may could copy the LP code for each voice part/lyrics into the Frescobaldi wizard output. What you may find an advantage in doing this, is the Frescobaldi developers are quite good at keeping FB abreast of LP code advances so it's LP wizard output is very good. I say this as a long-time FB user. I find FB indispensable. Regards -- “Happiness is the meaning and the purpose of life, the whole aim and end of human existence.” ― Aristotle On Sun, Mar 20, 2022 at 6:22 PM Michael Dykes wrote: > I have used the nwc2ly program to begin converting NWC files that my dear > friend Larkin who recently passed away to lilypond files. I have found that > the biggest "issue" is that since the scores are 4-part choral music, with > the original having soprano and tenor voices with stems upward, and alto > and bass voices with stems downward; while the converted lilypond file has > both soprano and alto with stems the same direction, and the same for tenor > and bass. > > I am not sure how to write a mwe, so I have attached a screen shot from > Frescobaldi. I would appreciate any help possible. > > Michael Dykes >
Beaming with magnifyStaff and stopStaff
Hi all, I have run into another possible-bug-certainly-ugly issue that I found trying to create an ossia bar. When a musical figure has beams and the staff is reduced in size with magnifyStaff and there is a stopStaff right after it, the stems are too short and the beams are too wide. Here's a MWE: %%% \version "2.23.6" \new Staff \with { \magnifyStaff #2/3 } { \relative { c''16 c \stopStaff s4. s2 | } } %%% Is it a bug that I should post on the bugs list? Is there a work-around? -- Knute Snortum
Re: Lilypond-book
Dear Jean, thank you very much for your time and patience! If that's the only solution, I'll try installing the/this last "unstable" version in the near future. Regards, Martín. On mar. 20 2022, at 9:33 pm, Jean Abou Samra wrote: > Le 20/03/2022 à 20:34, Martín Rincón Botero a écrit : > > Hi Jean, > > > > I'm on Ubuntu 20.04. It seems the printing code that we added to > > book_latex.py is returning an empty string. Here's the new logging > > output of lilypond-book: > > > > lilypond-book (GNU LilyPond) 2.22.1 > > Reading `/home/martin/Escritorio/newfile1.tex' > > Running `pdflatex' on file `/tmp/tmp0i00kf9b.tex' to detect default > > page settings. > > > > lilypond-book: warning: Unable to auto-detect default settings: > > pdflatex: /home/martin/lilypond/usr/lib/libstdc++.so.6: version > > `CXXABI_1.3.9' not found (required by pdflatex) > > pdflatex: /home/martin/lilypond/usr/lib/libz.so.1: no version > > information available (required by /lib/x86_64-linux-gnu/libpng16.so.16) > > pdflatex: /home/martin/lilypond/usr/lib/libz.so.1: no version > > information available (required by /lib/x86_64-linux-gnu/libpng16.so.16) > > > > Aaah, *that* is the interesting piece of information from the > start. But -- OMG, I can reproduce it on my own installation. > I hadn't even imaged it would be broken for me. Is lilypond-book > actually working for anyone on Linux?? > > At any rate, it seems like it's an issue with the way the > lilypond-book shell wrapper created by GUB sets LD_LIBRARY_PATH. > I have no time to investigate what it should do, but the problem > should go away by installing LilyPond 2.23.6 from > https://gitlab.com/lilypond/lilypond/-/releases/release%252F2.23.6-1 > since the new infrastructure creating binaries no longer > does that. For me, that works. > > Jean
Re: Lilypond-book
Le 20/03/2022 à 20:34, Martín Rincón Botero a écrit : Hi Jean, I'm on Ubuntu 20.04. It seems the printing code that we added to book_latex.py is returning an empty string. Here's the new logging output of lilypond-book: lilypond-book (GNU LilyPond) 2.22.1 Reading `/home/martin/Escritorio/newfile1.tex' Running `pdflatex' on file `/tmp/tmp0i00kf9b.tex' to detect default page settings. lilypond-book: warning: Unable to auto-detect default settings: pdflatex: /home/martin/lilypond/usr/lib/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by pdflatex) pdflatex: /home/martin/lilypond/usr/lib/libz.so.1: no version information available (required by /lib/x86_64-linux-gnu/libpng16.so.16) pdflatex: /home/martin/lilypond/usr/lib/libz.so.1: no version information available (required by /lib/x86_64-linux-gnu/libpng16.so.16) Aaah, *that* is the interesting piece of information from the start. But -- OMG, I can reproduce it on my own installation. I hadn't even imaged it would be broken for me. Is lilypond-book actually working for anyone on Linux?? At any rate, it seems like it's an issue with the way the lilypond-book shell wrapper created by GUB sets LD_LIBRARY_PATH. I have no time to investigate what it should do, but the problem should go away by installing LilyPond 2.23.6 from https://gitlab.com/lilypond/lilypond/-/releases/release%252F2.23.6-1 since the new infrastructure creating binaries no longer does that. For me, that works. Jean
Re: Lilypond-book
Hi Jean, I'm on Ubuntu 20.04. It seems the printing code that we added to book_latex.py is returning an empty string. Here's the new logging output of lilypond-book: lilypond-book (GNU LilyPond) 2.22.1 Reading `/home/martin/Escritorio/newfile1.tex' Running `pdflatex' on file `/tmp/tmp0i00kf9b.tex' to detect default page settings. lilypond-book: warning: Unable to auto-detect default settings: pdflatex: /home/martin/lilypond/usr/lib/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by pdflatex) pdflatex: /home/martin/lilypond/usr/lib/libz.so.1: no version information available (required by /lib/x86_64-linux-gnu/libpng16.so.16) pdflatex: /home/martin/lilypond/usr/lib/libz.so.1: no version information available (required by /lib/x86_64-linux-gnu/libpng16.so.16) lilypond-book: warning: cannot detect textwidth from LaTeX Dissecting... All snippets are up to date... Linking files... Compiling `newfile1.tex'... Writing `/home/martin/Escritorio/out/newfile1.tex'... '' On mar. 20 2022, at 8:18 pm, Jean Abou Samra wrote: > Le 20/03/2022 à 19:49, Martín Rincón Botero a écrit : > > Hi Jean, > > > > thank you very much for wanting to take a look at it. Attached is the > > .log file. > > > Pheew. It looks correct, so something is wrong in the way lilypond-book > gets it from the system. OK, can you locate the file book_latex.py in > your LilyPond installation and apply the following diff? > > > diff --git a/python/book_latex.py b/python/book_latex.py > index ab8b2c7d3e..1c0f7bff50 100644 > --- a/python/book_latex.py > +++ b/python/book_latex.py > @@ -256,7 +256,9 @@ def get_latex_textwidth(source, global_options): > os.unlink(tmpfile) > if os.path.exists(auxfile): > os.unlink(auxfile) > + print(repr(parameter_string)) > if os.path.exists(logfile): > + print(repr(parameter_string)) > parameter_string = open(logfile, encoding="utf8").read() > os.unlink(logfile) > > > Then re-run and paste the lilypond-book logging output. Also, what OS > are you running? Is it Windows? >
Re: Lilypond-book
Le 20/03/2022 à 19:49, Martín Rincón Botero a écrit : Hi Jean, thank you very much for wanting to take a look at it. Attached is the .log file. Pheew. It looks correct, so something is wrong in the way lilypond-book gets it from the system. OK, can you locate the file book_latex.py in your LilyPond installation and apply the following diff? diff --git a/python/book_latex.py b/python/book_latex.py index ab8b2c7d3e..1c0f7bff50 100644 --- a/python/book_latex.py +++ b/python/book_latex.py @@ -256,7 +256,9 @@ def get_latex_textwidth(source, global_options): os.unlink(tmpfile) if os.path.exists(auxfile): os.unlink(auxfile) + print(repr(parameter_string)) if os.path.exists(logfile): + print(repr(parameter_string)) parameter_string = open(logfile, encoding="utf8").read() os.unlink(logfile) Then re-run and paste the lilypond-book logging output. Also, what OS are you running? Is it Windows?
Re: Displaying typesetting information at compile time
Le 20/03/2022 à 19:09, Richard Shann a écrit : On Sun, 2022-03-20 at 18:43 +0100, Jean Abou Samra wrote: \version "2.22.2" markWithPageInfo = %% Must not get called before line breaking \tweak X-extent #'(0 . 0) \tweak Y-extent #'(0 . 0) \tweak horizontal-skylines #(ly:make-unpure-pure-container ly:grob::simple-horizontal- skylines-from-extents) \tweak vertical-skylines #(ly:make-unpure-pure-container ly:grob::simple-vertical- skylines-from-extents) \tweak stencil #(lambda (grob) (let* ((sys (ly:grob-system grob)) ;; No broken pieces for systems ... (alignment (ly:grob-object sys 'vertical-alignment)) (all-alignments (ly:spanner-broken-into (ly:grob- original alignment))) (all-systems (map ly:grob-system all-alignments)) (n-systems (length all-systems)) (all-pages (map (lambda (s) (ly:grob-property s 'page- number)) all-systems)) (n-pages (1+ (- (apply max all-pages) (apply min all-pages (layout (ly:grob-layout grob)) (defs (append `((n-systems . ,(number->string n- systems)) (n-pages . ,(number->string n-pages))) (ly:output-def-lookup layout 'text-font- defaults))) (props (ly:grob-alist-chain grob defs)) (text (ly:grob-property grob 'text))) (interpret-markup layout props text))) \mark \etc { \markWithPageInfo \markup { Have \fromproperty #'n-systems systems on \fromproperty #'n-pages pages } \repeat unfold 20 { 1 1 \break } } Wow! That goes beyond what I had in mind - it actually outputs the information within the typeset (I guess the stuff with skylining might be to avoid the typesetting of this information affecting the number of pages/systems??). Sort of, yes. Normally, the RehearsalMark is drawn before line breaking is done, and its width and height are accounted for during page breaking and page spacing. At that time, there is obviously no number of pages or systems available. So I'm giving it predetermined extents and skylines, which are used for page breaking and page spacing purposes, only after which the RehearsalMark's stencil is computed. The drawback is that it could collide with something on top of it. However, there was a flaw in that code. When you have several scores in a bookpart, page-count and system-count override the total numbers for the whole bookpart, but I was counting them per score. Here is a fixed version: \version "2.22.2" \paper { page-post-process = #(lambda (paper pages) (let ((n-systems 0) (page-min #f) (page-max #f)) (for-each (lambda (page) (for-each (lambda (line) (let ((sys (ly:prob-property line 'system-grob))) (if (ly:grob? sys) (let ((sys-page (ly:grob-property sys 'page-number))) (set! n-systems (1+ n-systems)) (set! page-min (if page-min (min page-min sys-page) sys-page)) (set! page-max (if page-max (max page-max sys-page) sys-page)) (ly:prob-property page 'lines))) pages) (ly:output-def-set-variable! paper 'n-systems n-systems) (ly:output-def-set-variable! paper 'n-pages (1+ (- page-max page-min) } #(define-markup-command (page-info layout props arg) (markup?) (ly:make-stencil `(delay-stencil-evaluation ,(delay (let* ((n-systems (ly:output-def-lookup layout 'n-systems)) (n-pages (ly:output-def-lookup layout 'n-pages))) (ly:stencil-expr (interpret-markup layout (cons `((n-systems . ,(number->string n-systems)) (n-pages . ,(number->string n-pages))) props) arg) '(0 . 0) '(0 . 0))) \header { subsubtitle = \markup \page-info \line { Have \fromproperty #'n-systems systems on \fromproperty #'n-pages pages } } \book { \bookpart { \repeat unfold 10 { 1 1 \break } \repeat unfold 10 { 1 1 \break } } \bookpart { \repeat unfold 20 { 1 1 \break } \repeat unfold 20 { 1 1 \break } } } Jean
Re: Lilypond-book
Hi Jean, thank you very much for wanting to take a look at it. Attached is the .log file. Regards, Martín. On mar. 16 2022, at 8:42 pm, Jean Abou Samra wrote: > > > Le 16/03/2022 à 11:18, Martín Rincón Botero a écrit : > > Dear community, > > > > so that I have any idea on where to look and maybe give more useful > > information, I got this warning (that should be an error, because the > > pdf output is useless) when using lilypond-book after upgrading to > > Lilypond 2.22.1 (it used to work perfectly before) on Ubuntu > > 20.04: lilypond-book: warning: cannot detect textwidth from LaTeX. > > After googling I've seen some people who run into this problem when > > using Xetex, but I'm using PdfLatex, so their solutions obviously > > don't work in my case. What could be causing this problem? > > > > Can you compile a file made of your LaTeX preamble to which you append > \begin{document} > \typeout{textwidth=\the\textwidth} > \typeout{columnsep=\the\columnsep} > \makeatletter\if@twocolumn\typeout{columns=2}\fi\makeatother > \end{document} > > > and attach the .log file? > Jean newfile1.log Description: Binary data
Re: Displaying typesetting information at compile time
On Sun, 2022-03-20 at 18:43 +0100, Jean Abou Samra wrote: > > \version "2.22.2" > > markWithPageInfo = > %% Must not get called before line breaking > \tweak X-extent #'(0 . 0) > \tweak Y-extent #'(0 . 0) > \tweak horizontal-skylines > #(ly:make-unpure-pure-container ly:grob::simple-horizontal- > skylines-from-extents) > \tweak vertical-skylines > #(ly:make-unpure-pure-container ly:grob::simple-vertical- > skylines-from-extents) > \tweak stencil > #(lambda (grob) > (let* ((sys (ly:grob-system grob)) > ;; No broken pieces for systems ... > (alignment (ly:grob-object sys 'vertical-alignment)) > (all-alignments (ly:spanner-broken-into (ly:grob- > original alignment))) > (all-systems (map ly:grob-system all-alignments)) > (n-systems (length all-systems)) > (all-pages (map (lambda (s) (ly:grob-property s 'page- > number)) > all-systems)) > (n-pages (1+ (- (apply max all-pages) > (apply min all-pages > (layout (ly:grob-layout grob)) > (defs (append `((n-systems . ,(number->string n- > systems)) > (n-pages . ,(number->string n-pages))) > (ly:output-def-lookup layout 'text-font- > defaults))) > (props (ly:grob-alist-chain grob defs)) > (text (ly:grob-property grob 'text))) > (interpret-markup layout props text))) > \mark \etc > > { > \markWithPageInfo \markup { Have \fromproperty #'n-systems systems > on \fromproperty #'n-pages pages } > \repeat unfold 20 { 1 1 \break } > } Wow! That goes beyond what I had in mind - it actually outputs the information within the typeset (I guess the stuff with skylining might be to avoid the typesetting of this information affecting the number of pages/systems??). What I had in mind was just some Scheme (display ...) inserted in the way Valentin (*) did with this: \override Score.SpacingSpanner.common-shortest-duration = #(grob-transformer 'common-shortest-duration (lambda (grob orig) (display orig) (newline) orig)) So that the information can be used to guide selection of tweaks. Richard (*) in the "Re: Wildly different horizontal spacing in two similar scores." thread
Re: Displaying typesetting information at compile time
Le 20/03/2022 à 17:43, Richard Shann a écrit : I wonder if someone could suggest how to get LilyPond to emit various bits of information about the score it is typesetting. Specifically can it be persuaded to display the number of pages in the output PDF and the total number of systems? The idea would be to guide the user as to suitable values for \paper { system-count = xx page-count = yy } without having to count up the number of systems (pages is not really a problem of course). Richard Shann Not sure if there's a more elegant way, but you could try \version "2.22.2" markWithPageInfo = %% Must not get called before line breaking \tweak X-extent #'(0 . 0) \tweak Y-extent #'(0 . 0) \tweak horizontal-skylines #(ly:make-unpure-pure-container ly:grob::simple-horizontal-skylines-from-extents) \tweak vertical-skylines #(ly:make-unpure-pure-container ly:grob::simple-vertical-skylines-from-extents) \tweak stencil #(lambda (grob) (let* ((sys (ly:grob-system grob)) ;; No broken pieces for systems ... (alignment (ly:grob-object sys 'vertical-alignment)) (all-alignments (ly:spanner-broken-into (ly:grob-original alignment))) (all-systems (map ly:grob-system all-alignments)) (n-systems (length all-systems)) (all-pages (map (lambda (s) (ly:grob-property s 'page-number)) all-systems)) (n-pages (1+ (- (apply max all-pages) (apply min all-pages (layout (ly:grob-layout grob)) (defs (append `((n-systems . ,(number->string n-systems)) (n-pages . ,(number->string n-pages))) (ly:output-def-lookup layout 'text-font-defaults))) (props (ly:grob-alist-chain grob defs)) (text (ly:grob-property grob 'text))) (interpret-markup layout props text))) \mark \etc { \markWithPageInfo \markup { Have \fromproperty #'n-systems systems on \fromproperty #'n-pages pages } \repeat unfold 20 { 1 1 \break } } Jean
Re: Should \partial accept music instead of duration?
> 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.
Displaying typesetting information at compile time
I wonder if someone could suggest how to get LilyPond to emit various bits of information about the score it is typesetting. Specifically can it be persuaded to display the number of pages in the output PDF and the total number of systems? The idea would be to guide the user as to suitable values for \paper { system-count = xx page-count = yy } without having to count up the number of systems (pages is not really a problem of course). Richard Shann
Re: can someone point me to complete documentation for the partial command argument syntax?
Wols Lists writes: > On 19/03/2022 20:01, David Kastrup wrote: >> Sam Roberts writes: >> >>> I tried so hard to be accurate, but I missed something: >>> >>> On Sat, Mar 19, 2022 at 12:38 PM Sam Roberts wrote: After experimentation, I found this worked: \time 3/4 \partial 1 c4 | >>> >>> It "works" in that pdf output looks ok, c4 is in the pickup bar, but >>> still warns about the bar checks, as it should. >> Please don't just dump partial code that does not compile: this >> makes it >> impossible to accurately see what you are doing. > > David, you're expecting too much! By his own admission he's a newbie. > > And in this particular instance it is quite clear that > (a) he does not understand what the problem IS, > and > (b) if he did understand, he wouldn't have a problem! > > So, in this particular instance you are asking him to go away and > solve his problem by himself. NOT good. No, I am asking him to actually post the code he is having problems with rather than something else. -- David Kastrup
Re: can someone point me to complete documentation for the partial command argument syntax?
On 19/03/2022 20:01, David Kastrup wrote: Sam Roberts writes: I tried so hard to be accurate, but I missed something: On Sat, Mar 19, 2022 at 12:38 PM Sam Roberts wrote: After experimentation, I found this worked: \time 3/4 \partial 1 c4 | It "works" in that pdf output looks ok, c4 is in the pickup bar, but still warns about the bar checks, as it should. Please don't just dump partial code that does not compile: this makes it impossible to accurately see what you are doing. David, you're expecting too much! By his own admission he's a newbie. And in this particular instance it is quite clear that (a) he does not understand what the problem IS, and (b) if he did understand, he wouldn't have a problem! So, in this particular instance you are asking him to go away and solve his problem by himself. NOT good. You probably are using \partial wrong: its argument does not specify how long it is _since_ a full bar but how long it is _to_ a full bar. As such, you'd usually see ... \time 3/4 \partial 4 c4 | ... in typical contexts. And the REAL problem is that he quite clearly does not understand the documentation (or can't find it). A problem that happens quite regularly. A case in point - I remember having a HELL of a lot of grief with \partial, before I finally got it ... When someone (especially newbie) presents with a problem, always look behind what they're asking for, for what they really need. Here, it's documentation they can understand. Cheers, Wol
Re: can someone point me to complete documentation for the partial command argument syntax?
On Sat, Mar 19, 2022 at 1:57 PM Sam Roberts wrote: > > > The * syntax is described here: > > > > https://lilypond.org/doc/v2.22/Documentation/notation/writing-rhythms#scaling-durations This is a good page to bookmark if you need to lookup the syntax of a command: https://lilypond.org/doc/v2.22/Documentation/notation/lilypond-command-index -- Knute Snortum
Re: No line break after score
On 14.03.2022 11:22, Robin Bannister wrote: Patrick Martin wrote: For example, in this picture, 22 follows directly on from the end of 21, and 23 from 22, etc. Or would this need to be implemented some other way? Pseudoindent could help with the horizontal aspect. https://lsr.di.unimi.it/LSR/Item?id=1098 You would choose an initial left-indent and a final right-indent for each piece, and apply these manually. Then get the appropriate vertical neighbours to overlap, without involving enclosing StaffGroups and such. I have no concrete suggestions for that Well, here is a way, using a NonMusicalPaperColumn override, such as pseudoIndent already uses. The whole thing is rather clunky and includes a crude workaround which may need refining. You copy the first part of pseudoIndentsYdemo.ly. Choose a global-staff-size, set it, and don't change it later. Then you work down the page, filling each line with system fragments. Each pseudoIndentsY call produces and places one fragment. Keep these calls in a separate voice in the first staff. All the parameters are in staff-spaces. In this inlay usage, the right-indent parameter can trip you up. Measures squeezed out by lack of space may jump out of sight. But the pagewise lookups make the line positioning easy to adjust. When you reach the page bottom insert a manual pageBreak. The whole thing is extremely manual. Don't want to change anything bulky when you're done! It should work ok with tame systems like your chorales example. Cheers, Robin \version "2.22.0" \include "pseudoIndent.ily" % cf LSR1098 pseudoIndentsY = % applies vertical positioning to pseudoIndents result #(define-music-function (parser location name-tweaks left-indent right-indent Y-pos) ; cf apply-Y-pos, which needs pseudoIndentsY in the _first_ staff ((markup-list? '()) number? number? number?) (let* ( (apply-Y-pos ; position our system staff-spaces from top of page (let* ((even-taller 10)) ; than the top of the tallest grob, we hope! #{ % misusing barline to swamp unknown first_staff_min_translation \override Staff.BarLine.Y-extent = #(cons -2 even-taller) \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details .Y-offset #(- Y-pos even-taller) % wonky if even-taller isn't taller #}))) % cf lilypond-user/2011-05/msg00366.html patch from Joe N. #{ \pseudoIndents $name-tweaks $left-indent $right-indent % try for explicit vertical positioning: #apply-Y-pos #})) \paper { % needed for apply-Y-pos system-system-spacing = #'( (basic_distance . 0) (minimum_distance . 0) (padding . -10) (stretchability . 0)) score-system-spacing = #'( (basic_distance . 0) (minimum_distance . 0) (padding . -10) (stretchability . 0)) } \layout { \autoPageBreaksOff } % but manual \pageBreak still effective % #(set-global-staff-size 20) % choose a value and stick to it! \paper { indent = 8 } % or = 0, adjusting initial left-indents individually \layout { \override Score.InstrumentName.padding = #2 } \header { title = "pseudoIndentsY demo" } % convenience pagewise lookups for desired Y-pos staff-spaces via line-number: % the first value is the distance of line 1 below the page top % the second value is the distance of line 2 below line 1, and so on #(define (Y-p1 line-num) (apply + (take '(15 22 23 22 21 21 21 21) line-num))) #(define (Y-p2 line-num) (apply + (take '(10 00 00 00 00 00 00 00) line-num))) \score { \new StaffGroup \with { instrumentName = "A" } << \new Staff << \new Voice { \repeat unfold 47 a'4 a'''4 } \new Voice { \pseudoIndentsY 00 00 #(Y-p1 1) s1*8 \pseudoIndentsY 00 55 #(Y-p1 2) s1*4 \bar"|." } >> \new Staff { \clef bass \repeat unfold 23 a2 a''2 } >> } \noPageBreak \score { \new StaffGroup \with { instrumentName = "B" } << \new Staff << \new Voice { \repeat unfold 48 b'4 } \new Voice { \pseudoIndentsY 60 00 #(Y-p1 2) s1*3 \pseudoIndentsY 00 00 #(Y-p1 3) s1*8 \pseudoIndentsY 00 90 #(Y-p1 4) s1*1\bar"|." } >> \new Staff { \clef bass \repeat unfold 24 b2 } >> } \noPageBreak \score { \new Staff \with { instrumentName = "C" } << \new Voice { \repeat unfold 8 c''4 } \new Voice { \pseudoIndentsY 25 50 #(Y-p1 4) s1*2 \bar"|." } >> } \noPageBreak \score { \new StaffGroup \with { instrumentName = "D" } << \new Staff << \new Voice { \repeat unfold 12 d''4 } \new Voice { \pseudoIndentsY 65 00 #(Y-p1 4) s1*3 \bar"|." } >> \new Staff { \clef bass \repeat unfold 6 d2 } >> } \noPageBreak \score { \new StaffGroup \with { instrumentName = "E" } << \new Staff << \new Voice { \repeat unfold 47 e'4 e'''4 } \new Voice {
Re: Should \partial accept music instead of duration?
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 spacer rests which are providing the length information, so the change to \partial usage ultimately looks like this: \partial 4 s4 => \partial s4 This removes the otherwise redundant specification of the duration. Took me a while to realize that << \partial { s4 } { ... } >> would work. Also, what about injecting \partial into music via \pushToTag, the edition engraver or similar? Generally speaking, \partial is so frequently used that I am decidedly wary of breaking it. Like Lukas, I am not seeing clearly on the English terminology of "partial", "anacrusis", "upbeat" and "pickup", but it seems to me that the choice is broad enough to allow the introduction of a separate command. I don't know if I like it. It will be more to learn for the same thing, but it might be more convenient for cases where you need \partial 1*5/16 and such. Jean
Re: Should \partial accept music instead of duration?
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, and it's not weird either end of the music L
Re: Should \partial accept music instead of duration?
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 some music, even though it does not need it. This means that filling music into a structure becomes much weirder, requiring the use of artificial << ... >> statements to parallelize things. E.g. compare these two statements: { \time 6/8 \partial 4. \repeat unfold 3 { c'8 e' g' } } \new Staff { \time 6/8 << \partial s4. \repeat unfold 3 { c'8 e' g' } >> } Clearly the second way is absolutely not beautiful, readable or intuitive. Additionally \partial will not start a new measure, which leads to potentially confusing behaviour. One the other hand the benefit of this functionality is so minimal that I do not think it is worth it. Instead I’d say doing something as Werner proposed and have a new function with a self-explanatory name like \upbeat music for this would surely be preferable. Also from a standpoint of efficiency: This would force us to put each partial measure into sequential music, which means writings lots of braces, and at least I personally find writing braces less efficient than writing numbers. Cheers, Valentin Am Sonntag, 20. März 2022, 05:35:46 CET schrieb 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 not be > possible, given that a naked duration can be treated as music; but > the > > > following does seem to work: > > ... > > > > I wouldn't want to have to explain to users why these turn out > > different. > > > > \score { > > > > \fixed c' { > > > > \partial 4. 4. > > > > } > > > > } > > > > \score { > > > > \fixed c' { > > > > \partial c4. c4. > > > > } > > > > } > > Fair point, though the intention here would be that backwards > compatibility would only need to exist for a time. A warning could be > issued whenever a user applies the older syntax; this would inform the > user of the impending breaking change while still allowing existing code > to compile. When it is convenient, a future release would only support > music as the argument. > > > -- Aaron Hill signature.asc Description: This is a digitally signed message part.
Re: Should \partial accept music instead of duration?
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 timing track. Natural, I can see. Proper... I would need more information backing that claim. Certainly if there is a technical basis, I would be eager to review it. If sound, then I could retract my proposal and answer the email subject with "no". In my timing/global/structure variables, expressions like \partial 4 s4 are common. Certainly \partial 4 would be most succinct, but it creates no actual duration in sequential music. Naturally, the spacer rest is used so later commands occur when I need them. My proposal leads to \partial s4 as a reasonable construct that avoids redundancy. (See below regarding NullVoice.) A warning could be issued whenever a user applies the older syntax; this would inform the user of the impending breaking change while still allowing existing code to compile. When it is convenient, a future release would only support music as the argument. 4. _is_ valid music. Yes, and it works with the updated \partial function. The only side effect is that it might produce a visible note (of unspecified pitch), because that is what 4. as music means. If used in a NullVoice context, it should work the same as s4. which means we are back to the original syntax. The key difference is that \partial 4. would now have musical length. -- Aaron Hill
Re: Should \partial accept music instead of duration?
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 and music arguments. Initially I thought this might not be > possible, given that a naked duration can be treated as music; > but the > following does seem to work: >> ... >> I wouldn't want to have to explain to users why these turn out >> different. >> \score { >> \fixed c' { >> \partial 4. 4. >> } >> } >> \score { >> \fixed c' { >> \partial c4. c4. >> } >> } >> > > 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 timing track. > A warning could be issued whenever a user applies the older syntax; > this would inform the user of the impending breaking change while > still allowing existing code to compile. When it is convenient, a > future release would only support music as the argument. 4. _is_ valid music. -- David Kastrup
Re: Should \partial accept music instead of duration?
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 such. As I understand it having \partial to accept only music as argument would have to move to each part, which would introduce unnecessary typing and disrupt the logic of the structure. Sure it can be worked around, but I would see it as a step backwards. Or have I misunderstood? 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 spacer rests which are providing the length information, so the change to \partial usage ultimately looks like this: \partial 4 s4 => \partial s4 This removes the otherwise redundant specification of the duration. -- Aaron Hill
Re: Should \partial accept music instead of duration?
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 music as argument would have to move to each part, which would introduce unnecessary typing and disrupt the logic of the structure. Sure it can be worked around, but I would see it as a step backwards. Or have I misunderstood? > 20 mars 2022 kl. 05:36 skrev Aaron Hill : > > Fair point, though the intention here would be that backwards compatibility > would only need to exist for a time. A warning could be issued whenever a > user applies the older syntax; this would inform the user of the impending > breaking change while still allowing existing code to compile. When it is > convenient, a future release would only support music as the argument. > > > -- Aaron Hill
Re: Should \partial accept music instead of duration?
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 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 music; but the following does seem to work: > >> > >> ... > >> I wouldn't want to have to explain to users why these turn out > >> different. > >> \score { > >> \fixed c' { > >> \partial 4. 4. > >> } > >> } > >> \score { > >> \fixed c' { > >> \partial c4. c4. > >> } > >> } > >> > > > > Fair point, though the intention here would be that backwards > > compatibility would only need to exist for a time. A warning could > > be issued whenever a user applies the older syntax; this would > > inform the user of the impending breaking change while still > > allowing existing code to compile. When it is convenient, a future > > release would only support music as the argument. > > What about providing a new command `\upbeat` and moving `\partial` > into oblivion? Compare this to `\tuplet` vs. `\times`. > > > Werner > >
Re: Should \partial accept music instead of duration?
> 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 music; but the following does seem to work: >> >> ... >> I wouldn't want to have to explain to users why these turn out >> different. >> \score { >> \fixed c' { >> \partial 4. 4. >> } >> } >> \score { >> \fixed c' { >> \partial c4. c4. >> } >> } >> > > Fair point, though the intention here would be that backwards > compatibility would only need to exist for a time. A warning could > be issued whenever a user applies the older syntax; this would > inform the user of the impending breaking change while still > allowing existing code to compile. When it is convenient, a future > release would only support music as the argument. What about providing a new command `\upbeat` and moving `\partial` into oblivion? Compare this to `\tuplet` vs. `\times`. Werner