Re: Guitar notation - scheme function for slurs with markup
Hi Lukas, yes, that is what I need, I can take it from there - many thanks for the quick response and solution, and the explanations! Stefan -- Stefan E. Mueller stefan.e.muel...@gmx.de On Sun, 29 May 2022, Lukas-Fabian Moser wrote: Hi Stefan, Am 29.05.22 um 22:42 schrieb Stefan E. Mueller: I am not sure yet what the difference between a scheme-function and a music-function is (the second example seems to work whichever definition is chosen). A music function must return music, a scheme function can return more general expressions (for instance, a new function or a list of symbols). The "-" dash in my case added an (unwanted) accentuation to the first note, I get the slur with the markup without the accent only if I remove it (not sure what it is supposed to do - manual says it is a required named direction indicator, but in my version 2.22.1 it doesn't work like that). Ah, I thought you wanted the accent. :-) Both the - and ^ symbols have various meanings; it's important to read them in order. Add articulation with neutral direction/up-facing/down-facing: -!, ^!, _! (here I use ! = staccatissimo as an articulation, but ( = slur, ^ = marcato and - = tenuto are other examples) If you just want a slur that should have its direction forced upwards, just write ^( I thought the function-constructs were merely doing variable substitutions, but it seems there is more to this. Because now I have the problem how to describe several hammer-ons in a row with a function, like this: \new Staff { e''8^(^\markup {\halign #-1.5 ho} f''8)^\markup {\halign #-1.5 ho} g''\8) } Ideally, I'd like to be able to write this like e''8 \ho f''8 \ho g''8 (with the corresponding closing brackets also provided by the function, but it may be that this is not possible). I assume you want another slur to start on the f''? Then maybe something like this: \version "2.22" ho = #(define-music-function (spacing music) ((number? -1.5) ly:music?) #{ <>^(^\markup {\halign #spacing ho} #music <>) #}) \new Staff { e''8 \ho f''8 \ho g''8 a'' } Lukas
Any LyX users? Missing prerequisites: lilypond-book->latex
[Asked on the lyx mailing list but, so far, no response.] Hi, I'm running the latest -- and greatest(?) -- release of Pop!_OS, which is effectively Ubuntu. Specifically, 22.04 LTS ("Jammy"). I'm finding myself having a hard enough time with LilyPond alone, without the added burden of learning everything about LaTeX, XeTeX, LuaTeX, etc, (just to get the font I want) along with LilyPond-Book. So, I'm hoping, for what I want to do, that LyX -- which I also don't know, will be less of a climb. I've just installed LyX and have not adjusted any preferences / options / configurations. When I try Help -> Specific Manuals -> LilyPond I get a pop-up: __ The module lilypond requires a package that is not available in your LaTeX installation, or a converter that you have not installed. LaTeX output may not be possible. Missing prerequisites: lilypond-book->latex See section 3.1.2.3 (Modules) of the User's Guide for more information. __ I've read elsewhere that it should just work "out of the box" on Ubuntu systems. I ran the Tools->Reconfigure (though from everything I read it wasn't necessary). No change. It still didn't find what it's looking for. Anyone know what I'm missing? P.S. For the record, I have: $ lyx --version LyX 2.3.6 (2020-11-27) Configuration Host type: x86_64-pc-linux-gnu ... $ lilypond --version GNU LilyPond 2.22.1 $ lilypond-book --version 2.22.1 $ latex --version pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) kpathsea version 6.3.4/dev Copyright 2021 Han The Thanh (pdfTeX) et al. Just to be sure: $ dpkg -l | \ > tr -s "\t " " " | \ > cut -d " " -f 2-3 | \ > egrep "(lyx|tex|lilypond)" | \ > egrep -v "tex(t|port)" fonts-lyx 2.3.6-1 fonts-texgyre 20180621-3.1 geany-plugin-latex 1.38+dfsg-1 latexmk 1:4.76-1 libptexenc1:amd64 2021.20210626.59705-1build1 libsynctex2:amd64 2021.20210626.59705-1build1 libtexlua53:amd64 2021.20210626.59705-1build1 libtexluajit2:amd64 2021.20210626.59705-1build1 lilypond 2.22.1-2 lilypond-data 2.22.1-2 lilypond-doc 2.22.1-2 lilypond-doc-html 2.22.1-2 lilypond-doc-pdf 2.22.1-2 lilypond-fonts 2.22.1-2 lyx 2.3.6-1 lyx-common 2.3.6-1 pd-motex 1.1.4-4 preview-latex-style 12.2-1ubuntu1 tex-common 6.17 tex-gyre 20180621-3.1 texinfo 6.8-4build1 texlive 2021.20220204-1 texlive-base 2021.20220204-1 texlive-binaries 2021.20210626.59705-1build1 texlive-extra-utils 2021.20220204-1 texlive-font-utils 2021.20220204-1 texlive-fonts-recommended 2021.20220204-1 texlive-fonts-recommended-doc 2021.20220204-1 texlive-lang-english 2021.20220204-1 texlive-lang-greek 2021.20220204-1 texlive-latex-base 2021.20220204-1 texlive-latex-base-doc 2021.20220204-1 texlive-latex-extra 2021.20220204-1 texlive-latex-extra-doc 2021.20220204-1 texlive-latex-recommended 2021.20220204-1 texlive-latex-recommended-doc 2021.20220204-1 texlive-luatex 2021.20220204-1 texlive-metapost 2021.20220204-1 texlive-metapost-doc 2021.20220204-1 texlive-pictures 2021.20220204-1 texlive-pictures-doc 2021.20220204-1 texlive-plain-generic 2021.20220204-1 texlive-science 2021.20220204-1 texlive-xetex 2021.20220204-1 -- Physical Kevin Cole, RHCE ("ubuntourist") Brain-Washington, Disenfranchised City Virtual Git: https://codeberg.org/ubuntourist/ CV: https://stackoverflow.com/cv/ubuntourist/ LinkedIn: https://linkedin.com/in/ubuntourist/ GPG Key ID: 0x3E696927
Re: PDF Bookmarks
You wrote: >> > Sigh ... It would appear that bookmarks don't work when > there are bookparts. I've opened [issue 6355] > Thanks, Jean. Much appreciated. .. mark.
Re: issues with "afterGrace" since 2.20
Thanks, everyone, for the detailed explanations and the proposed solution! -Ahanu On Sat, May 28, 2022 at 7:28 AM David Kastrup wrote: > Lukas-Fabian Moser writes: > > > Hi Ahanu, > > > >> In lilypond 2.20.0, I was able to use "afterGrace" like this: > >> > >> \version "2.20.0" > >> \language "english" > >> \relative c' { d2 \afterGrace 4 { cs16 d } } > >> > >> However, this now presents an error: "warning: \afterGrace exceeds > >> duration of main argument". Running ly-convert does not fix it. > >> > >> If I change "\aftergrace 4" to "\aftergrace d4", it works > >> fine. However, I have multiple documents written with the > >> aforementioned syntax, and it would take a long time to fix them > >> manually. Any suggestions? > > > > Actually, the example you posted gives a different warning because you > > reduced it "too much". > > > > Here's what happens: \afterGrace accepts an optional argument > > indicating the amount of time (as a fraction of the main note) after > > which the grace should appear. > > > > In 2.20, this was defined via: > > > > #(define-music-function (fraction main grace) ((fraction?) ly:music? > > ly:music?) ... > > > > LilyPond now sees that 4 is not a fraction?, hence assumes no > > "fraction" was given, and interprets 4 as ly:music? yielding the > > "main" note. Then, { cs16 d } becomes the "grace" part, as intended by > > you. > > > > In 2.22, the definition was changed to: > > > > #(define-music-function (fraction main grace) ((scale?) ly:music? > > ly:music?) ... > > > > Now scale? is defined (in c++.scm) as > > > > (define-public (scale? x) > > (or (and (rational? x) (exact? x) (not (negative? x))) > > (fraction? x) > > (and (ly:moment? x) (scale? (ly:moment-main x) > > > > meaning: A scale? can be > > - a fraction? > > - an non-negative exact rational number > > - a LilyPond moment whose main part is in turn a scale?. > > > > This is fulfilled by 4, hence in your call to \afterGrace 4 { cs16 d }, > > ... 4 is taken to be the afterGrace "fraction" (and in recent > > versions, there is the warning, added by me, that this fraction is > > larger than 1) > > ... { cs16 d } is taken to be the "main" note > > ... whatever comes after is taken to be the "main" note (since in your > > minimal example, nothing comes after this, compilation fails > > completely). > > > > I'm not sure about David Kastrup's rationale for allowing a scale? as > > an afterGraceFraction, but if anybody is aware about the implications > > his changes might have for LilyPond's syntax, it's him. > > https://gitlab.com/lilypond/lilypond/-/issues/5327 > > > https://gitlab.com/lilypond/lilypond/-/commit/027538606b016afb643555d654cefaee94dfb424 > > The respective commit is > > commit 027538606b016afb643555d654cefaee94dfb424 > Author: David Kastrup > Date: Wed May 23 19:08:31 2018 +0200 > > Issue 5327/4: Let \afterGrace and \scaleDurations take a scale > > That's more versatile than allowing just a fraction as a pair > as previously. > > "More versatile" means that you previously could use 3/4 but could not > use #3/4 or the equivalent ##e.75 . Those are acceptable as scale > factors for durations like 1 * ##e.75 (and naturally also 1 * 4) so it > seemed like it would make for a more natural specification of the > (optional) scale factor to allow the predicate scale? here as well. > > It does have semantic conflict with the 2.20(?) feature of having > isolated durations register as notes. > > Which was accepted as a music function argument only with > > commit 1d9fc4b1512eb69a28677890dc26658c3552c6cd > Author: David Kastrup > Date: Thu Feb 25 19:36:20 2016 +0100 > > Issue 4779: Accept isolated durations as music function arguments > > (later than the original feature) because I was queasy about the > implications but it appeared that it was more confusing when this did > not work. > > So it's a case of an emergent ambiguity that seemed like the lesser > drawback and compatibility/coherence headache compared to not going > ahead. > > For the optional argument of \afterGrace, there would be some incentive > in case of a duration to interpret it as a duration rather than as a > scale factor. That would, however, make this different from either what > \afterGraceFraction accepts, or what its name insinuates. Also it would > make the predicate scale? be an inadequate description of what the > argument's type is which would functionally be > non-duration-scale-or-duration? which of course has the exact same > implementation. > > In short, a maze of conflicting considerations in the context of > creating versatile and uniform behavior leading to a so-so outcome. > > -- > David Kastrup >
Re: Guitar notation - scheme function for slurs with markup
Hi Stefan, Am 29.05.22 um 22:42 schrieb Stefan E. Mueller: I am not sure yet what the difference between a scheme-function and a music-function is (the second example seems to work whichever definition is chosen). A music function must return music, a scheme function can return more general expressions (for instance, a new function or a list of symbols). The "-" dash in my case added an (unwanted) accentuation to the first note, I get the slur with the markup without the accent only if I remove it (not sure what it is supposed to do - manual says it is a required named direction indicator, but in my version 2.22.1 it doesn't work like that). Ah, I thought you wanted the accent. :-) Both the - and ^ symbols have various meanings; it's important to read them in order. Add articulation with neutral direction/up-facing/down-facing: -!, ^!, _! (here I use ! = staccatissimo as an articulation, but ( = slur, ^ = marcato and - = tenuto are other examples) If you just want a slur that should have its direction forced upwards, just write ^( I thought the function-constructs were merely doing variable substitutions, but it seems there is more to this. Because now I have the problem how to describe several hammer-ons in a row with a function, like this: \new Staff { e''8^(^\markup {\halign #-1.5 ho} f''8)^\markup {\halign #-1.5 ho} g''\8) } Ideally, I'd like to be able to write this like e''8 \ho f''8 \ho g''8 (with the corresponding closing brackets also provided by the function, but it may be that this is not possible). I assume you want another slur to start on the f''? Then maybe something like this: \version "2.22" ho = #(define-music-function (spacing music) ((number? -1.5) ly:music?) #{ <>^(^\markup {\halign #spacing ho} #music <>) #}) \new Staff { e''8 \ho f''8 \ho g''8 a'' } Lukas
Re: Guitar notation - scheme function for slurs with markup
Hi Lukas, many thanks for your quick answer. Obviously, things are more complex than I thought. Both of your solutions work for the problem, I tend to be more inclined towards the second one. But I still have to understand better what is going on here. I am not sure yet what the difference between a scheme-function and a music-function is (the second example seems to work whichever definition is chosen). The "-" dash in my case added an (unwanted) accentuation to the first note, I get the slur with the markup without the accent only if I remove it (not sure what it is supposed to do - manual says it is a required named direction indicator, but in my version 2.22.1 it doesn't work like that). I thought the function-constructs were merely doing variable substitutions, but it seems there is more to this. Because now I have the problem how to describe several hammer-ons in a row with a function, like this: \new Staff { e''8^(^\markup {\halign #-1.5 ho} f''8)^\markup {\halign #-1.5 ho} g''\8) } Ideally, I'd like to be able to write this like e''8 \ho f''8 \ho g''8 (with the corresponding closing brackets also provided by the function, but it may be that this is not possible). Stefan -- Stefan E. Mueller stefan.e.muel...@gmx.de On Sun, 29 May 2022, Lukas-Fabian Moser wrote: Hi Stefan, please try to always give a compilable examle, otherwise people have to collect your ideas from your mail bit by bit :). You could use an event-function; these are made for postfix use (i.e. after the respective note): \version "2.22" ho = #(define-event-function (spacing) (number?) #{ -^(^\markup {\halign #spacing ho} #}) \new Staff { e''8 f''8\ho #-1.5 a'') } Note that I had to escape the -1.5 with #, this is expected for negative numbers. With this solution, the "spacing" parameter cannot be made optional. This can be achieved by going back to music functions and putting the (optional) spacing first: \version "2.22" ho = #(define-music-function (spacing music) ((number? -1.5) ly:music?) #{ <>-^(^\markup {\halign #spacing ho} #music #}) \new Staff { e''8 \ho #-2.5 f''8 a'') } \new Staff { e''8 \ho f''8 a'') } Here, I have used the "empty chord trick": <> is an empty chord that doesn't take up time; any slurs and articulations attached to this chord will be attached to the first bit of music coming after it. I hope I didn't miss important parts of your question in my hurry :-). Lukas
Re: Guitar notation - scheme function for slurs with markup
Hi Stefan, please try to always give a compilable examle, otherwise people have to collect your ideas from your mail bit by bit :). You could use an event-function; these are made for postfix use (i.e. after the respective note): \version "2.22" ho = #(define-event-function (spacing) (number?) #{ -^(^\markup {\halign #spacing ho} #}) \new Staff { e''8 f''8\ho #-1.5 a'') } Note that I had to escape the -1.5 with #, this is expected for negative numbers. With this solution, the "spacing" parameter cannot be made optional. This can be achieved by going back to music functions and putting the (optional) spacing first: \version "2.22" ho = #(define-music-function (spacing music) ((number? -1.5) ly:music?) #{ <>-^(^\markup {\halign #spacing ho} #music #}) \new Staff { e''8 \ho #-2.5 f''8 a'') } \new Staff { e''8 \ho f''8 a'') } Here, I have used the "empty chord trick": <> is an empty chord that doesn't take up time; any slurs and articulations attached to this chord will be attached to the first bit of music coming after it. I hope I didn't miss important parts of your question in my hurry :-). Lukas
Guitar notation - scheme function for slurs with markup
When notating guitar music, I use a slur with a markup to indicate hammer-ons, pull-offs, slides or bendings, like in this example: \new Staff { e''8^(^\markup {\halign #-1.5 ho} f''8) } I'd like to define a scheme function for the slur and markup, such that I can write \new Staff { e''8 \ho f''8 } I tried ho = #(define-scheme-function (music spacing) (ly:music? number?) #{ {^(^\markup {\halign #-1.5 ho} $music )} #}) But this only displays the note and the markup text "ho", but not the slur. Maybe I need to escape the many special characters, but my trials did not work. I'd also like to pass a second parameter "spacing" to horizontally align the markup text on the slur. But if I substitute the "-1.5" in the function with "$spacing", I get an "error: syntax error, unexpected REAL" when I do \new Staff { e''8 \ho f''8 -1.5 } By the way, would it be possible to have this second parameter optional, e.g. to fall back to a default value in case it is not given?). I have just started to work with functions in Lilypond, and it maybe that there are better solutions to this problem than using a scheme function, but I am obviously struggling to get it working. Any hint would be very much appreciated, Stefan -- Stefan E. Mueller stefan.e.muel...@gmx.de
Re: issues with "afterGrace" since 2.20
Hi, The reason is that for some weeks now, I've been having issues with mail delays on the LilyPond mailing lists: I routinely receive e-mails 1-2 days late, and most of the time, I see replies to messages that haven't arrived yet. While I'm sure no information gets lost in the long run, this nevertheless has taken the fun out of following the lists a bit for me. It's not just you. I am also regularly receiving emails with a delay of 3 or 4 hours, although not as much as 2 days. See also https://lists.gnu.org/archive/html/lilypond-user/2022-05/msg00397.html https://lists.gnu.org/archive/html/lilypond-user/2022-05/msg00183.html https://lists.gnu.org/archive/html/lilypond-user/2022-02/msg00031.html Does anyone know whom we could write to at GNU? This is getting annoying. Well, in my case, the delay seems to have been occurring between gnu.org and gmx.net: 5 8 hour lists.gnu.org 209.51.188.17 mx-ha.gmx.net 212.227.17 I had delays in the range up to 18 hours in the mail headers I looked into. Since I changed my subscription from my gmx adress to my gmail address, everything seems to be fine. So it seems to depend on which e-mail provider the mailing list contents are being sent to. But I know next to nothing about e-mail routing. Lukas
Re: OLL project status update
Hello Andrew, would you consider using something like liberapay.com for the funding of the running costs? I think this would be advantageous for matters of handling of recurrence and for transparency, i.e. knowing how much is needed to fund the costs. Cheers, Valentin Am Sonntag, 29. Mai 2022, 08:58:19 CEST schrieb Andrew Bernard: > The OLL project is mostly up and running again now. I have made Linux > server and I'm running a Wordpress site to act as minimal central > portal. and a Discourse server to technical discussions, help and support. > > https://openlilylib.space/ > > You can make a free login account on Discourse and all users are welcome. > > Since the technical development of OLL is not really of interest to all > LilyPond end users, I think its good to have its own world and forum. > Besides. Discourse is much nicer than mailing lists, but please note it > can act in parallel as a mailing list as well - set that in your user > preferences. > > I'll next finalise setting up the GitHub OLL repository, which is the > whole point actually, and will soon be able to take pull requests and so on. > > The funding for the server and domain name registration is coming from > my own pocket. Server costs are about $20 per month and DNS registration > about $30 per year. There's a Donate page if people would be so kind. > > Note that this OLL project has nothing to do with the old Scores of > Beauty site, and we are discussing that separately. > > One day I hope much of the OLL work can be incorporated into baseline > LilyPond. Until then I believe it can serve a very useful function. > > Andrew signature.asc Description: This is a digitally signed message part.
Re: PDF Bookmarks
Le 29/05/2022 à 04:18, Mark Probert a écrit : You wrote: You apparently inserted '%%' before that line. This is within Scheme code, so comments should be introduced by ';', not '%'. Doh! Thanks. With that particular problem fixed, I redid the example and still am running across the problem of Preview not showing the ToC, though it does so in other PDFs. I've made a "simple" example of the production lilypond files so, if creation works as described (and I don't doubt it does!) then there is something about the way I'm create the ToC entries that is causing an issue. In the example I'm making a book using a main file that includes tunes placed in separate include files. I've simplified some and the two tunes are the same but the PDF result is the same as my "production" PDFs. Thanks for any help or insight. Sigh ... It would appear that bookmarks don't work when there are bookparts. I've opened https://gitlab.com/lilypond/lilypond/-/issues/6355 For now, try to see if you can do without bookparts, possibly using \pageBreak. Best, Jean
Re: OLL project status update
Le 29/05/2022 à 08:58, Andrew Bernard a écrit : Besides. Discourse is much nicer than mailing lists, but please note it can act in parallel as a mailing list as well - set that in your user preferences. How does one do that? I read on the web that I am supposed to find a "turn on mailing list mode" setting in the preferences, but I don't see it … Thanks, Jean
OLL project status update
The OLL project is mostly up and running again now. I have made Linux server and I'm running a Wordpress site to act as minimal central portal. and a Discourse server to technical discussions, help and support. https://openlilylib.space/ You can make a free login account on Discourse and all users are welcome. Since the technical development of OLL is not really of interest to all LilyPond end users, I think its good to have its own world and forum. Besides. Discourse is much nicer than mailing lists, but please note it can act in parallel as a mailing list as well - set that in your user preferences. I'll next finalise setting up the GitHub OLL repository, which is the whole point actually, and will soon be able to take pull requests and so on. The funding for the server and domain name registration is coming from my own pocket. Server costs are about $20 per month and DNS registration about $30 per year. There's a Donate page if people would be so kind. Note that this OLL project has nothing to do with the old Scores of Beauty site, and we are discussing that separately. One day I hope much of the OLL work can be incorporated into baseline LilyPond. Until then I believe it can serve a very useful function. Andrew