Re: Windows users - Call for testing
Am 29.06.2024 um 01:10 schrieb Paul Hodges: I've compiled seven choral scores of varying complexity with no problems. My most complex instrumental scores will have to wait until I have time to update them manually - convert-ly can't cope with them. Paul Thanks for testing!
Re: Windows users - Call for testing
Am 29.06.2024 um 00:31 schrieb Jean Abou Samra: Le vendredi 28 juin 2024 à 22:22 +, bobr...@centrum.is a écrit : Michael, I'm sorry, but I don't really understand what your code does, nor do I know what to do with it in a real score. If you want to throw a score at me using it I'll be happy to run LilyPond 2.25.17 (Guile 3.0) and let you know the results. I think he was just asking you to try any real score that you have. Not somehow inserting the test code into it. Yes, exactly. It would be great if you could run the patched release on some real scores you have available.
Re: Windows users - Call for testing
Thanks, but could you give it a try on a real score? That would be very helpful! Michael Am 27.06.2024 um 15:30 schrieb bobr...@centrum.is: Tried again with the code 'massaged' by Jean. Here's the output: $ ./bin/lilypond.exe test.ly GNU LilyPond 2.25.17 (running Guile 3.0) Processing `test.ly' Parsing...1/2 -7/2 #f Success: compilation successfully completed *From: *"Jean Abou Samra" *To: *"Michael Käppler" , "bobroff" *Cc: *"Lillypond Users Mailing List" *Sent: *Thursday, June 27, 2024 1:24:14 PM *Subject: *Re: Windows users - Call for testing > Hmm, but that looks like syntax errors in your test.ly file that are unrelated > to the Guile patches. As can be seen in the list archives, Klaus' mail client inserted spurious newlines that turn parts of comments into non-comments. The correct code should be #(define step 1) #(define cnt -3) #(define limit (+ cnt 0.3)) #(display (/ step 2)) #(newline) #(display (- cnt (/ step 2))) #(newline) #(display (> (- cnt (/ step 2)) limit))
Re: Windows users - Call for testing
Hmm, but that looks like syntax errors in your test.ly file that are unrelated to the Guile patches. Did you forget a '#' somewhere to enter Scheme mode? Can you share your `test.ly` file? Michael Am 27.06.2024 um 13:31 schrieb bobr...@centrum.is: For what it's worth, I just tried it on Windows 11 and got this console output: GNU LilyPond 2.25.17 (running Guile 3.0) Processing `test.ly' Parsing... test.ly:5:8: error: syntax error, unexpected EVENT_IDENTIFIER, expecting '.' or '=' integer ) 1/2test.ly:9:13: error: syntax error, unexpected EVENT_IDENTIFIER, expecting '.' or '=' respectively ) -7/2test.ly:12:13: error: syntax error, unexpected EVENT_IDENTIFIER, expecting '.' or '=' respectively ) #ftest.ly:16:5: error: syntax error, unexpected >, expecting '.' or '=' not > -3 fatal error: failed files: "test.ly" ---- *From: *"Michael Käppler" *To: *"Lillypond Users Mailing List" *Sent: *Thursday, June 27, 2024 10:28:27 AM *Subject: *Windows users - Call for testing Hi all, I recently tried to fix some of the remaining problems that we have with Lilypond (or, more precisely, Guile) running under Windows, e.g. https://lists.gnu.org/archive/html/bug-lilypond/2024-04/msg7.html I made a experimental release based on an upgrade to Guile 3.0.10 and the bugfixes. I would really love to see it tested by Windows users before we incorporate the changes into our next development release. You can download the release here: https://drive.google.com/file/d/1yjXZ_2vUQeNi-3djbXQmyhUB_sInpxr3/view?usp=sharing Thanks, Michael
Windows users - Call for testing
Hi all, I recently tried to fix some of the remaining problems that we have with Lilypond (or, more precisely, Guile) running under Windows, e.g. https://lists.gnu.org/archive/html/bug-lilypond/2024-04/msg7.html I made a experimental release based on an upgrade to Guile 3.0.10 and the bugfixes. I would really love to see it tested by Windows users before we incorporate the changes into our next development release. You can download the release here: https://drive.google.com/file/d/1yjXZ_2vUQeNi-3djbXQmyhUB_sInpxr3/view?usp=sharing Thanks, Michael
Re: Frescobaldi?
> Thanks, but unfortunately the kind of work needed is deeply technical, not > busy work. > Just had a quick look. It seems to me we need to create a python-poppler-qt6, port qpageview to Qt6 and of course frescobaldi itself. I would hope that qpageview and frescobaldi both basically mean moving from PyQt5 to PyQt6 which I expect to be mostly busy work. The poppler bindings seem to require understanding of what poppler does though. All of the above is based on a brief look and thus not a reliable assessment. In any case, I do rely on Frescobaldi and am willing to help keep it alive. Kind regards, Michael
Re: Spacing between staves
Hi Peter, On Thursday, 25 April 2024 09:44:56 EDT Peter Mayes wrote: > What I want is for the second movement, on the second page, to have > slightly increased vertical spacing between staves. (It has 32nd and > even a few 64th notes, and just looks a little "bunched up" to my eyes.) > > I can only see ways to set the vertical spacing globally in the \paper > block. You can indeed accomplish this, with a little bit of rearranging. \paper blocks can go a few different places, one of which is a \bookpart And as \bookparts are by default separated by a page break, and you are (apparently) wanting a page break between the two movements, this is a bit of two birds, one stone thing here. Basically, put each movement into it's own \bookpart. You can then give each movement it's own paper block, while still having a global paper block if you want one. The bookparts will also take care of the page break for you, so that can be removed. You'll end up with a structure something like: \version "2.24.1" \paper { global \paper settings } FirstMovement = { ... } \bookpart { \paper { \paper setting specific to the 1st movement } \score { \new Staff { \FirstMovement } \layout {} } } SecondMovement = { ... } \bookpart { \paper { \paper setting specific to the 2nd movement } \score { \new Staff { \SecondMovement } \layout {} } } \bookpart sections can have their own \paper block, even their own \header blocks. For a bit more see: https://lilypond.org/doc/v2.24/Documentation/notation/multiple-scores-in-a-book[1] -- Michael [1] https://lilypond.org/doc/v2.24/Documentation/notation/multiple-scores-in-a-book signature.asc Description: This is a digitally signed message part.
Re: Horizontal note spacing in chant template
Hi Richard, On 2024-Apr-17 06:45, rich...@oneill-griffiths.net wrote: Hi, I’ve been using the Anglican chant template to set items for our choir and I’ve just a note spacing problem with one chant (Walford Davies) last quarter. How do I address the note spacing for the B/C clash in the 3^rd bar? Now if there’s also an easier way to show that voice split in the tenor part, I’d appreciate it. Probably better ways to go about this, but what I came up with is to change the tenor part to: TenorMusic = \relative { g1 af2 c2 c2 \new Voice = "melody" { << \new Voice { \voiceFour \once \override NoteColumn.force-hshift = 1.2 bf4 af4 g1 } { \voiceOne c2 c1 } >> } } This results in: -- Michael OpenPGP_signature.asc Description: OpenPGP digital signature
Re: afterGrace, glissando, and hidenotes
Hi Walt, On 4/11/24 13:11, Walt North wrote: > Hello, I would appreciate some help with this music function. > > The end goal is have a define function produce a glissando after a > note going either up or down to undetermined second note. For > example a guitar slide down off the note. If I'm understanding correctly what you're after there's an existing function for this. Have a look at: https://lilypond.org/doc/v2.24/Documentation/notation/expressive-marks-as-curves#index-fall-1 As an example: \version "2.24.2" musicOne = \relative c'' { r4 c4\bendAfter #+1 r2 r4 c4\bendAfter #-1 r2 r4 c4\bendAfter #+2 r2 r4 c4\bendAfter #-2 r2 } musicTwo = \relative c'' { \override Score.SpacingSpanner.shortest-duration-space = #4.0 r4 c4\bendAfter #+1 r2 r4 c4\bendAfter #-1 r2 r4 c4\bendAfter #+2 r2 r4 c4\bendAfter #-2 r2 } \score { \musicOne } \score { \musicTwo } This gives: [image: image.png] -- Michael
Re: sheet music
Hi Tyler, i’m no musician, but am trying to provide sheet music for the violinist to play at our wedding. is it possible to transcribe this song into sheet music with your software? Do you mean the keyboard ostinato motiv? Chords an lyrics you should easily find on the internet. Anyway, here's the keyboard motiv. Might have to be transposed. - snip - snip - snip - snip - snip - snip - \version "2.25.13" \paper { indent = 0 } \header { title = "Kim Smoltz" subtitle = \markup \override-lines #'(baseline-skip . 2.5) { \column \center-align { "from the „Mollusk Sessions“" } } composer = \markup \override-lines #'(baseline-skip . 2.5) { \column \right-align { %"Ween, 1995" "Ween" } } } global = { \key des \major \time 4/4 \partial 2 \accidentalStyle modern } keyboard = \relative f' { \global \repeat volta 2 { r8 ges8 as bes~ | bes8 as ges e~ e8 es e8 ges~ | ges8 e es des~ des8 b des8 es~ | es8 des b bes~ bes8 as bes8 b~ | b2 } } \score { \keyboard \layout {} \midi { \tempo 4=108 } } - snip - snip - snip - snip - snip - snip - -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver Kim-Smoltz-Ween.pdf Description: Adobe PDF document
Re: indicate scordatura at beginning of piece
Hi Dirck, On Fri, Apr 5, 2024 at 5:36 PM Dirck Nagy wrote: > Hello Michael! > > First of all, thank you for your patience! I don't have much computer > code experience, so i apologize if i am asking questions that are obvious > to most others. > > This custom header looks like the most promising solution, but I had a > couple problems: > > > 1. The link you sent doesnt work; i cant find anything called > "default header block" in the lilypond manuals. Could you re-send, please? > The link I sent wasn't actually a web link - it was referring to a file that will be on your hard drive as part of LilyPond itself. However, the relevant section of the documentation would be section 3.3 of the Notation Reference: https://lilypond.org/doc/v2.25/Documentation/notation/titles-and-headers for the 2.25 development series, or https://lilypond.org/doc/v2.24/Documentation/notation/titles-and-headers for the 2.24 non-development series. To locate the file I referred to, you'll need to find where LilyPond is installed on your system. The path I gave in my earlier email was a partial file path, omitting the first section as that part will vary depending on your specific installation. On my system, I have a general lilypond directory in my home directory. All the different versions of lilypond just get dropped into that directory. So, for the latest development version of LilyPond (that's 2.25.14) the full path for my particular installation to the file I referenced is: /home/michael/lilypond/lilypond-2.25.14/share/lilypond/2.25.14/ly/ titling-init.ly 2. I couldnt get the examples. I'm sure this is due to my > misunderstanding of basic concepts, so could i ask you to send the complete > lilypond file for the example you sent? This way, I could paste it into an > empty document. > Sure can. Here goes: \version "2.25.14" % Can also be changed to ... % \version "2.24.3" % ... or whichever version you use \paper { bookTitleMarkup = \markup { \override #'(baseline-skip . 3.5) \column { \fill-line { \fromproperty #'header:dedication } \override #'(baseline-skip . 3.5) \column { \fill-line { \huge \larger \larger \bold \fromproperty #'header:title } \fill-line { \large \bold \fromproperty #'header:subtitle } \fill-line { \smaller \bold \fromproperty #'header:subsubtitle } \fill-line { \fromproperty #'header:poet { \large \bold \fromproperty #'header:instrument } \fromproperty #'header:composer } \fill-line { \fromproperty #'header:meter \fromproperty #'header:arranger } \fromproperty #'header:scordatura % <-- This line is what defines the custom header } } } } \header { title = "Example Title" composer = "Composer here" poet = "Poet here" arranger = "Arranger here" meter = "Meter here" scordatura = \markup { \override #'(baseline-skip . 2.75) % Adjust this value ... \fontsize #-1.5 % ... and this one as needed \column { \line { \circle "6" "= D" } \line { \circle "5" "= G" } } } } \score { \new Staff { \new Voice { c''1 d''1 } } } The bookTitleMarkup block can be changed just as much or as little as you desire. It's basically just a block of markup. Something like this (adding a single custom header) is just scratching the surface. If you wanted, you could completely redefine the entire header section, to make it completely your own. Another part of just how configurable LilyPond can be. The learning curve can be a bit steep at times, but I think it's well worth it. -- Michael
Re: indicate scordatura at beginning of piece
Hi Dirck, On Thu, Apr 4, 2024 at 11:49 PM Dirck Nagy wrote: > Hi Lilypond > > What are my options for indicating scordatura such as the png image at the > bottom of this email? > If this is something that you'll be doing on a regular (or even semi-regular) basis I'd consider defining a custom header for this. It's pretty easy to do. The default header block is found at share/lilypond/2.25.14/ly/titling-init.ly under the lilypond install point. Probably best to copy and paste the header block into an include file and make your tweaks there. That way it's all there and accessible but out of the way. To add a custom field at, for example, the very bottom of the header block, you can simply add a field as such: \fill-line { \fromproperty #'header:poet { \large \bold \fromproperty #'header:instrument } \fromproperty #'header:composer } \fill-line { \fromproperty #'header:meter \fromproperty #'header:arranger } \fromproperty #'header:scordatura % Line added here You would then use the newly defined scordatura header field like any other header: \header { title = "Example Title" composer = "Composer here" poet = "Poet here" arranger = "Arranger here" meter = "Meter here" scordatura = \markup { \override #'(baseline-skip . 2.75) % Adjust this value ... \fontsize #-1.5 % ... and this one as needed \column { \line { \circle "6" "= D" } \line { \circle "5" "= G" } } } } This will, in turn, produce: [image: image.png] -- Michael
Re: LilyPond 2.25.14
Am 23.03.24 um 17:55 schrieb Karlin High: The attached zip folder is what I used in the previous post. It was derived from a post by Vaughan McAlley in 2016, updated via convert-ly to the version in question here. It looks like back in 2016, on the same computer I now have, LilyPond 2.19.46 was taking 1 min 4 seconds for it. How carefully did you compare? Given the 7 warnings Warning: the property 'extra-X-extent' does not exist (perhaps a typing error) Warning: the property 'extra-X-extent' does not exist (perhaps a typing error) Warning: the property 'extra-X-extent' does not exist (perhaps a typing error) Warning: the property 'extra-X-extent' does not exist (perhaps a typing error) Warning: the property 'extra-X-extent' does not exist (perhaps a typing error) Warning: the property 'extra-X-extent' does not exist (perhaps a typing error) Warning: the property 'extra-X-extent' does not exist (perhaps a typing error) in divisionis.ly I'd expect some subtle spacing changes involving the various barlines etc. derived from breathing signs. I have no doubt that it looks close enough though. Congrats on the speed-up, developers! Definitely. For the record: real0m13,203s user0m12,789s sys 0m0,347s on my AMD Ryzen 7 7840HS Notebook with 32GB RAM on ArchLinux. Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver
Re: LilyPond 2.25.14
Am 24.03.2024 um 11:50 schrieb Jonas Hahnfeld: Just out of interest, do we tweak the JIT_THRESHOLD somewhere or do we use the default value? I don't think we change it from LilyPond, so likely using the default value. I did a test with the opposite extremes. Again, 10 subsequent runs with the score I tested before. Note that the times are not quite comparable with my last findings, because my laptop ran on a different energy saving state. GUILE_JIT_THRESHOLD=0 (compile each function at first sight) real 4m8.780s user 0m0.075s sys 0m0.167s GUILE_JIT_THRESHOLD=-1 (disable JIT compilation) real 4m4.925s user 0m0.030s sys 0m0.136s So either the env variable is not working as intended, or there is only a very small effect. At least setting `GUILE_JIT_LOG` does work, but one would have to read the source to understand the output. Michael
Re: LilyPond 2.25.14
Hi Jonas, thanks for working on this! Windows build with Guile JIT: https://cloud.hahnjo.de/s/Ek5x9rybpiPNtoj This turns on just-in-time compilation that was added in Guile 3.0, but we had to keep disabled on Windows until now. Please test, especially on larger scores where this should provide a performance advantage. I gave it a try with a medium-sized score (appr. 60 pages A4), 10 times in a row: with JIT: real 4m42.513s user 0m0.090s sys 0m0.185s without JIT: real 4m45.295s user 0m0.046s sys 0m0.277s Just out of interest, do we tweak the JIT_THRESHOLD somewhere or do we use the default value? Michael
Re: Dynamics collide with span bar (was Re: Chord names collide with span bar)
Many thanks, Aaron. So here is a cleaner MWE, with your fix: \version "2.25.13" #(ly:set-option 'debug-skylines #t) \layout { \context { \Score \override NonMusicalPaperColumn.show-horizontal-skylines = ##t } } \layout { \context { \Dynamics \consists Pure_from_neighbor_engraver \remove Bar_engraver } } \score { \new GrandStaff << \new Staff \relative { e''4 4 4 4 | 4 4 4 4 } \new Dynamics { s1 | s1 \ppp } \new Staff \relative { d''4 4 4 4 | 4 4 4 4 } >> } Then, it should be added that transposing your first fix (namely, BarLine.bar-extent = #'(0 . 1) and transparent = ##t) DOES solve the issue WITH “Bar_engraver” consisted. How does that make sense? I probably don’t get what "Span_bar_stub_engraver getting tripped up by the Bar_engraver” entails. It might be useful to keep it in mind, in order to identify cases where the fix messes up something. Same MWE as above, with this instead: \layout { \context { \Dynamics \consists "Bar_engraver" \override BarLine.bar-extent = #'(0 . 1) \override BarLine.transparent = ##t } }
Re: Question about voltas and repeats
Hi Lucas, > On Mar 12, 2024, at 7:00 PM, Lucas Cavalcanti wrote: > > > >> > Hello. I've been thinking about Lilypond's usage on parts: for one >> musician (for example, the singer singing the melody) I'd like to give them >> a score containing voltas using the repeat and volta commands; for another >> musician (for example, the drummer) I'd like to give them a score with no >> repeats and voltas. I know that if I'd like to create a full-band score >> (i.e a grid) I can use the \unfoldRepeats at every variable, creating one >> straight through score. >> > >> > However, is it possible to create something like a "Tempo Map" of >> sorts? Like a part/variable that gives instructions to the master grid to >> create repeats and voltas without the need to create new parts? >> > >> > My objective is to figure out a way to create independent grid scores >> from musician part scores. To give a singer one straight, 6 pages score, to >> give a drummer a 1 page score and to give the conductor a 4 page score. >> > Is that possible? >> > Unless I'm misunderstanding what it is you're after, I think this can be done. If you shift where you're calling the \unfoldRepeats function it seems to work just fine, while still following the guideline Kieren mentioned of including the volta structure. Something like: \version "2.24.3" melody = { \relative c' { \repeat volta 2 { g4 bes c r \alternative { \volta 1 { g bes des c } \volta 2 { bes g r r } } } } } drumpart = { \new DrumStaff { \drummode { \repeat volta 2 { 4 \alternative { \volta 1 { 4} \volta 2 { 4} } } } } } %\book \score { << \melody \drumpart >> } \score { \unfoldRepeats << \melody \drumpart >> } This gives two scores, with the same music. One with the repeats written with the volta structure, the second with the repeats unfolded. -- Michael
Re: Question regarding ChordNames
Hi John, On Tue, Mar 12, 2024 at 11:51 PM John Helly wrote: > Aloha. > > Here's an MWE to exhibit the issue. > > I have a flat note (bes) that I want to transpose down 4 half-tones to > F#. However, when the transpose is applied, the result is Gb. I > understand that a flat note was the initial value so maybe LP is preserving > that specification? > > Nonetheless, short of re-writing the whole piece in A rather than C#, is > there a way to specify the enharmonic representation for an F# rather than > Gb, for example? > It's maybe a bit hackish, but what about first transposing from B flat to A sharp. *then* transposing C sharp to A? Something like: \version "2.25.13" bflat = \chordmode { bes1 } { \transpose cis' a { \new ChordNames { \bflat \transpose bes ais { \bflat } } } } -- Michael
Re: search and replace on all included files on compile
perfect thanks! Mar 6, 2024, 14:35 by lilyp...@hillvisions.com: > On 2024-03-06 10:56 am, Michael Winter via LilyPond user discussion wrote: > >> I have a programmatically generated score and am now realizing that I want >> to make a small tweak to text markups that are throughout the score in >> multiple files that are included at multiple levels. >> >> " 1↑" replace with " 1" (e.g. remove the up arrow when it is preceded by a >> 1) >> >> Is it possible to do this with a global search and replace on compile such >> that I do not need to edit each individual file (of which there are >> hundreds) manually? >> > > LilyPond does support basic replacements for text markup: > > > \paper { > #(add-text-replacements! '(("1↑" . "1"))) > } > > > > -- Aaron Hill >
Re: search and replace on all included files on compile
double thanks Mar 6, 2024, 14:36 by j...@abou-samra.fr: > > Try > > \version "2.24.2"\paper { #(add-text-replacements!'(("1↑" . "1")))}{ > c'^\markup "1↑" } > > Best, > > > Jean > >
Re: search and replace on all included files on compile
Thanks Curt, Unfortunately, I have already manually edited to the extent that tweaking the generating program would result in a lot of lost work. Typically I try not to edit post generation, but that was not possible in this particular case. I am on arch linux. And yes, I am sure it would be possible to do it through the terminal, but I am trying to avoid destructively editing the files (simply out of fear even though I could always roll back). I would be replacing only a few unicode characters, but many, many occurrences. Best, Michael Mar 6, 2024, 14:22 by pla...@fishlet.com: > Michael, > > You mentioned that the score is programmatically generated. If so, can > you modify the generating program and regenerate the score? > > Otherwise, a more complete example would be nice. Are you trying to do a > simple string replacement of a few (unicode) characters, or are you > trying to replace larger chunks of LilyPond code? > > It would also help to know what operating system environment you are > using. The answer may be to make a copy of the whole tree and run a > search/replace utility recursively on all the files. > > Regards, > Curt > > On 3/6/2024 10:56 AM, Michael Winter via LilyPond user discussion wrote: > >> I have a programmatically generated score and am now realizing that I >> want to make a small tweak to text markups that are throughout the >> score in multiple files that are included at multiple levels. >> >> " 1↑" replace with " 1" (e.g. remove the up arrow when it is preceded >> by a 1) >> >> Is it possible to do this with a global search and replace on compile >> such that I do not need to edit each individual file (of which there >> are hundreds) manually? >> >> I could do this through the terminal, but I would rather not >> destructively edit the files. >> >> Thanks in advance! >> >> Best, >> >> Michael >>
search and replace on all included files on compile
I have a programmatically generated score and am now realizing that I want to make a small tweak to text markups that are throughout the score in multiple files that are included at multiple levels. " 1↑" replace with " 1" (e.g. remove the up arrow when it is preceded by a 1) Is it possible to do this with a global search and replace on compile such that I do not need to edit each individual file (of which there are hundreds) manually? I could do this through the terminal, but I would rather not destructively edit the files. Thanks in advance! Best, Michael
Re: Tall bars in two-line music
Hi David, On Wed, Mar 6, 2024 at 10:00 AM David Wells < drwells.mailingl...@fastmail.com> wrote: > Hi, > > I'm working on typesetting some chants with two lines per staff and the > resulting barlines are too tall. Tiny example: > %< snip >% > Here, I expect the barlines to be the same height as the staff (i.e., not > protrude) and I cannot figure out how to make that happen. > The property you'll want to modify here is the bar-extent of BarLine - this sets the Y-extent of the bar line. Example: \version "2.24.3" \score { \relative c' { \time 9/4 \slurDown \override Staff.StaffSymbol.line-count = #2 \override Staff.BarLine.bar-extent = #'(-0.5 . 0.5) f4(g) a f(g) a(g) g2 | f4(g) a f(g) a(g) g2 | \break } } which produces: [image: image.png] Have a look at https://lilypond.org/doc/v2.24/Documentation/internals/barline for all the settings available for bar lines. -- Michael
Re: \after syntax?
Hi Matt, On Wed, Feb 21, 2024 at 10:53 AM Matthew Pierce wrote: > Hello all, > > For hairpin positioning within a whole note, the Manual gives the syntax > > \relative { > \after 2 \< c'1 > } > > Is there an effective \after syntax for hairpin positioning within > NON-whole notes, such as the second note in this (intuitive but) > nonviable expression? > > \relative { > \after 2 \< c'4 2. > } > > CONTEXT: I need to place an \espressivo-shaped, double-hairpin swell > underneath a dotted half note. Also, I need it to be stretchable, so that I > can horizontally align it with the other, more active parts/staffs in my > orchestral score. > To emulate an \espressivo using actual dynamics by way of the \after function: \version "2.25.13" musA = \relative c' { a'4 \after 8*3 \> a2.\< a2\! a2 } musB = \relative c' { a'4 \after 4. \> \after 2. \! a2.\< a2 a2 } musC = \relative c' { a'4 \after 4. \> a2.\< <>\! a2 a2 } \score { \new Staff { \new Voice { \musA } } } \score { \new Staff { \new Voice { \musB } } } \score { \new Staff { \new Voice { \musC } } } will produce: [image: image.png] Three different ways of accomplishing the same thing. The first showing that you can indeed use scaling in the \after function (i.e. the 8*3 meaning 3 8th notes worth) and terminating the decrescendo on the following note. The second using \after to do the termination. The third uses the empty chord construct (i.e. the <> ) to attach the termination to. You are, of course, free to mix and match whichever method suits you. -- Michael
Re: dynamics in coulour
Hi Stefan, On Tue, Feb 20, 2024 at 9:49 AM Stefan Thomas wrote: > Dear community, > is it possible to display the dynamics, also haipins and other things like > crescendo etc., in coulour? > Could someone could give me a hint? > Sure can. Most (if not all) grobs have a color property that can be overridden. If you want to change all grobs of that type in a score to a certain color, you can put the override into the layout block. Or, if you want to change just one instance, you can put the override into the music expression. Here's some sample code showing both: \version "2.24.3" mus = \relative c' { f4\p a4\< c8 d b4\f | \once \override DynamicText.color = #yellow f4\p a4\< c8 d b4\f } \score { \new Staff { \new Voice { \mus } } } \layout { \context { \Voice \override Hairpin.color = #red \override DynamicText.color = #blue } } producing: [image: image.png] The overrides in the layout block have gone into the Voice context, as that's where they live by default. If, however, you put your dynamics into a Dynamics context of their own you would need to modify the layout block accordingly. The override in the music expression is using the \once command, so that only the next instance of that grob is affected. If you want to change *all* the grobs of that type from that point onward, just omit the \once Also, one of the (sometimes) tricky parts can be finding the right name for the grob. The best resource I've found for that is: https://lilypond.org/doc/v2.25/Documentation/ly-examples/visualindex.pdf It's a 2 page PDF with an amazing amount of information. It's listed as being in the 2.25 docs, but if you're using the 2.24 series it should still be useful, as I'm pretty sure all the grob names, contexts, end engravers are pretty much the same names. -- Michael
Re: How to to a Lyrics extender line?
> Why not > > verseC = \lyricmode { \repeat unfold 4 { \skip 8 } lu __ _ >\markup \null \repeat unfold 3 { \skip 8 } lu __ _ } Thanks Kieren, that's kind of what I was looking for :) Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver
Re: How to to a Lyrics extender line?
I‘d read that. Different but hacky as well and ruins MIDI. Thank you for pointing that out. Kind regards, Michael Mobil gesendet > Am 14.02.2024 um 10:55 schrieb Hans Aikema : > > > > >>> On 14 Feb 2024, at 10:17, Michael Gerdau wrote: >>> >> Hi list, >> >> I often come across a problem like in the attached example where I want an >> extender line to stop (in the example upper system before bar 3). >> >> I can achieve something like it by adding e.g. a "." to the Lyrics and >> change the colour to white or something similar (see example lower system >> bar 3) but that seems somewhat hacky and I'd like to have a better way. >> >> Is there a better way? > > Only a few days back there was a similar inquiry where I provided a way to do > it using a hidden scaled-duration note just before the barline > > https://lists.gnu.org/archive/html/lilypond-user/2024-02/msg00033.html > >> >> Kind regards, >> Michael >> -- >> Michael Gerdau email: m...@qata.de >> GPG-keys available on request or at public keyserver >> >>
How to to a Lyrics extender line?
Hi list, I often come across a problem like in the attached example where I want an extender line to stop (in the example upper system before bar 3). I can achieve something like it by adding e.g. a "." to the Lyrics and change the colour to white or something similar (see example lower system bar 3) but that seems somewhat hacky and I'd like to have a better way. Is there a better way? Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver\version "2.25.13" musicA = { \repeat unfold 2 { c''4 c'' c'' c'' | c''2 c'' } } musicB = { \repeat unfold 16 { c'4 } } verseA = \lyricmode { \repeat unfold 4 { \skip 8 } lu __ _ \repeat unfold 4 { \skip 8 } lu __ _ } verseC = \lyricmode { \repeat unfold 4 { \skip 8 } lu __ _ \once \override LyricText.color = #white "." \repeat unfold 3 { \skip 8 } lu __ _ } verseB = \lyricmode { \repeat unfold 16 { la } } \score { << \new Staff = "a" << \new Voice = "a1" { \voiceOne \musicA } \new Voice = "a2" { \voiceTwo \musicB } >> \new Lyrics \with { alignAboveContext = "a" } \lyricsto "a1" { \verseA } \new Lyrics \lyricsto "a2" { \verseB } \new Staff = "b" << \new Voice = "b1" { \voiceOne \musicA } \new Voice = "b2" { \voiceTwo \musicB } >> \new Lyrics \with { alignAboveContext = "b" } \lyricsto "b1" { \verseC } \new Lyrics \lyricsto "b2" { \verseB } >> \layout {} } stop-lyrics-extender.pdf Description: Adobe PDF document
Frenched score problem
Hi lilyponders! I have a problem with a frenched score. From a larger piece I'm creating an excerpt for the choir and that shall be "frenched", aka voices that have nothing to do are removed while they are silent. As documented this is nicely done when I add a \RemoveAllEmptyStaves to the Staff context. However for the Choir excerpt there sometimes are longer passages without any choir participation and those passages are then just empty (see also the attached example). What I would want for such situations is at least a single empty Staff such that the timeline is there. In the attached example I could kind of solve the problem by using \RemoveEmptyStaves instead, but that doesn't help in the middle of the piece. Has someone a solution to this problem? I can't imagine I'm the first to come across it. Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver FrenchedScore-Problem.pdf Description: Adobe PDF document \version "2.25.12" global = { \key fis \minor \numericTimeSignature \time 3/4 \tempo "Andante" \compressEmptyMeasures } soprano = \relative c'' { \global R1*3/4*6 | \tempo "Rall." R1*3/4*2 \mark \default \tempo "Andantino" R1*3/4 | \time 2/4 R1*2/4*2 | \time 3/4 R1*3/4 | \time 2/4 R1*2/4 | \time 3/4 R1*3/4 | \time 2/4 R1*2/4 | \mark \default \time 3/4 R1*3/4*3 | \time 2/4 R1*2/4 | \time 3/4 R1*3/4 | \time 2/4 R1*2/4 | \mark \default \time 3/4 R1*3/4 | } alto = \relative c' { \global R1*3/4*6 | \tempo "Rall." R1*3/4*2 \mark \default \tempo "Andantino" R1*3/4 | \time 2/4 R1*2/4*2 | \time 3/4 R1*3/4 | \time 2/4 R1*2/4 | \time 3/4 R1*3/4 | \time 2/4 R1*2/4 | \mark \default \time 3/4 \new CueVoice { cis8[(\p^"Cors" b] cis4. b8 | cis8[ e] cis4 b) | e4( dis8[ e] fis4 | \time 2/4 dis8[ cis] e4 | \time 3/4 dis8[ cis] b[ cis] cis[ e] | \time 2/4 cis4 b) } | \mark \default \time 3/4 r8 fis'8\p e[( fis]) fis4 | } tenor = \relative e' { \global R1*3/4*6 | \tempo "Rall." R1*3/4*2 \mark \default \tempo "Andantino" R1*3/4 | \time 2/4 R1*2/4*2 | \time 3/4 R1*3/4 | \time 2/4 R1*2/4 | \time 3/4 R1*3/4 | \time 2/4 R1*2/4 | \mark \default \time 3/4 R1*3/4*3 | \time 2/4 R1*2/4 | \time 3/4 R1*3/4 | \time 2/4 R1*2/4 | \mark \default \time 3/4 R1*3/4 | } bass = \relative c' { \global R1*3/4*6 | \tempo "Rall." R1*3/4*2 \mark \default \tempo "Andantino" R1*3/4 | \time 2/4 R1*2/4*2 | \time 3/4 R1*3/4 | \time 2/4 R1*2/4 | \time 3/4 R1*3/4 | \time 2/4 R1*2/4 | \mark \default \time 3/4 R1*3/4*3 | \time 2/4 R1*2/4 | \time 3/4 R1*3/4 | \time 2/4 R1*2/4 | \mark \default \time 3/4 R1*3/4 | } altoVerse = \lyricmode { Do -- mi -- ne } \score { \new ChoirStaff << \new Staff \with { instrumentName = "Sopran" shortInstrumentName = "S" } { \soprano } \new Staff \with { instrumentName = "Alt" shortInstrumentName = "A" } { \new Voice = "alto" { \alto } } \new Lyrics \lyricsto "alto" { \altoVerse } \new Staff \with { instrumentName = "Tenor" shortInstrumentName = "T" } { \clef "treble_8" \tenor } \new Staff \with { instrumentName = "Bass" shortInstrumentName = "B" } { \clef bass \bass } >> \layout { \context { \Staff %\RemoveEmptyStaves \RemoveAllEmptyStaves } \context { \Lyrics \override LyricHyphen.minimum-distance = #1.0 \override LyricSpace.minimum-distance = #1.0 } } }
Re: Numérotation des versets
Hi there, On Sat, Jan 27, 2024 at 6:35 AM Silvain Dupertuis < silvain-dupert...@bluewin.ch> wrote: > *Sorry for my question in French on an English-speaking forum... here is > an Englsh version* > > Hello, > Is there a way to automatically repeat the verse numbers on each line > when it is defined by \set stanza = "1." > without repeating this instruction within the verse text > > with this structure in the score part, lyrics being defined in variables > \new Lyrics \lyricsto "VoiceOne" { \set stanza = "1." \VerseOne } > \new Lyrics \lyricsto "VoiceOne" { \set stanza = "2." \VerseTwo } > ... > > For a 5-verse song, it's best to repeat these verse numbers > So as I understand it you want the stanza number at the beginning of each system such as after line breaks, instead of just the first? If that's the case maybe try using shortVocalName, like this: \version "2.25.12" \new Staff { c' \break c' } \addlyrics { \set stanza = "1." \set shortVocalName = \markup \bold \small "1." aah aah } \addlyrics { \set stanza = "2." \set shortVocalName = \markup \bold \small "2." ooh ooh } which gives: [image: image.png] -- Michael
Re: Footnote separator line
Hi Kevin, On Tue, Jan 23, 2024 at 8:06 PM Kevin Pye wrote: > For the first time in many years of using Lilypond, I have a need to add a > footnote to some music. One thing puzzles me: > > As is traditional in all texts, Lilypond places a horizontal line above > the footnotes, separating them from the music above. However the horizontal > position of this line confuses me. I would have expected the line to be > above the footnotes, starting at the left margin. However it is placed > further to the right. This can be seen in the examples in the NR ( > http://lilypond.org/doc/v2.25/Documentation/notation/footnotes-in-music-expressions). > In my case the footnote is in the second bar of music in the staff, and the > line does not start until the beginning of that bar, potentially after the > end of the footnote text. Because the music to which the footnote is > attached may be several staves above the footnote text, this does not make > sense to me. > > Is there some way of shifting this line to the left margin? > > Kevin. > The function defining the separator line can be found in ly/ paper-defaults-init.ly It defaults to: footnote-separator-markup = \markup \fill-line { \override #'(span-factor . 1/2) \draw-hline } Copying that into the \paper block of your .ly file, you can then tweak it to whatever you desire. Simply removing \fill-line will shift the line to the left margin, leaving the length the same. -- Michael
Re: tempo marks floating number
On Mon, Jan 22, 2024 at 9:33 AM Jacopo Greco d'Alceo wrote: > How can I simply write a bpm in floating number in lilypond (e.g.*♩ = > 90.86 ) *? > It seems that \tempo accept only integers. > thanks > You can do pretty much any markup with the \tempo command. Two ways you can do this are either: \tempo \markup { \note { 4 } #UP " = 90.86" } or \tempo \markup { \rhythm { 4 } " = 90.86" } The \note function is a bit simpler and creates a note stencil that's a tad larger than what's produced by the \rhythm function. The \rhythm function, however, is far more flexible in what it can produce. More info on the \note function at: https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005cnote and for the \rhythm function see: https://lilypond.org/doc/v2.25/Documentation/notation/markup-for-music-and-musical-symbols#index-_005crhythm One caveat to keep in mind is that \tempo entries done with \markup do not affect MIDI playback. -- Michael
Re: Segno and Coda from LilyJazz in a DrumStaff
Hi Sebastien, On Sat, Jan 13, 2024 at 11:17 AM Sebastien Richard wrote: > Hi all, > > I've been struggling with this for a long time without getting close to > any solution. > > How can I use the Segno & Coda from LilyJazz in the example below ? > To clarify, you want just the segno and coda marks in the LilyJazz font, while the rest of the notation remains in the default music font? If so, I'm not completely sure but I don't think that can be done with the 2.24 series. However ... As the 2.25 series has been developed, the arrival of 2.25.6 brought along a significantly redone font handling system. One of the new features is that font selection is now just another property, and can be modified on a per-grob basis. Which makes what you want fairly simple and straight forward. Once the LilyJazz font files have been placed as needed, it's just a matter of modifying the properties of the SegnoMark and CodaMark grobs. Like this: \version "2.25.12" drum = \drummode { sn4 sn sn sn \segnoMark 1 sn4 sn sn sn \codaMark 1 sn4 sn sn sn } \score { \new DrumStaff { \drum } } \layout { \context { \Score \override CodaMark.fonts.music = "lilyjazz" \override SegnoMark.fonts.music = "lilyjazz" } } This will mean that you would have to make the jump to the development series, so you'll have to decide for yourself if that's something you're willing to do. I can say that I've been using the development versions for a while and generally they're working just fine. The only real issue I've encountered was when the newer versions switched to Guile 3 one of the third-party packages I'm using didn't like that, but I've managed to get through that. Other than that all has been well. So if Guile 3 isn't for you, something between 2.25.6 and 2.25.10 (I think it was .11 where Guile 3 came in) should be safe. -- Michael
Re: Help need with the "implicitBassFigures" command
Hi there, On Thu, Jan 11, 2024 at 5:49 AM Eef Weenink wrote: > \new FiguredBass \with { implicitBassFigures = #'(0) } > > %{if I set the implicitBass to 5, or other number, it works for the > whole passage%} > > \figuremode { > > \set figuredBassAlterationDirection = #RIGHT > > \set figuredBassPlusDirection = #RIGHT > > \override BassFigureAlignment.stacking-dir = #DOWN > > <6 5->8 <5 4->8 > > \extendOn > > \set Staff.implicitBassFigures = #'(5) > > %{if I set the implicitBass to 5, or other number, it DOES NOT do > anything%} > > <5 3>4 > > \set Staff.implicitBassFigures = #'(0) > > \extendOff <5 _+>8 > > <7>8 <6>8 <5>4 > You had it almost right here. The one thing you need to change is that the implicitBassFigures property is part of the FiguredBass context, not Staff. Since there is no implicitBassFigures property in the Staff context that \set command will just get silently ignored. So either change the \set Staff.implicitBassFigures to \set FiguredBass.implicitBassFigures or, since these statements are already in the FiguredBass context, just leave the context off and make it just \set implicitBassFigures And then you should be good. -- Michael
Re: Cascade Chords
Please always include the list, so that others can benefit as well I don’t think cascade chord and arpeggio are the same thing. Maybe a “cascade chord” is a “slow” arpeggio, but what I’m thinking of, each added note occurs on a specific fraction of a measure, say every 1/8 or 1/16, or even ¼ note. The build-up is slow and regular enough that you actually hear successive notes. I’m not sure “cascade” is even the right term—that’s what Bing told me. Let’s say I play and hold C, then 1/8 note later I add and hold E, then 1/8 note later add and hold G, then 1/8 later add and hold high C (or Bb if it’s a C7), then hold the whole thing for the rest of the measure.Arpeggios don’t necessarily have a timing attached and thus could be played as 1/8th or whatever speed you (or whoever plays the music) deems appropriate.However if you want it written explicitly then the example Werner provided should get you a long way towards your goal.Kind regards,Michael From: Michael Gerdau Sent: Saturday, December 30, 2023 12:57 AMTo: drtechda...@gmail.comCc: lilypond-user@gnu.orgSubject: Re: Cascade Chords When you say „cascade chord“ do you mean an arpeggio? If so then yes, Lilypond has a special \arpeggio command that is simply appended to the chord that’s broken. Kind regards,Michael Mobil gesendetAm 30.12.2023 um 03:09 schrieb drtechda...@gmail.com:Is there a special notation for cascade chords (chords played by adding successive notes )? I could do it by adding a new voice for each note, but that seems unwieldly and cluttered.
Re: Cascade Chords
When you say „cascade chord“ do you mean an arpeggio? If so then yes, Lilypond has a special \arpeggio command that is simply appended to the chord that’s broken. Kind regards, Michael Mobil gesendet > Am 30.12.2023 um 03:09 schrieb drtechda...@gmail.com: > > > Is there a special notation for cascade chords (chords played by adding > successive notes )? I could do it by adding a new voice for each note, but > that seems unwieldly and cluttered.
Re: How to put a big number in the upper left or right corner of a score?
Hi Kris, On Mon, Aug 28, 2023 at 4:44 AM Kris Van Bruwaene wrote: > (Lilypond version 2.24.1, Guile 2.2). > > What is the easiest way to put a big number (e.g. font size 4 bold) in > the upper left or right corner of a score? In previous versions I used to > manage this with a double header, one in \book and one in \score, and > faking a second "poet" (left corner) or "composer" (right corner), but this > does not seem to work any more, at least not the way it used to. Moreover > it isn't a very "clean" solution. Something like a regular (but huge) page > number would be better. > If this is something you'll want on a regular basis I'd do a custom header. They're pretty simple to define - I've got one I use for a score version. I used to use either subtitle or subsubtitle, but ran into enough cases where I actually had need of both that I finally just defined my own header to use. It goes into a \paper block, defined before the \header block where you want to use it. For the docs see https://lilypond.org/doc/v2.24/Documentation/notation/custom-titles-headers-and-footers The part about defining your own is about half way down. The entry in the \paper block for this would be something like: bookTitleMarkup = \markup { \sans { \override #'(baseline-skip . 3.5) \column { \fill-line { \null \null \fontsize #4 \bold \fromproperty #'header:bignumber } \fill-line { \fromproperty #'header:dedication } \override #'(baseline-skip . 3) % default 3.5 \column { \fill-line { \huge \larger \larger \bold \fromproperty #'header:title } \fill-line { \large \bold \fromproperty #'header:subtitle } \fill-line { \smaller \bold \fromproperty #'header:subsubtitle } \fill-line { { \smaller \fromproperty #'header:poet } { \bold \fromproperty #'header:myscoreversion } { \smaller \fromproperty #'header:composer } } \fill-line { { \smaller \fromproperty #'header:meter } { \large \bold \fromproperty #'header:instrument } { \smaller \fromproperty #'header:arranger } } } } } } In this case a new header field called bignumber is defined on the fifth line, placed at the very top of the header block, in the top right corner. If you want it in the top left corner, change that line to: \fill-line { \fontsize #4 \bold \fromproperty #'header:bignumber \null \null } (BTW, Lilypond's default for this block is in titling-init.ly) In this block you can adjust the order and placement of all the headers, not just your own custom ones. In this example, I've also added myscoreversion (the one I mentioned earlier), put it where the instrument header used to be, and moved instrument down a line centered between meter and arranger (a spot left blank in the default). To use your newly defined custom header, you set it just like any other header: \header { title = "Title Goes Here" bignumber = "42" composer = "Written by Somebody" subtitle = "Random subtitle" } Also, as this is now a defined header entry, it can be used just like any other header entry, such as in subsequent page headers: oddHeaderMarkup = \markup \sans { \fill-line { \unless \on-first-page \fontsize #4 \bold \fromproperty #'header:bignumber \unless \on-first-page \fromproperty #'header:title \unless \on-first-page \fromproperty #'page:page-number-string } } Granted, this all winds up being a fair sized chunk of code. But it's easy enough to just save it all off into an include file, where it's out of the way but accessible. -- Michael
Re: clefs, time signatures, and key signatures
Hi Werner, does the new proposed spacing mean that the time signatures are not aligned across staves any more but were before? Best, Michael
Re: Dynamics [pl|sp]acing weirdness
Hi Kieren, thanks for answering :) I've come across some placing or spacing weirdness with dynamics. In the attached example \dynamicsA is what I tried to code, aka the \< starts directly after the \mf. What I expected is what you see in \dynamicsB. However it seems as if the combo \mf\< does use some musical time which makes the \f appear 1 quaver later than I had expected. Is this behaviour expected or a bug? Did you notice the error(s) when you tried to compile? ;) You mean the failed bar check? That's basically my complaint. I don't understand why the bar check fails. Try this instead: dynamicsA = { s2. \after 8... { <>\mf\< } s4 | s2 s2\f | } Note that the combo you’re trying to insert needs to be wrapped in braces so that it’s a single musical expression. While that works, wrapping that combo isn't required all the time. E.g. when you have dynamicsA = { s2. s4\mf\< | s2 s2\f | } everything compiles w/o a complaint. Of course the placement of the \mf is different. However when you try something like dynamicsA = { s2. \after 64 \mf\< s4 | s2 s2\f | } there still is the bar check warning, implying that the combo \mf\f does use musical time. That's something I don't understand. Especially since it doesn't seem to when wrapped in {}. If that's intended (and I'm not saying it isn't or can't be) I'd like to understand the reason for this (to me) inconsistency. Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver
Dynamics [pl|sp]acing weirdness
Hi list! I've come across some placing or spacing weirdness with dynamics. In the attached example \dynamicsA is what I tried to code, aka the \< starts directly after the \mf. What I expected is what you see in \dynamicsB. However it seems as if the combo \mf\< does use some musical time which makes the \f appear 1 quaver later than I had expected. Is this behaviour expected or a bug? Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver\version "2.25.11" music = { c'4 c'4 c'4 c'4 | c'4 c'4 c'4 r4 \bar "|." } dynamicsA = { s2. \after 8... \mf\< s4 | s2 s2\f | } dynamicsB = { s2. \after 8... \mf s4 | \after 8 \< s2 s2\f | } \score { << \new Dynamics { \dynamicsA } \music \new Dynamics { \dynamicsB } \music >> \layout { } } dynamics-spacing-weirdness.pdf Description: Adobe PDF document
Re: displaying `script-priority`
Hi Werner, On Thu, Dec 14, 2023 at 12:03 AM Werner LEMBERG wrote: > > Walking through some unanswered e-mails of mine I stumbled across this > one, asked in October. > > https://lists.gnu.org/archive/html/lilypond-user/2023-10/msg00222.html > > > How can I make LilyPond display the actual values of > > `script-priority` for a stack of grobs? [...] > > Any suggestions how to do that? Otherwise I'll file an issue. > A few days ago I was looking for something, and stumbled across https://lsr.di.unimi.it/LSR/Item?id=1017 And I thought that it might help here. I was able to modify it a bit to pare down the info it returns, as it returns *everything* about each occurence of the grob in question. The result: \version "2.25.10" #(define print-all-script-priority (grob-transformer 'after-line-breaking (lambda (grob orig) (format #t "\n~a:" grob) (format #t "\n~a:" "Text-Interface") (format #t "\n\t~a: ~a" "text" (ly:grob-property grob 'text)) (format #t "\n~a:" "Text-Script-Interface") (format #t "\n\t~a: ~a\n" "script-priority" (ly:grob-property grob 'script-priority)) ))) grobPropertiesInfo = #(define-music-function (grob-name)(symbol?) #{ \override $grob-name . after-line-breaking = #print-all-script-priority #}) \relative c { \set strokeFingerOrientations = #'(up) \set fingeringOrientations = #'(up) \grobPropertiesInfo #'StrokeFinger \grobPropertiesInfo #'Fingering \override Fingering.script-priority = #118 } This produces the output: Starting lilypond 2.25.10 [Untitled]... Processing `/tmp/frescobaldi-01dbi2f4/tmpg0hzpy81/document.ly' Parsing... Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Converting to `document.pdf'... #: Text-Interface: text: 1 Text-Script-Interface: script-priority: 96 #: Text-Interface: text: p Text-Script-Interface: script-priority: 121 #: Text-Interface: text: 4 Text-Script-Interface: script-priority: 103 #: Text-Interface: text: a Text-Script-Interface: script-priority: 128 #: Text-Interface: text: 1 Text-Script-Interface: script-priority: 114 #: Text-Interface: text: p Text-Script-Interface: script-priority: 121 #: Text-Interface: text: 4 Text-Script-Interface: script-priority: 121 #: Text-Interface: text: a Text-Script-Interface: script-priority: 128 Success: compilation successfully completed Completed successfully in 0.6". Probably better ways to go about this, but it seems to work. -- Michael
Re: text over hairpin
Hi Paul, On Wed, Dec 13, 2023 at 10:36 AM Paul Scott wrote: > How do I put text (molto) inside a hairpin? I didn't see it in snippets > or NR. > Found this in the Snippets: http://lilypond.org/doc/v2.25/Documentation/snippets/expressive-marks_003a-center-text-below-hairpin-dynamics -- Michael
Re: Hide a note inside a drumscore
Hi Seb, On Wed, Dec 13, 2023 at 11:00 AM Sebastien Richard wrote: > Hello, > > How can I hide a note inside a drum score ? I tried following the doc here > *https://lilypond.org/doc/v2.23/Documentation/notation/visibility-of-objects > <https://lilypond.org/doc/v2.23/Documentation/notation/visibility-of-objects>* > but > I did not managed to make it work > The issue you are running into is that overrides won't work on a single item when there's more than one of them happening at the same moment in the music. As these are (basically) notes within a chord, they're at the same moment. And the \hide command is just a shortcut for an override on the grob's Transparent property. In the case of simultaneous grobs, you want the \tweak command. http://lilypond.org/doc/v2.25/Documentation/notation/tweak-and-single So, your code would become: \version "2.24.2" up = \drummode { \slurDown \grace { sn16 sn( } 4 } \score { \new DrumStaff << \new DrumVoice { \voiceOne \up } >> \layout {} } -- Michael
Re: lilypond "preprocessor"?
Hi Stef, On Sat, Dec 9, 2023 at 11:07 PM Stefano Antonelli < santone...@algosolutions.com> wrote: > Any other options for getting the header block from an included file? > I don't know if this'll be directly usable in your use case, but I do something like this with most of the music I engrave. The way I handle this is my song.ly would be something like: myHeaders = \header { % author and stuff } theMusic = new DrumStaff { % the music } And then I would have anotherFile.ly containing something like: \include "song.ly" \book { \myHeaders \score { \theMusic } } I'm not at all familiar with ly2video, so I really have no idea if this'll be directly useful to you. But for getting the headers from an included file, this is how I do it with nearly all the music I engrave. Maybe it can serve as a starting point. -- Michael
Re: Unexpected bar boundaries with volta repeats and lyrics.
Hi Kevin, On Fri, Dec 8, 2023 at 11:31 PM Kevin Pye wrote: > What silly mistake am I making here? > Not all that silly. Though the docs do talk about putting lyrics into the same repeat structure as the music, there's one detail in http://lilypond.org/doc/v2.25/Documentation/notation/lyrics-and-repeats that you may have missed: "... when one of the \alternative blocks starts with a rest, a repeat construct cannot be used around the words" Change the lyrics block to just words = \lyricmode { a b c d e } and it should behave itself a bit better for you. -- Michael
Re: clefs, time signatures, and key signatures
> Thanks, but I would like to know whether you prefer the top > (alto-based) or bottom (treble-based) image on > > https://gitlab.com/lilypond/lilypond/-/merge_requests/2188 Top (alto-based) is 6 days ago and bottom (treble-based) is 4 days ago as of today? Of those two I prefer bottom as it seems to be more balanced overall to me. Kind regards, Michael
Re: clefs, time signatures, and key signatures
I’ve just looked at the images and especially w/r to the Alto clef I strongly prefer the new spacing. For the others there are spots where I’m not sure it is too tight but overall the new spacing appears to be more balanced. I thus think the new spacing is better overall. Kind regards Michael Mobil gesendet > Am 09.12.2023 um 08:12 schrieb Werner LEMBERG : > > >>> please have a look at Merge Request 2188 and comment there on how >>> to proceed with the new distances between clefs and time >>> signatures, together with the new distances between clefs and key >>> signatures. >>> >>> https://gitlab.com/lilypond/lilypond/-/merge_requests/2188 >>> >>> The question is whether the new distances should be based on the >>> widest standard clef glyph (which is the alto clef, and which is >>> done currently in the MR), or whether they should be based on the >>> most common one, the treble clef. >> >> For better comparison, I've updated/added the screenshots in the MR >> so that you can do a blink-comparison of the images. > > A few people responded, and the opinions are exactly 50:50. It would > be great if more people could chime in! > > >Werner >
Re: Centering a word before a gap in the lyrics
Hi Paul, On Mon, Dec 4, 2023 at 6:56 AM Paul Hodges wrote: > I don't know where in the documentation the difference in behaviour > between \skip1 and "" as opposed to _ is explained. > It isn't much of an explanation, but in http://lilypond.org/doc/v2.25/Documentation/notation/lyrics-and-repeats#index-_005cskip-1 is the line Note: do not use an underscore, _, to skip notes – an underscore indicates a melisma, causing the preceding syllable to be left-aligned. A bit terse, to be sure. But mentioning an alignment issue I've always stayed with using \skip to skip over a note, and only used _ when it really was a melisma not explicitly notated in the music (such as a tie or a slur). But the opportunity is missed on these pages, the first of which actually > conflates the "" and _ notation: > > > https://lilypond.org/doc/v2.25/Documentation/snippets/rhythms_003a-skips-in-lyric-mode-_00282_0029 > > https://lilypond.org/doc/v2.25/Documentation/snippets/rhythms_003a-skips-in-lyric-mode > This was the first time I'd seen the use of "" for something like this. I'll have to keep it in mind. And looking at those two snippet pages you linked they make it seem like all three options are equivalent. Yet in the NR page I linked it says they are different. Well, I guess the important bit is you found something that does what you need, and does it in a way that you're okay with. -- Michael
Re: Centering a word before a gap in the lyrics
Hi Paul, On Mon, Dec 4, 2023 at 3:52 AM Paul Hodges wrote: > In the middle lyric, the first word is justified because the following > skip (_ in this case) defines a melisma. But I actually simply want there > to be no immediately following word - this arises with multiple verses and > alternatives in the repeat structure, for example. I thought a quoted > space would count as a word, but no... > > In the end I have done it above by a rather unnatural circumlocution, but > is there a more natural solution which I've missed? > Sure. Just use a skip. Like so: \version "2.25.10" wordsA = \lyricmode { centred centred centred } wordsB = \lyricmode { centered \skip 1 centred } \score { \new Staff << \new Voice = "vvv" { r2 c'2 g'2 c''2 } \new Lyrics \lyricsto "vvv" \wordsA \new Lyrics \lyricsto "vvv" \wordsB >> } [image: image.png] One thing to keep in mind - \skip when used in lyrics goes by notes, not beats. So \skip 1 will skip one note, not an entire 4 beats. If you want to skip multiple notes in one go (such as dealing with alternate endings with multiple verses) something like: \repeat unfold 15 { \skip 1} comes in handy. A bit more on using \skip can be seen here: http://lilypond.org/doc/v2.25/Documentation/notation/lyrics-and-repeats#index-_005cskip-1 and here: http://lilypond.org/doc/v2.25/Documentation/notation/invisible-rests#index-_005cskip -- Michael
Re: How do I arpeggiate across voices?
Hi Kevin, On Mon, Nov 27, 2023 at 7:43 AM Kevin Cole wrote: > Thanks. Not sure how I missed that in my search... That seems the best > answer -- though, alas, the MIDI arpeggiator cannot take advantage of it. > (I may be able to suss that out "the hard way" manually though.) > Sorry, but MIDI is an area I know almost nothing about, as I almost never use it. My main focus is hardcopy. Best I can come up with is to do something a little like what is shown in > MIDI arpeggiator: > https://lists.gnu.org/archive/html/lilypond-user/2020-12/msg00036.html > It would involve basically making a parallel version of your music that, while not looking like what you want the printed output to look like, will sound right (or close to it) once run through the MIDI system. The two versions would then be decided on via the tags as shown in the linked example. It'll be a bit of a tedious PITA, but it'll get the job done. Sorta kinda. Anyway, something like: \version "2.25.10" \language "english" \include "../include/arpeggioMIDI.ly" music = \relative c' { \set Staff.connectArpeggios = ##t % Need to tell Lilypond to play connect the dots with the arpeggios e4 e e \tag #'layout { << { e4\arpeggio e4 b4 | e2 b8[ b8] | } \\ { 2.\arpeggio | \stemUp gs2 \stemNeutral s4 | } >> } \tag #'midi { << { \midiArpeggio 12 4 e b | e2 b8 b } \\ { 2. | gs2 s4 } >> } d'4 d d } \score { \new Staff \with { \consists "Span_arpeggio_engraver" % Could also be done in a layout block } { \time 3/4 \new Voice { \removeWithTag #'midi \music } } \layout {} } \score { % Added this one out of curiosity - wanted to see what it would look like. \new Staff \with { \consists "Span_arpeggio_engraver" % Could also be done in a layout block } { \time 3/4 \new Voice { \removeWithTag #'layout \music } } \layout {} } \score { \new Staff { \time 3/4 \new Voice { \removeWithTag #'layout \music } } \midi {} } That's the rough approach. And I'm not real sure just how close that MIDI output sounds compared to what it should be. There's bound to be a better way to do this. I just don't know what that better way might be. -- Michael
Re: How do I arpeggiate across voices?
Hi Kevin, On Sun, Nov 26, 2023 at 7:38 PM Kevin Cole wrote: > I'm looking at a pice of music that shows an arpeggio between two > dotted half-notes in one voice and a quarter-note in the other voice. > Specifically, in the wee snippet below, the first e4 in the first > voice is at the top of the arpeggio above the 2 in the second > voice. > Having a look at http://lilypond.org/doc/v2.25/Documentation/notation/arpeggio#index-arpeggio_002c-cross_002dvoice it turns out there's a Span_arpeggio_engraver you can add to take care of this. Also, a Staff.connectArpeggios property to set. Adding those in, your example becomes: \version "2.25.10" \language "english" music = \relative c' { \set Staff.connectArpeggios = ##t % Need to tell Lilypond to play connect the dots with the arpeggios << { e4\arpeggio e4 b4 | % 1 - Need to mark both top and bottom of connected arpeggios e2 b8[ b8] | % 2 } \\ { 2.\arpeggio | % 1 - Need to mark both top and bottom of connected arpeggios \stemUp gs2 \stemNeutral s4 | % 2 } >> } \new Staff \with { \consists "Span_arpeggio_engraver" % Could also be done in a layout block } { \time 3/4 % Just a guess? Fixes the barcheck error \new Voice { \music } } -- Michael
Re: Books with alternative lyrics minimizing code duplication?
Hi, On Fri, Nov 24, 2023 at 9:25 AM YTG 123 wrote: > Hello, > > I have alternative versions of lyrics text, which I would like to export > in different files (or \book blocks). The music, order of staves, etc. > is identical. > > Ideally, I would want to do this as cleanly and with as little code > duplication as possible. > I do something a bit like this on a regular basis - generating multiple versions from the same music. In my case, instead of doing different lyrics I'm doing some instrument specific formatting and such. But the basic idea is pretty similar. Perhaps something like this? \version "2.25.10" music = { c'4 d' e' } lyricsOne = \lyricmode { do re mi } lyricsTwo = \lyricmode { a b c } % Header info common to all versions main_header = \header { title = "Main Title" composer = "Written by Foo Bar" } % Here is the main body of the score, so we can call it as needed main_score = << \new Staff { \new Voice = "VOne" { \music } } \tag #'(showLyricsOne) { \new Lyrics \lyricsto "VOne" { \lyricsOne } } \tag #'(showLyricsTwo) { \new Lyrics \lyricsto "VOne" { \lyricsTwo } } >> % With what I usually do everything from here down is in a separate file, that includes in everything above \book { \paper { output-suffix = "both_lyrics" } \header { pdftitle = "Song Title - Both Lyrics" subtitle = "Both Lyrics" } \main_header \score { \main_score \layout { % As needed } } } \book { \paper { output-suffix = "first_lyrics" } \header { pdftitle = "Song Title - First Lyrics" subtitle = "First Lyrics" } \main_header \score { \keepWithTag #'showLyricsOne %\removeWithTag #'showLyricsTwo \main_score \layout { % As needed } } } \book { \paper { output-suffix = "second_lyrics" } \header { pdftitle = "Song Title - Second Lyrics" subtitle = "Second Lyrics" } \main_header \score { \keepWithTag #'showLyricsTwo %\removeWithTag #'showLyricsOne \main_score \layout { % As needed } } } As a source file named example1.ly this produces 3 PDFs: example1-both_lyrics.pdf, example1-first_lyrics.pdf and example1-second_lyrics.pdf http://lilypond.org/doc/v2.25/Documentation/notation/output-file-names goes over how to control the output file names. Using pdftitle in a \header block to set the displayed PDF title gets covered in http://lilypond.org/doc/v2.25/Documentation/notation/creating-output-file-metadata In this example I'm using tags to control which lyrics get shown when. There are 2 ways to use them: \keepWithTag and \removeWithTag Details on how they both get used are in http://lilypond.org/doc/v2.25/Documentation/notation/using-tags Short version: \keepWithTag keeps music with that tag and untagged music, while \removeWithTag keeps everything but the music with the selected tag. There's more to it than that - especially if you get into using multiple tags at the same time. But this example is simple enough that it could work either way - swap the two commented tag commands in each score to try it out, and you'll see that the output is the same. -- Michael
Re: start/stop staff
Hi David, On Thu, Nov 23, 2023 at 7:10 PM bobr...@centrum.is wrote: > I have a quartet piece with a recitative type section in one part. The > other parts play, essentially, punctuation. The "solo" part is > rhythmically complex enough that having it on the accompanying parts would > make it far easier to play. I could easily put the entire movement in each > part as a StaffGroup but I would prefer a two-line staffGroup only for the > sections where the solo part is not homophonic with the rest. How would I > go about starting/stopping such a thing? > > Put simply, I want to start the parts with a staffGroup which contains the > individual part with the solo part above at a reduced size. Then, when > that section is done, reduce to the individual part. Then reintroduce the > solo part at a later section for the same reason. > I'd go about this with something like: \version "2.25.10" \paper { #(set-paper-size "a6") } solo = \relative c' { \repeat unfold 2 { a'4 b c d e d c b } R1*5 a4 b c d e d c b R1*4 R1 } individual = \relative c' { \repeat unfold 4 { c4 d e f g a b c b a g f e d c d } } \new StaffGroup << \new Staff \with { \RemoveAllEmptyStaves \magnifyStaff #2/3 } \new Voice { \solo } \new Staff { \new Voice { \individual } } >> [image: document.png] Might take a little trial and error to get the right combination of the R1 multiples, but should be fairly straightforward. Also, if a section either starts or ends partway through a stave there will be empty measures - \RemoveAllEmptyStaves goes from line break to line break. This is shown in the 3rd line of this example. As this is Lilypond, of course there are other ways to do this. Have a look at http://lilypond.org/doc/v2.25/Documentation/notation/ossia-staves and http://lilypond.org/doc/v2.25/Documentation/notation/hiding-staves for some other examples. -- Michael
Re: Cue notes above rests
Hi Ralph, On Thu, Nov 23, 2023 at 11:26 AM Ralph Palmer wrote: > Greetings, All - > > As ever, I'm grateful (Thankful, given it's Thanksgiving Day where I live) > for LilyPond and for the help the other users give to each other. I used to > give more help myself than I do now, mostly because others are so much more > knowledgeable and quick to respond. > > I'm having a problem with cue notes and the rests in the primary > instrument. I don't know how to get the primary instrument's rests above > the cue notes. > You almost had it. One small change: \version "2.24.0" \relative c' { a''2 << { r2 | r1 | r1 | r1 | r2 } \\ { \new CueVoice { a,2~ | a4 d, g2~ | g4 e a g | f4 g } } >> d'2\f | } Adding the \\ between the two sections puts both sections into their own context. And that produces: [image: image.png] Another option would be to explicitly assign voiceOne and voiceTwo, like: \version "2.24.0" \relative c' { a''2 << { \voiceTwo r2 | r1 | r1 | r1 | r2 } { \voiceOne \new CueVoice { a,2~ | a4 d, g2~ | g4 e a g | f4 g } } >> \oneVoice d'2\f | } That gives the same result. Just make sure to add the \oneVoice afterward, to put everything back to the defaults. -- Michael
Re: tspan in SVG export
Hi Johannes, On Thu, Nov 23, 2023 at 10:37 AM Johannes Keller wrote: > thank you! I tried this, but got "fatal error: compiled without > CAIRO_BACKEND". Does this mean that I need to compile Lilypond myself, > or is there an easier way? I work on Arch Linux, using the official > "lilypond" package (which ships Lilypond 2.24.2 at the moment). > I'm on KUbuntu myself. There are pre-made binary tarballs on the Lilypond site you can use. Go to http://lilypond.org/index.html and on the right side of the page are two download links - one for the current stable release (currently 2.24.3) and one for the current development version (currently 2.25.10). Follow whichever one you want, download the tar.gz and unpack it into the directory of your choice. It'll then be pretty much ready to use. I've got a lilypond directory in my home directory I unpack them into, but really you can put them pretty much wherever you want. -- Michael
Re: Aligning verse text?
Hi there, On Tue, Nov 21, 2023 at 10:03 AM wrote: > How to place (ooo -- oo o -- ooo --) verse to first (r1) rest and (uu -- > u -- uu) to (g'4 fis' g')? > Something like this, as in? \version "2.24.3" globals = { \key f \major \time 2/1 } musicOne = { e'4. e'8 e'4 e' e'2 e'4 r | \break r1 g'4 fis' g' r r1 e'4 e' e' r } musicTwo = { e'4. e'8 e'4 e' e'2 e'4 e | \break e1 g'4 fis' g' g g1 e'4 e' e' e } verseOne = \lyricmode { x -- xx xx -- xx -- xx -- xx \skip 1 ooo_--_oo_o_--_ooo -- uu -- u -- uu } \score { \new Staff << \globals \new Voice = "one" { \musicOne } \new NullVoice = "two" { \musicTwo } \new Lyrics \lyricsto "two" { \verseOne } >> } musicTwo is the same rhythm as musicOne, with notes in place of the rests. We can get away with doing that, because musicTwo is being used in a NullVoice context. Details on the NullVoice context are at http://lilypond.org/doc/v2.24/Documentation/notation/techniques-specific-to-lyrics#index-NullVoice but the basics here are that this context will accept music as any regular Voice, but produces no printed output. Near as I can figure, its primary use is situations just like this - aligning lyrics to a melody other than what's being printed in the staff. I frequently use this for songs that have both a melody and a harmony part with different rhythms and common lyrics that need to align to (usually) the melody rhythm. Also, the ooo's had to be fiddled a bit to get them to fit. That's why the underscores - to make that sequence align as if it were all one word. And the \skip 1 is to skip over the quarter rest at the end of the first line. Lots of further explanations in the docs - for much of the basics for dealing with lyrics sections 2.1.1 and 2.1.2 of the Notation Reference will pretty much cover the basics. -- Michael
programming error: Improbable offset for stencil: -inf staff space,Setting to zero.
Hi lilyponders! the attached fairly short script creates 4x the aforementioned error. It seems to be created by the combined \tweak Parentheses.font-size #2 \parenthesize The resulting score looks basically fine (AFAICT) but I guess this error should not occur anyway. This happens both with 2.25.9 and 2.25.10 Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver\version "2.25.9" \pointAndClickOff %% for smaller PDFs global = { \key bes \major \time 3/2 \dynamicUp \autoBeamOff \override DynamicTextSpanner.style = #'none } soprano = \relative bes' { \global R1*3/2*2 | bes2.\f c4 d2 | f2. es4 d2 \bar "||" \time 2/2 es1~\mp | es1 | d1 | r2 bes8[ c d es] f4. es8 d4 d | c1 | r2 c4^\tweak Parentheses.font-size #2 \parenthesize \cresc f4~ | f4 e f c | bes4 g a a | g4 c\f a2 \tweak Parentheses.font-size #2 \parenthesize \breathe \bar "||" \time 3/2 R1*3/2*2 | f'2.\f es4 d2 | bes2. c4 d2 \bar "||" \bar "|." } tenor = \relative bes { \global bes2.\f c4 d2 | f2. es4 d2 | R1*3/2*2 \bar "||" \time 2/2 r2 es2~\mp | es2 bes | bes8[ c d es] f4. es8 | d4. c8 bes4 bes | f2 f'~ | f4 f f2 | R1 | r2 r4 a,4^\tweak Parentheses.font-size #2 \parenthesize \cresc | g4 c f, a | c4 c\f c2 \tweak Parentheses.font-size #2 \parenthesize \breathe \bar "||" \time 3/2 f2.\f es4 d2 | bes2. c4 d2 | R1*3/2*2 \bar "||" \bar "|." } sopranoVerse = \lyricmode { Ho -- di -- e, ho -- di -- e, Chri -- stus, na -- _ _ _ tus est, No -- e, __ No -- e, No -- e, No -- e, No -- e, No -- e. Ho -- di -- e, ho -- di -- e, } tenorVerse = \lyricmode { Ho -- di -- e, ho -- di -- e, Chri -- stus, na -- _ _ _ _ _ tus est, na -- tus est, No -- e, No -- e, No -- e, No -- e. Ho -- di -- e, ho -- di -- e, } \score { \new ChoirStaff << \new Staff \with { instrumentName = "Soprano" } \new Voice = "soprano" \soprano \new Lyrics \lyricsto "soprano" { \sopranoVerse } \new Staff \with { instrumentName = "Tenor" } \new Voice = "tenor" { \clef "treble_8" \tenor } \new Lyrics \lyricsto "tenor" { \tenorVerse } >> }
Re: Relative rhythms across bars for time changes?
Hi Alasdair, On Fri, Nov 17, 2023 at 9:28 AM Alasdair McAndrew wrote: > I'm typesetting some 16th century music which has a lot of time changes. > And I'd like to add equivalences of notes across bar-lines, to indicate for > example, that a quarter note in one bar is equal in time to a half note in > the next bar. > > The sort of notation I want is in this snippet: > > > https://lilypond.org/doc/v2.24/Documentation/snippets/rhythms#rhythms-creating-metronome-marks-in-markup-mode > > However, I want that equals sign to be aligned with the barline. I have > two questions: (a) how can I do this? and (b) is there an easier way than > the markup given in the snippet? > In the time-honored tradition of "There's More Than One Way To Do It ™", here's another option: \version "2.25.10" tempoChange = #(define-music-function (alignValue firstNote secondNote) (number? ly:duration? ly:duration?) #{ \tweak self-alignment-X #alignValue \textEndMark \markup { \concat { ( \fontsize #-3 \general-align #Y #DOWN \note { #firstNote } #UP " = " \fontsize #-3 \general-align #Y #DOWN \note { #secondNote } #UP ) } } #} ) music = \relative c'' { c4 c c c | d d d d \tempoChange 0 4 2 | b a a b | d d d d | \break d d d e | f f f f | a f e d | e e e e \tempoChange -0.15 2 8. | \break e e a g | f f f f | e d d d | b b b b \fine } \new Staff { \new Voice { \music } } producing: [image: image.png] It's still using the code from the snippet you referenced (slightly modified), but wrapped into a function. This way you can tuck the function definition away somewhere (such as the top of your source file or off in a separate include file, whatever works best for you) so that the function code itself is out of the way, but can still be used with a single function call. The first argument to the function call is an alignment value - 0 is center, positive moves it left and negative moves it right.. The way the code works, if the two notes are of the same size (such as a quarter note and a half note) then the markup will be centered with an alignment value of 0. But if one of the notes is larger (such as in the second example) then the entire thing shifts over a bit. That's why in the second example the first argument is -0.15 - that's just enough to put the markup centered again. The second and third arguments are simply note durations. This function can only handle single notes, so no triplets or anything like that. One other thing to note - this function uses the \textEndMark function. There's also a \textMark function. The two work similarly, with the exception of how they handle line breaks. The one I'm using here (\textEndMark) puts the markup at the end of the system before the break. The other one (\textMark) puts the markup at the beginning of the system after the line break. So depending on which way you want things handled you may or may not need to change which of the two you use. -- Michael
Re: LilyPond 2.25.10
The problem is said LSR-snippet. The LSR runs 2.24., though with 2.25.10 (ly:grob-property-data lyric-text-grob 'self-alignment-X) may return a procedure. The snippet needs to learn how to deal with it. Fixed in LSR. https://lsr.di.unimi.it/LSR/Item?id=888 I can confirm that. Thanks alot, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver
Re: LilyPond 2.25.10
I will try to create a MWE if that is required to track down the problem. A *minimal* example is not strictly required (though helpful), but *some* example is — otherwise, there is nothing we can do, sorry. Attached is a fairly short example that shows the described behaviour with 2.25.10 The problem seems to be created by the code copied from LSR snippet 888. When the \layout{} section is commented out, everything compiles fine. So maybe it's not a lilypond problem but one of LSR snippet 888. The attached example from the previous email did have a function \paradyn not removed. The attached version does have it removed. Sorry for sending the wrong file. As an additional finding: Not only removing the \layout{} does make the error go away, removing the '\new ChoirStaff <<' with the corresponding '>>' makes the error go away as well. Not sure what the problem could be. Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver\version "2.25.9" %% Start LSR snippet 888 %% http://lsr.di.unimi.it/LSR/Item?id=888 %LSR by Wolf Alight %=>http://lists.gnu.org/archive/html/lilypond-user/2010-02/msg00444.html %=>http://lists.gnu.org/archive/html/lilypond-user/2013-05/msg00800.html %LSR modified by Alexander Kobel %=>http://permalink.gmane.org/gmane.comp.gnu.lilypond.general/89675 %LSR modified by Thomas Morley %=>http://lilypond.1069038.n5.nabble.com/LyricText-center-on-word-breaks-lyricMelismaAlignment-tt183456.html %% Note: Only characters of the string used to define space-set %% are recognized by 'center-on-word' #(define space-set (list->char-set (string->list ".?-;,:„“”‘’–— */()[]{}|<>!`~&…‥"))) #(define (width grob text) (let* ((X-extent (ly:stencil-extent (grob-interpret-markup grob text) X))) (if (interval-empty? X-extent) 0 (cdr X-extent #(define (center-on-word grob) (let* ((text (ly:grob-property-data grob 'text)) (syllable (markup->string text)) (word-position (if (string-skip syllable space-set) (string-skip syllable space-set) 0)) (word-end (if (string-skip-right syllable space-set) (+ (string-skip-right syllable space-set) 1) (string-length syllable))) (preword (substring syllable 0 word-position)) (word (substring syllable word-position word-end)) (preword-width (width grob preword)) (word-width (width grob (if (string-null? syllable) text word))) (note-column (ly:grob-parent grob X)) (note-column-extent (ly:grob-extent note-column note-column X)) (note-column-width (interval-length note-column-extent))) (- (* (/ (- note-column-width word-width) 2) (1+ (ly:grob-property-data grob 'self-alignment-X))) preword-width))) %% For general use this take this layout-setting %% In the example below the override is applied to selected Lyrics only %% \layout { \context { \Lyrics \override LyricText.X-offset = #center-on-word } } %% End LSR snippet 888 sopranoOne = \relative bes' { \time 3/2 R1*3/2*2 | bes2.\f c4 d2 | f2. es4 d2 \bar "||" \time 2/2 \tempo \markup { "[" \smaller \note {1} #UP = \smaller \note {1.} #UP "]" } 1=62 es1~\mp | es1 | d1 | r2 bes8[ c d es] f4. es8 d4 d | \bar "|." } sopranoOneVerse = \lyricmode { Ho -- di -- e, ho -- di -- e, Chri -- stus, na -- _ _ _ tus est, No -- e, __ No -- e, No -- e, No -- e, No -- e, No -- e. } \score { %\new ChoirStaff << \new Staff \with { midiInstrument = "acoustic grand" instrumentName = "Soprano I" } \new Voice = "soprano1" \sopranoOne \new Lyrics \lyricsto "soprano1" { \sopranoOneVerse } %>> }
Re: LilyPond 2.25.10
I will try to create a MWE if that is required to track down the problem. A *minimal* example is not strictly required (though helpful), but *some* example is — otherwise, there is nothing we can do, sorry. Attached is a fairly short example that shows the described behaviour with 2.25.10 The problem seems to be created by the code copied from LSR snippet 888. When the \layout{} section is commented out, everything compiles fine. So maybe it's not a lilypond problem but one of LSR snippet 888. Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver\version "2.25.9" %% Start LSR snippet 888 %% http://lsr.di.unimi.it/LSR/Item?id=888 %LSR by Wolf Alight %=>http://lists.gnu.org/archive/html/lilypond-user/2010-02/msg00444.html %=>http://lists.gnu.org/archive/html/lilypond-user/2013-05/msg00800.html %LSR modified by Alexander Kobel %=>http://permalink.gmane.org/gmane.comp.gnu.lilypond.general/89675 %LSR modified by Thomas Morley %=>http://lilypond.1069038.n5.nabble.com/LyricText-center-on-word-breaks-lyricMelismaAlignment-tt183456.html %% Note: Only characters of the string used to define space-set %% are recognized by 'center-on-word' #(define space-set (list->char-set (string->list ".?-;,:„“”‘’–— */()[]{}|<>!`~&…‥"))) #(define (width grob text) (let* ((X-extent (ly:stencil-extent (grob-interpret-markup grob text) X))) (if (interval-empty? X-extent) 0 (cdr X-extent #(define (center-on-word grob) (let* ((text (ly:grob-property-data grob 'text)) (syllable (markup->string text)) (word-position (if (string-skip syllable space-set) (string-skip syllable space-set) 0)) (word-end (if (string-skip-right syllable space-set) (+ (string-skip-right syllable space-set) 1) (string-length syllable))) (preword (substring syllable 0 word-position)) (word (substring syllable word-position word-end)) (preword-width (width grob preword)) (word-width (width grob (if (string-null? syllable) text word))) (note-column (ly:grob-parent grob X)) (note-column-extent (ly:grob-extent note-column note-column X)) (note-column-width (interval-length note-column-extent))) (- (* (/ (- note-column-width word-width) 2) (1+ (ly:grob-property-data grob 'self-alignment-X))) preword-width))) %% For general use this take this layout-setting %% In the example below the override is applied to selected Lyrics only %% %{ \layout { \context { \Lyrics \override LyricText.X-offset = #center-on-word } } %} %% End LSR snippet 888 sopranoOne = \relative bes' { \time 3/2 R1*3/2*2 | bes2.^\parendyn\f c4 d2 | f2. es4 d2 \bar "||" \time 2/2 \tempo \markup { "[" \smaller \note {1} #UP = \smaller \note {1.} #UP "]" } 1=62 es1~^\parendyn\mp | es1 | d1 | r2 bes8[ c d es] f4. es8 d4 d | \bar "|." } sopranoOneVerse = \lyricmode { Ho -- di -- e, ho -- di -- e, Chri -- stus, na -- _ _ _ tus est, No -- e, __ No -- e, No -- e, No -- e, No -- e, No -- e. } \score { \new ChoirStaff << \new Staff \with { midiInstrument = "acoustic grand" instrumentName = "Soprano I" } \new Voice = "soprano1" \sopranoOne \new Lyrics \lyricsto "soprano1" { \sopranoOneVerse } >> }
Re: LilyPond 2.25.10
/Users/mgd/Documents/lilypond-Noten/Weihnachten/Hodie-Christus-natus-est-Jan-Pieterszoon-Sweelinck.ly:75:13: warning: discarding event: `tempo-change-event' \time 2/2 \tempo \markup { "[" \smaller \note {1} #UP = \smaller \note {1.} #UP "]" } C:/Users/mgd/Documents/lilypond-Noten/Weihnachten/Hodie-Christus-natus-est-Jan-Pieterszoon-Sweelinck.ly:47:13: warning: conflict with event: `tempo-change-event' \time 2/2 \tempo \markup { "[" \smaller \note {1} #UP = \smaller \note {1.} #UP "]" } 1=62 C:/Users/mgd/Documents/lilypond-Noten/Weihnachten/Hodie-Christus-natus-est-Jan-Pieterszoon-Sweelinck.ly:103:13: warning: discarding event: `tempo-change-event' \time 2/2 \tempo \markup { "[" \smaller \note {1} #UP = \smaller \note {1.} #UP "]" } C:/Users/mgd/Documents/lilypond-Noten/Weihnachten/Hodie-Christus-natus-est-Jan-Pieterszoon-Sweelinck.ly:47:13: warning: conflict with event: `tempo-change-event' \time 2/2 \tempo \markup { "[" \smaller \note {1} #UP = \smaller \note {1.} #UP "]" } 1=62 C:/Users/mgd/Documents/lilypond-Noten/Weihnachten/Hodie-Christus-natus-est-Jan-Pieterszoon-Sweelinck.ly:131:13: warning: discarding event: `tempo-change-event' \time 2/2 \tempo \markup { "[" \smaller \note {1} #UP = \smaller \note {1.} #UP "]" } C:/Users/mgd/Documents/lilypond-Noten/Weihnachten/Hodie-Christus-natus-est-Jan-Pieterszoon-Sweelinck.ly:47:13: warning: conflict with event: `tempo-change-event' \time 2/2 \tempo \markup { "[" \smaller \note {1} #UP = \smaller \note {1.} #UP "]" } 1=62 C:/Users/mgd/Documents/lilypond-Noten/Weihnachten/Hodie-Christus-natus-est-Jan-Pieterszoon-Sweelinck.ly:159:13: warning: discarding event: `tempo-change-event' \time 2/2 \tempo \markup { "[" \smaller \note {1} #UP = \smaller \note {1.} #UP "]" } [8][16][24][32][40][48][56][64][72][80][88][96][104][112][120] Preprocessing graphical objects... Interpreting music... MIDI output to `Hodie-Christus-natus-est-Jan-Pieterszoon-Sweelinck.midi'... Finding the ideal number of pages... Fitting music on 9 or 10 pages... Drawing systems... programming error: Improbable offset for stencil: inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: -inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: -inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: -inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: -inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: -inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: -inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: -inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: -inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: -inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: -inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: inf staff space Setting to zero. continuing, cross fingers programming error: Improbable offset for stencil: -inf staff space Setting to zero. continuing, cross fingers Converting to `Hodie-Christus-natus-est-Jan-Pieterszoon-Sweelinck.pdf'... Success: compilation successfully completed I will try to create a MWE if that is required to track down the problem. Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver
Re: Fermata Markup below Staff
Hi Johannes, On Sun, Nov 12, 2023 at 11:44 AM Johannes Roeßler wrote: > Hi Michael, > > doesn't work well with a choirstaff though.. > No, it doesn't, does it. I missed the part in your original post where you mentioned the choir staff bit. With a GrandStaff the span bar counts as a single bar line, which you won't have in a ChoirStaff. So what we want (maybe?) is something that'll put the fermata above the bar line in the upper staff, and below the bar line in the lower staff. Am I understanding correctly that's what you're after? If so, try: upFermata = { \once \set Staff.caesuraType = #'((underlying-bar-line . "||")) \once \set Staff.caesuraTypeTransform = ##f \caesura ^\fermata } downFermata = { \once \set Staff.caesuraType = #'((underlying-bar-line . "||")) \once \set Staff.caesuraTypeTransform = ##f \caesura _\fermata } musicA = { f'1 \upFermata R1 f'2 \upFermata f'2 R1 b'1 \upFermata \fine } musicB = { f'1 \downFermata R1 f'2 \downFermata f'2 R1 b'1 \downFermata \fine } \new ChoirStaff << \new Staff \musicA \new Staff \musicB >> Maybe that'll get a little closer to what you're after. -- Michael
Re: Fermata Markup below Staff
Hi Johannes, On Sun, Nov 12, 2023 at 11:01 AM Johannes Roeßler wrote: > Hi all, > > I managed to place a fermata above a barline, I even managed to place it > correctly at the end of the line, but now I would like to place a fermata > sign below the barline (and rotate it 180°) too (in the bassvoice of a > choir staff group) - simplified example: > > \version "2.24.0" > \relative c' { > e1 \break \once \override Score.RehearsalMark.break-visibility = > #end-of-line-visible \mark \markup { \musicglyph #"scripts.ufermata" } \bar > "||" e2 > } > There's a code snippet in the Notation Reference that does this. It's at the bottom of: http://lilypond.org/doc/v2.24/Documentation/notation/writing-rests#caesuras -- Michael
Re: Score layout - ragged bottom and page break?
Hi Alasdair, On Sun, Nov 12, 2023 at 8:47 AM Alasdair McAndrew wrote: > How can I force each score with a book to have a last ragged bottom, and > each score beginning on a new page? > Might try putting each score into a \bookpart section. When I put multiple scores into a single PDF that's how I go about it - works quite well for me. Something like: \paper { ::global paper settings :: } \book { \bookpart { \paper { :: paper settings for just this score :: } \score { :: the score :: } } \bookpart { :: and the next score, and so forth :: } } One note - using \bookpart inserts a page break between parts, so no need for any explicit \pageBreak commands. For some more details have a look at: http://lilypond.org/doc/v2.24/Documentation/notation/multiple-scores-in-a-book -- Michael
Re: pageNumber
Hi David, On Sun, Nov 12, 2023 at 7:18 AM bobr...@centrum.is wrote: > I have the following in my \paper block. I want to eliminate the page > number on page 1. I have 'print-first-page-number = ##f' but the > oddHeaderMarkup is overriding it. Is there a way around this? Some sort of > conditional? > Turns out you just need to swap two lines. The \if conditional will apply to the next item ... and just the next item. It prints the next item if true, and leaves it blank if false. But the next item is the empty quotes, so something that's already empty. So just swap the \if conditional line down one to put it right before the page number line and all should be well. oddHeaderMarkup = \markup { \fill-line { "" \larger\bold "SCORE" \if \should-print-page-number \fromproperty #'page:page-number-string } } There's also an alternative you can use, that kind of does this from the opposite viewpoint. This will print the page number unless it's the first page. Either should work, just going at things in two different ways. In some circumstances (special cases? tricky layouts?) one might be preferable over the other. But there are options to explore. oddHeaderMarkup = \markup { \fill-line { "" \larger\bold "SCORE" \unless \on-first-page \fromproperty #'page:page-number-string } } For more details on these, have a look at: http://lilypond.org/doc/v2.25/Documentation/notation/custom-layout-for-headers-and-footers and http://lilypond.org/doc/v2.25/Documentation/notation/conditional-markup -- Michael
Re: Repeat volta Score.startRepeatBarType & Score.endRepeatBarType
Hi Stu, On Fri, Nov 10, 2023 at 11:18 AM Stu McKenzie wrote: > Thank you, Michael, for the working example. > You're quite welcome. It seems that additional combinations of defineBarLine were added in > version 2.25. > I downloaded version 2.25.9 and found that adding break resulted in > inconsistent results using the defineBarLine with the > Score.startRepeatBarType and Score.endRepeatBarType. > > For example simply adding a \break before changing the > Score.startRepeatBarType, i.e.: > > c d e f > \break > \set Score.startRepeatBarType = #"[[|:" > > results in the bar line at the end of the first line to include the new > start repeat bar type. > > I've tried defining various combinatons of bar lines, as defined on the > documentation for 2.25.9, e.g.: > \defineBarLine "[[|:-StartDouble_fff" #'( #f #f #f ) > \defineBarLine "[[|:-EndDouble_fff" #'( #f #f #f ) > \defineBarLine "[[|:-StartDouble_ttf" #'( #t #t #f ) > \defineBarLine "[[|:-EndDouble_ttf" #'( #t #t #f ) > \defineBarLine "[[|:-StartDouble_ttt" #'( #t #t #t ) > \defineBarLine "[[|:-EndDouble_ttt" #'( #t #t #t ) > but cannot get the results that I'd like, especially when alternatives are > added to the repeat volta. > > Any further suggestions? > Yup. Try these: \defineBarLine "[[|:" #'( #f #t #f ) \defineBarLine ":|]]" #'( #t #f #f ) \defineBarLine ":|][[|:" #'( ":|]" "[[|:" #f) \defineBarLine ":|]][[|:" #'( ":|]]" "[[|:" #f) As we want the end repeat to show up at the end of a line but not the beginning, and the start repeat to show at the beginning of a line but not the end, the eol and bol booleans need changed. Basically the two are the reverse of each other. So eol true for the end repeat, and bol true for the begin repeat. I've left the span-bar set false for both - the built-in single winged repeat appears to have it set to false, so I'm following along with that here. And yes, I goofed in my first message - I said it was beginning, mid and end of line. I skimmed the docs a bit too quickly there. It is end of line, beginning, and span-bar (as in the bar spanning between staves when grouped, such as a StaffGroup). The next two are for use in \set Score.doubleRepeatBarType They're the repeat sign that shows when two repeated sections are back to back. The first ( ":|][[|:" ) is going from a single winged repeat to a double winged, while the second is going from double to double. And with those, both the beginning of line and the end of line behavior are specified as separate entries. That way if there's a line break with either of them it should get the correct repeat sign either side of the line break. So now we have: \new Staff { \defineBarLine "[[|:" #'( #f #t #f ) \defineBarLine ":|]]" #'( #t #f #f ) \new Voice { \relative c' { \set Score.startRepeatBarType = #"[|:" \set Score.endRepeatBarType = #":|]" c' d e f \repeat volta 2 { c d e f } c d e f \break \set Score.startRepeatBarType = #"[[|:" \set Score.endRepeatBarType = #":|]]" \repeat volta 2 { c d e f } \fine } } } producing: [image: image.png] and: \new Staff { \defineBarLine "[[|:" #'( #f #t #f ) \defineBarLine ":|]]" #'( #t #f #f ) \defineBarLine ":|][[|:" #'( ":|]" "[[|:" #f) \defineBarLine ":|]][[|:" #'( ":|]]" "[[|:" #f) \new Voice { \relative c' { \set Score.startRepeatBarType = #"[|:" \set Score.endRepeatBarType = #":|]" \set Score.doubleRepeatBarType = #":|][[|:" c' d e f \repeat volta 2 { c d e f } \break \set Score.startRepeatBarType = #"[[|:" \set Score.endRepeatBarType = #":|]]" \repeat volta 2 { c d e f } c d e f \set Score.startRepeatBarType = #"[|:" \set Score.endRepeatBarType = #":|]" \repeat volta 2 { c d e f } \set Score.doubleRepeatBarType = #":|][[|:" \set Score.endRepeatBarType = #":|]]" \repeat volta 2 { c d e f } c d e f \fine } } } producing: [image: image.png] Hopefully this'll help get you a bit closer to what you're after. -- Michael
Re: Repeat volta Score.startRepeatBarType & Score.endRepeatBarType
Hi there, On Wed, Nov 8, 2023 at 7:21 PM Stu McKenzie wrote: > > I'd like to differentiate between two repeat voltas in a score by using > 2 different start and end bar types. > > The following bar types are already defined in LilyPond: > Score.startRepeatBarType = #"[|:" > Score.endRepeatBarType = #":|]" > > I'd like to define a second bar type with double opening and closing > parentheses, e.g.: > Score.startRepeatBarType = #"[[|:" > Score.endRepeatBarType = #":|]]" > > How would that be acheived? > Maybe something like this: \version "2.25.9" \language "english" \new Staff { \defineBarLine "[[|:" #'( #t #t #t ) \defineBarLine ":|]]" #'( #t #t #t ) \new Voice { \relative c' { \set Score.startRepeatBarType = #"[|:" \set Score.endRepeatBarType = #":|]" c' d e f \repeat volta 2 { c d e f } c d e f \set Score.startRepeatBarType = #"[[|:" \set Score.endRepeatBarType = #":|]]" \repeat volta 2 { c d e f } } } } which produces: [image: image.png] For details on how to define the new bar lines, see http://lilypond.org/doc/v2.25/Documentation/notation/bar-lines But basically the two \defineBarLine lines are what actually define the bars lines to use, then later on you use them as desired. The three bool values after define the behavior a beginning of line, mid line, end end of line. Those will need adjusted to your needs. -- Michael
Re: fill page
Hi David, On Thu, Nov 9, 2023 at 10:47 AM bobr...@centrum.is wrote: > I have a page of music but it is a bit short on the page. I remember a > long time ago that there was something involving padding (I think) as well > as some opposing function that, when combined, would space out the systems > to fill the page to the bottom margin. I've been looking through the docs > trying to find that solution but have failed. > > Simply put, I want the systems to spread down the page vertically to fill > to the bottom margin. > Sounds like you want ragged-last-bottom = ##f in your \paper block. Have a look at http://lilypond.org/doc/v2.25/Documentation/notation/fixed-vertical-spacing-paper-variables -- Michael
Re: Score structure with alternate endings
On Thu, Nov 2, 2023 at 9:43 AM N. Andrew Walsh wrote: > Another question: is it possible to set the key signature for the two > "alternate" sections to be different? I know I can hide one, but is it > possible for different voices to have/display key signatures that are > independent of one another? > Sure can, as long as each one is in its own staff. (As in, if there are multiple voices sharing one staff they each have to be in the same key.) You can either set the key signature at the staff level, or you can do it at the voice level. I prefer to put the key in with the music, something like: music = \relative c' { \key c \major c4 d e f } This way, the key information is carried along with the music. You can also put the time signature and the tempo into the music variable as well, if you wish. That way if you want / need to reuse the music the information is there already. Much of the music I deal with I'm reusing the same music variable in multiple scores, each formatting the music differently for different instruments. But since the music itself is already in a variable, reusing it like that is easy. But that's my (rather peculiar) individual situation and needs. Others most certainly do things differently. It'll take time and a bunch of trial and error to figure out what you need for whatever you're doing. And then more time and more trial and error to figure out how best to go about it. It's a learning process. -- Michael
Re: Score structure with alternate endings
On Thu, Nov 2, 2023 at 7:11 AM N. Andrew Walsh wrote: > One question: you add some extra padding between the two variants with an > \override; is there a way to do the same thing for modifying the padding > between two PianoStaff groups (but not change the staff-staff spacing > within each of them)? > Absolutely. Just one catch - it has to be done differently. For all the gory details, I'm going to suggest you have a look through chapter 4 of the Notation Reference, titled simply Spacing issues. It's at http://lilypond.org/doc/v2.25/Documentation/notation/spacing-issues There's a lot in there, but the main thing to recognize and be aware of is that different spacing settings get set in different places. Some can go in a few different places (such as the staff-staff padding I added in the example code), while others can only go in the paper block. And as it happens, the setting you are asking about is one that has to go into the paper block. If you already have a paper block (for example setting margins or indents, that kind of thing) you can just add this in. But basically what you'll need is something along the lines of: \paper { system-system-spacing.padding = #15 } Here, system-system-spacing is the setting you want. And each setting has sub-settings - basic-distance, minimum-distance, padding, and stretchability. The docs I linked to above have all the details on what each of those mean and how to go about changing them. The number is the space measured in staff spaces. It'll probably take a bit of trial and error to find the spacing you want, but it should be fairly straight forward. -- Michael
Re: Score structure with alternate endings
On Wed, Nov 1, 2023 at 10:59 AM N. Andrew Walsh wrote: > Hi List, > Hi Andrew, > I have a client who's written a piece where he wants the last 16 bars to > have two different variations, to be freely chosen by the performer. Sort > of a choose-your-own-adventure score. It's scored for two voices and piano, > but the ending(s) would only be the piano. > > So, grossly simplified, the score would have bars 1-53 as normal music, > and then the performer adds a coda of either "A" or "B", each of which is a > 16-bar section of one of the two variations. The bar numbers should be the > same. > > How would I structure the score to do this? I'm thinking it'd be > preferable to have the two variations on the top and bottom of each page, > so that it's clear they're parallel, but I'm not sure how to set it up. > Well, like many things with Lilypond I'm sure there's more than one way to do things. My take on this would be something like this: \version "2.25.9" length_of_main = #8 length_of_alt = #4 music_main = \relative c' { \repeat unfold \length_of_main { a4 b c d } %\break \repeat unfold \length_of_alt { s1 } } music_a = \relative c' { \repeat unfold \length_of_main { s1 } \break \sectionLabel \markup { \bold "A or B - pick one!" } \repeat unfold \length_of_alt { c4 b a b } } music_b = \relative c' { \repeat unfold \length_of_main { s1 } \repeat unfold \length_of_alt { e4 d c d } } \new StaffGroup << \new Staff \with { instrumentName = "Main" shortInstrumentName = "Main" \RemoveAllEmptyStaves } \music_main \new Staff \with { instrumentName = "A" shortInstrumentName = "A" \RemoveAllEmptyStaves \override VerticalAxisGroup.staff-staff-spacing.padding = #8 } \music_a \new Staff \with { instrumentName = "B" shortInstrumentName = "B" \RemoveAllEmptyStaves } \music_b >> Here, music_main is the first part of the music running along by itself, with music_a and music_b the two possible alternates. The main thing will be to watch the spacer rests at the beginning of music_a and music_b - they need to be the right number of measures worth. By using the variables in the unfold statement I find it a bit easier to keep track and make sure the right numbers are getting where they need to be. Also I've added some extra space between the two alternates, might reinforce that they're only sorta kinda together but not really. Don't know if this is quite what you're after, but maybe it'll at least serve as a starting point. -- Michael
Re: function to force accidentals on a subset of notes
This is what happens for me too. I think it has something to do with all the other functions I am using. Oct 30, 2023, 21:25 by l...@gmx.de: > > Hi Michael, > > Am 30.10.23 um 10:42 schrieb Michael Winter: > >> But I am confused about what you said. For me, it is posting the >> accidental on tied notes after line breaks. >> > > No I'm confused. :-) If I do > > > > \transpose a c' \relative > { > a8 gis~ gis g fis g gis a > gis1~ \break gis2 gis > } > > > > in my example file, I get: > > > > > > (To wit, no natural sign on the first b in measure 3). > > > Is this different for you? > > > Lukas > >
Re: fontsize of scripts.segno in \repeat segno
On Tue, Oct 31, 2023 at 2:04 AM Paul Scott wrote: > How I change the font size of a segno in a \repeat segno structure? > You'll want https://lilypond.org/doc/v2.25/Documentation/internals/segnomark for the details, but the short version is it's a score level override of SegnoMark.font-size -- Michael
Re: Show TacetStaff when StaffGroup empty
On Mon, Oct 30, 2023 at 9:57 AM Pierre-Luc Gauthier < p.luc.gauth...@gmail.com> wrote: > Hello there, > > Please let this not be a duplicate. > > Is there a way for the tacet staff to be shown *only* when all the other > staves are empty ? Manual intervention is not a viable option here. > If I understand correctly what you're after, the following seems to do the trick: \version "2.25.9" \language "english" tacet = { R1*40 } musicA = { \repeat unfold 28 g'4 | \repeat unfold 4 g'4 | R1*10 \repeat unfold 16 f'4 | } musicB = { R1*4 \break \repeat unfold 16 c'4 | \break R1*10 \break \repeat unfold 16 d'4 | } \new StaffGroup \with { \consists Keep_alive_together_engraver } << \new Staff \with { instrumentName = "Tacet" shortInstrumentName = "Tacet" \override VerticalAxisGroup.remove-layer = 2 } \tacet \new Staff \with { instrumentName = "A" shortInstrumentName = "A" \RemoveAllEmptyStaves \override VerticalAxisGroup.remove-layer = 1 } \musicA \new Staff \with { instrumentName = "B" shortInstrumentName = "B" \RemoveAllEmptyStaves \override VerticalAxisGroup.remove-layer = 1 } \musicB >> This is based on http://lilypond.org/doc/v2.25/Documentation/notation/hiding-staves -- Michael
Re: function to force accidentals on a subset of notes
Thanks! This seems to work quite well : ) But I am confused about what you said. For me, it is posting the accidental on tied notes after line breaks. Best, Michael Oct 28, 2023, 22:40 by l...@gmx.de: > Hi Michael, > >> Thanks Lukas! >> >> This works but also forces the accidental on tied notes. >> > > Sorry for not getting back to you sooner. > > The following version registers ties and removes our auto-generated > accidentals for notes in which a tie ends. (It's a bit overeager and also > removes tied accidentals after line breaks, so we get a behaviour as if > Accidental.hide-tied-accidental-after-break is set to ##t. Please give word > if you want me to change that.) > > Lukas > > \version "2.24.0" > > forced-accidentals-pitches = > #(music-pitches #{ bes b #}) > > #(define (diatonic-pitch-class= p q) > (and (= (ly:pitch-notename p) (ly:pitch-notename q)) > (= (ly:pitch-alteration p) (ly:pitch-alteration q > > Force_accidentals_engraver = > #(lambda (context) > (let > ((ties '()) > (affected-note-events '())) > (make-engraver > (end-acknowledgers > ((tie-interface engraver grob source-engraver) > (set! ties (cons grob ties > ((stop-translation-timestep engraver) > (for-each > (lambda (tie) > (let* ((right-notehead (ly:spanner-bound tie RIGHT)) > (right-notehead-cause (ly:grob-property right-notehead > 'cause))) > (if (member right-notehead-cause affected-note-events) > (ly:grob-suicide! > ;;; the accidental grob should be guaranteed to > ;;; exist since we forced it into existence... > (ly:grob-object > right-notehead 'accidental-grob) > ties) > (set! ties '()) > (set! affected-note-events '())) > (listeners > ((note-event engraver event) > (when (member (ly:event-property event 'pitch) > forced-accidentals-pitches > diatonic-pitch-class=) > (ly:event-set-property! event 'force-accidental #t) > (set! affected-note-events > (cons event affected-note-events > > \layout { > \context { > \Voice > \consists #Force_accidentals_engraver > } > } > > \transpose a c' \relative > { > a8 gis~ gis g fis g gis a > gis1~ gis2 gis > } >
Re: Thinner Ledger Lines for Cue Notes?
On Tue, Oct 24, 2023 at 2:50 AM YUKI wrote: > Hello, > Hi there. > I'm working on a violin part score, and I want to make thinner ledger > lines just for cue notes. I've tried using ledger-line-thickness but it > seems that will affect the whole staff and normal size notes. Are there any > other solutions for this? > Well, I'm not sure this is the best way to go about this. But I did come up with something that seems to do what you want. Basically it involves running two staves simultaneously. That way you can adjust the ledger lines on one while the other isn't affected. You can do this by way of a OneStaff. Details can be found at http://lilypond.org/doc/v2.25/Documentation/notation/grouping-staves#index-OneStaff Example code follows: \version "2.24.1" music = \relative c'' { f2\rest b4. b8 f2\rest b4. b8 f2\rest b4. b8 f2\rest b4. b8 } cuenotes = \relative c'' { g8 e b e s2 s1 g8 e b e s2 s1 } \score { \new OneStaff << \time 2/2 \new Staff = "main_music" { \music } \new Staff = "cue_notes" \with { \override StaffSymbol.ledger-line-thickness = #'(0.35 . 0.1) } { \new CueVoice { \cuenotes } } >> % End OneStaff } % End Score \layout { \context { \OneStaff \consists Time_signature_engraver } \context { \Staff \remove Time_signature_engraver } } I've split the music entries out each into their own variable. To me, this makes it easier to keep track of things. Spacer rests will be used to keep things lined up as needed. Also, you'll see in the music variable that the r2 has been replaced by f2\rest This is needed to raise the rest up to the desired position. The rests aren't automatically placed higher, I'm guessing because instead of two voices in one staff it's two staves occupying the same vertical position. So a little more manual control on spacing will be needed in cases like this. If you haven't run into the use of the \rest command before, more of a description is at http://lilypond.org/doc/v2.25/Documentation/notation/rests#index-_005crest Next up is instantiating each of the various staves. The OneStaff is a grouping staff, that can contain other staves and place them into the same vertical space, instead of one above another like a StaffGroup or GrandStaff would do. This is how you can effectively have two staves running in the same place at the same time. This is also how you can adjust the ledger lines for just the cue notes, by having them inhabit their own separate staff. Also note that the two staves are grouped using the angle brackets (i.e. << >>) instead of the curly brackets. This way the two staves are running simultaneously. And, of course, the values for adjusting the ledger lines will need adjusted according to your desires. The layout block at the end moves the time signature engraver from the individual staves to the OneStaff. Since the two staves are running at the same time, I'm not sure this is actually needed. But it doesn't seem to hurt, either. Granted, I've only done a limited amount of testing on this. But so far it seems to be working as desired. If nothing else, maybe it can at least serve as a starting point. -- Michael
Re: function to force accidentals on a subset of notes
Thanks Lukas! This works but also forces the accidental on tied notes. Best, Michael Oct 22, 2023, 10:19 by l...@gmx.de: > > Hi Michael, > > > this is easily accomplished with an custom engraver. (I perfectly > understand that the terms "easily" and "custom engraver" don't seem to > go well together at first - I thought so for many years as well -, but > after some getting used to it, the concept is actually quite simple and > elegant.) > > > > \version "2.24.0" > > forced-accidentals-pitches = > #(music-pitches #{ bes b #}) > > #(define (diatonic-pitch-class= p q) > (and (= (ly:pitch-notename p) (ly:pitch-notename q)) > (= (ly:pitch-alteration p) (ly:pitch-alteration q > > Force_accidentals_engraver = > #(lambda (context) > (make-engraver > (listeners > ((note-event engraver event) > (if (member (ly:event-property event 'pitch) > forced-accidentals-pitches > diatonic-pitch-class=) > (ly:event-set-property! event 'force-accidental #t)) > > \layout { > \context { > \Voice > \consists #Force_accidentals_engraver > } > } > > \transpose a c' \relative > { > a8 gis g fis g gis a4 > } > > > > Lukas > > Am 21.10.23 um 11:37 schrieb Michael Winter via LilyPond user discussion: > >> Thanks Jean, >> >> I am not sure I completely follow. >> >> Lets say I have a music sequence: >> >> a b c d e f g a bes c d e f g ... >> >> How do I apply what you have written as a functionto only show the >> flats and naturals for b and bes. Again. I donot want to apply this >> to individual notes. >> >> Sorry if I am missing something. >> >> Best, >> >> Michael >> >> >> Oct 21, 2023, 01:37 by >> j...@abou-samra.fr>> : >> >>> >>> Try >>> >>> \displayMusic c'! >>> >>> This shows you that the >>> !>>> syntax corresponds to setting >>> the >>> force-accidental>>> property to true. Thus, if you >>> have identified the note events you want to force accidentals >>> on, you can do >>> >>> (ly:music-set-property! the-note-event 'force-accidental #t) >>> >>> on each of them. >>> >>> >>> Best, >>> >>> >>> Jean >>> >>> >> >>
Re: markup on ambitus?
Hi Graham, On Sat, Oct 21, 2023 at 9:48 AM Graham King wrote: > In the following MWE, is it possible to put a small markup above each > ambitus to signify the voice to which the ambitus belongs? > > I'm just failing to see where to attach ^\markup { foo } > I couldn't find a place to directly attach a markup either. But I did come up with a somewhat hack-ish workaround that seems to sorta kinda work, in a somewhat roundabout way. I found that the Balloon_engraver can be pressed into service to (more or less) do what you're looking for. By setting the BalloonText.annotation-balloon to false the box that normally is drawn around the target grob is removed. If you want the pointer line to be removed, uncomment the marked line. For more details, https://lilypond.org/doc/v2.25/Documentation/internals/balloontext and http://lilypond.org/doc/v2.25/Documentation/notation/balloon-help contain all the gory details. \version "2.25.9" \new Staff << \new Voice = "c_Instr" \with { \consists "Ambitus_engraver" \consists "Balloon_engraver" } \relative { \override BalloonText.annotation-balloon = ##f %\override BalloonText.annotation-line = ##f % Uncomment to remove the pointer line \balloonGrobText Ambitus #'(-2 . 4) \markup { \tiny "C Instr" } c' d e f } \new Voice = "c_Singer" \with { \consists "Ambitus_engraver" \consists "Balloon_engraver" } \relative { \override BalloonText.annotation-balloon = ##f %\override BalloonText.annotation-line = ##f % Uncomment to remove the pointer line \balloonGrobText Ambitus #'(2 . 4) \markup { \tiny "C Sing" } \override Ambitus.X-offset = #2.5 s1 a'4 b c d } >> -- Michael
Re: function to force accidentals on a subset of notes
Thanks Jean, I am not sure I completely follow. Lets say I have a music sequence: a b c d e f g a bes c d e f g ... How do I apply what you have written as a function to only show the flats and naturals for b and bes. Again. I do not want to apply this to individual notes. Sorry if I am missing something. Best, Michael Oct 21, 2023, 01:37 by j...@abou-samra.fr: > > Try > > \displayMusic c'! > > This shows you that the > !> syntax corresponds to settingthe > > force-accidental> property to true. Thus, if you haveidentified the note > events you want to force accidentalson, you can do > > (ly:music-set-property! the-note-event 'force-accidental #t) > > on each of them. > > > Best, > > > Jean > >
function to force accidentals on a subset of notes
I have a piece that is in the following scale: c d e fis g aes bes b Is it possible to force the accidentals just for the bes and the b? But here is the catch... I am both transposing the part and respelling pitch-classes as show below. The scale above is actually the resulting printed set of notes. The music is already generated and I would not want to have to do this manually for each occurance. Thanks in advance, Michael transposePitchClasses = #(define-music-function (scaleA scaleB music) (ly:music? ly:music? ly:music?) (let* ((scaleA (ly:music-property scaleA 'elements)) (scaleB (ly:music-property scaleB 'elements)) (scaleA (map (lambda (x) (ly:music-property x 'pitch)) scaleA)) (scaleB (map (lambda (x) (ly:music-property x 'pitch)) scaleB)) (classesA (map (lambda (p) (cons (ly:pitch-notename p) (ly:pitch-alteration p))) scaleA))) (map-some-music (lambda (m) (let ((p (ly:music-property m 'pitch))) (if (not (null? p)) (let* ((nn (ly:pitch-notename p)) (oct (ly:pitch-octave p)) (alt (ly:pitch-alteration p)) (pos (list-index (lambda (x) (and (= (car x) nn) (= (cdr x) alt))) classesA))) (if pos (let* ((p2 (list-ref scaleA pos)) (oct2 (ly:pitch-octave p2)) (p3 (list-ref scaleB pos)) (new-pitch (ly:pitch-transpose p3 (ly:make-pitch (- oct oct2) 0 (ly:music-set-property! m 'pitch new-pitch))) m) #f))) music) music)) \new Staff \with { instrumentName = #"synth I (2)" shortInstrumentName = #"synI" \remove "Time_signature_engraver" } << \transpose a c' \transposePitchClasses {a b cis dih e fih geh gis} {a b cis dis e f g gis} \include "includes/ammann_part_6.ly" %this is the music >>
Re: New version 2.25.9 on Windows "feels" slower and less reliable
Assertion failed: my_index == 0, [...] I found what triggered this Assertion: In my file I had a \new Lyrics ... outside of any Staff or Score context. Please provide a minimal example that so that we can add an issue to the tracker. The attached file is pretty much as minimal as I can reduce it. Removing more bars makes it compile w/o error. Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver\version "2.25.9" \header { title = "some title" } sopranoVoice = \relative b' { \key d \major R1*6/4 | b2 a4 a( g) fis | g4( d e) fis2 r4 | b2. e4( d) b4 | b2.( a2) r4 | a4( cis) b a2 a4 | e'4 d cis b2 a4 | a4( fis') e e( dis) fis, | a2 b4 a2( gis4) | gis4( e') d d( cis) e, | g2 a4 g2( fis4) | b2. e, | a2. d, | d2 fis4 fis2( e4) | d2 r4 r2 r4 | } verse = \lyricmode { bla bla } sopranoVoicePart = \new Staff { \new Voice = "solo" { \sopranoVoice } } \new Lyrics \lyricsto "solo" { \verse } \score { << \sopranoVoicePart >> \layout { } }
Re: New version 2.25.9 on Windows "feels" slower and less reliable
Further I do very regularly get errors like this: Fitting music on 5 or 6 pages...Assertion failed: my_index == 0, file /home/lily/lilypond-2.25.9/release/binaries/mingw/lilypond/lilypond-2.25.9/lily/page-breaking.cc, line 1083 This happens during entering music and creating an interim version for proof reading. I then continue to add music and the error goes away only to return after having added more music. It feels like an on/off thing depending on some weird constellation of the music. I found what triggered this Assertion: In my file I had a \new Lyrics ... outside of any Staff or Score context. Strange error though (not knowing the details of the internals) Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver
New version 2.25.9 on Windows "feels" slower and less reliable
Hi list, the new version 2.25.9 seems to take considerably longer than e.g. 2.25.8 though I have yet to do precise measurements. Am I the only one who thinks that's the case? Or is that an (already) known problem? Further I do very regularly get errors like this: Fitting music on 5 or 6 pages...Assertion failed: my_index == 0, file /home/lily/lilypond-2.25.9/release/binaries/mingw/lilypond/lilypond-2.25.9/lily/page-breaking.cc, line 1083 This happens during entering music and creating an interim version for proof reading. I then continue to add music and the error goes away only to return after having added more music. It feels like an on/off thing depending on some weird constellation of the music. I don't have a MWE but am happy to send a larger file if that helps. Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver
Re: Dynamics placement in partCombine
Quick answer, and I’m not sure it will help much: \dynamicUp affects the context (Voice) in which it’s placed. \partCombine combines its arguments into new Voices and \dynamicUp ended up in a different voice than the p Thank you for your answer. When you remove \dynamicUp ALL dynamics appear below. What irritates me is that when you have identical dynamic markings in both voices \dynamicUp and things like \override DynamicTextSpanner.style = #'none work normally. However when voices have differing dynamics it stops to work at some point. Might be due to the temporary contexts created by \partCombine internally. The current behaviour is very unexpected to me though. The following seems to work: - snip - snip - snip - snip - snip - snip - \version "2.25.9" musa = { \dynamicUp c'4\p \repeat unfold 3 { c' } \dynamicUp c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' } } musb = { \dynamicUp s1 \dynamicUp c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' } } \score { \partCombine \musa \musb } \score { \partCombine \musb \musa } \score { \partCombine \musa \musa } \score { \partCombine \musb \musb } - snip - snip - snip - snip - snip - snip - Kind regards, Michael-- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver\version "2.25.9" musa = { \dynamicUp c'4\p \repeat unfold 3 { c' } \dynamicUp c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' } } musb = { \dynamicUp s1 \dynamicUp c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' } } \score { \partCombine \musa \musb } \score { \partCombine \musb \musa } \score { \partCombine \musa \musa } \score { \partCombine \musb \musb } partCombine-Test.pdf Description: Adobe PDF document
Re: Dynamics placement in partCombine
Quick answer, and I’m not sure it will help much: \dynamicUp affects the context (Voice) in which it’s placed. \partCombine combines its arguments into new Voices and \dynamicUp ended up in a different voice than the p Thank you for your answer. When you remove \dynamicUp ALL dynamics appear below. What irritates me is that when you have identical dynamic markings in both voices \dynamicUp and things like \override DynamicTextSpanner.style = #'none work normally. However when voices have differing dynamics it stops to work at some point. Might be due to the temporary contexts created by \partCombine internally. The current behaviour is very unexpected to me though. Kind regards, Michael-- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver
Re: How to define a turn with two accidentals
Hi Vlad, On Fri, Oct 13, 2023 at 6:02 AM Volodymyr Prokopyuk < volodymyrprokop...@gmail.com> wrote: > I'd like to create a *music function* for convenience to be used like \after > 4. { \udTurn \sharp \natural } g=''2 a8 g f e | > > How do I create a music function for this purpose? I've tried the > following with the *error* of unknown command \sharp > > udTurn = #(define-music-function (up down) (markup? markup?) > #{ \markup \center-column { > \raise #-1 \teeny #up > \musicglyph "scripts.turn" > \lower #-1 \teeny #down > } #}) > I got something that seems to work by switching from a music function to a markup function. This code: \version "2.24.2" #(define-markup-command (udTurn layout props up down) (markup? markup?) (interpret-markup layout props #{ \markup { \center-column { \raise #-1 \teeny #up \musicglyph "scripts.turn" \lower #-1 \teeny #down } } #} )) \new Score { \new Staff { \new Voice { \after 4. ^\markup{ \udTurn \sharp \natural } g''2 a8 g f e \after 4. ^\markup{ \udTurn \flat \sharp } g''2 a8 g f e } } } is producing: [image: image.png] Might not be the best way to go about this, but it seems to be working as described. Hopefully at least enough to get started with. -- Michael
Re: Dynamics placement in partCombine
Quick answer, and I’m not sure it will help much: \dynamicUp affects the context (Voice) in which it’s placed. \partCombine combines its arguments into new Voices and \dynamicUp ended up in a different voice than the p Thank you for your answer. When you remove \dynamicUp ALL dynamics appear below. What irritates me is that when you have identical dynamic markings in both voices \dynamicUp and things like \override DynamicTextSpanner.style = #'none work normally. However when voices have differing dynamics it stops to work at some point. Might be due to the temporary contexts created by \partCombine internally. The current behaviour is very unexpected to me though. Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver
Re: Dynamics placement in partCombine
I presume that partCombine overrides the dynamic placement so that dynamics for the two parts are placed above and below, which seems a reasonable approach when the parts are more distinct than in the given example. Using ^ to override it in this case seems a tolerable alternative. Thank you for your answer. I'm not sure that's the correct explanation though. See this: - snip - snip - snip - snip - snip - snip - snip - \version "2.25.9" musa = { \dynamicUp c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' } } musb = { \dynamicUp s1 c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' } } \score { \partCombine \musa \musb } \score { \partCombine \musb \musa } \score { \partCombine \musa \musa } \score { \partCombine \musb \musb } - snip - snip - snip - snip - snip - snip - snip - When you repeat the last bar identically in both \musa and \musb the dynamics stay below in the first two scores and stay above in the second two scores. To me this looks like a bug. Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver\version "2.25.9" musa = { \dynamicUp c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' } } musb = { \dynamicUp s1 c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' } } \score { \partCombine \musa \musb } \score { \partCombine \musb \musa } \score { \partCombine \musa \musa } \score { \partCombine \musb \musb } partCombine-Test.pdf Description: Adobe PDF document
Dynamics placement in partCombine
Hi list, the following code places the 2nd \p under the music but I'd like it above. I know I could explicitly add a placement (like ^\p) but wonder why \dynamicUp doesn't do its job. - snip - snip - snip - snip - snip - snip - snip - \version "2.25.9" musa = { \dynamicUp c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' } } musb = { \dynamicUp s1 c'4\p \repeat unfold 3 { c' } } \score { \partCombine \musa \musb } - snip - snip - snip - snip - snip - snip - snip - Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver\version "2.25.9" musa = { \dynamicUp c'4\p \repeat unfold 3 { c' } c'4\p \repeat unfold 3 { c' } } musb = { \dynamicUp s1 c'4\p \repeat unfold 3 { c' } } \score { \partCombine \musa \musb } partCombine-Test.pdf Description: Adobe PDF document
Re: \markup text outside Lyrics - how?
Why not use text marks, http://lilypond.org/doc/v2.25/Documentation/notation/text-marks ? They are intended exactly for textual indications that should appear at the top of each system, i.e. above the lyrics in your case. Because I wasn't aware of their existence :) They work just nicely ... and I really need to make a habit out of carefully reading the "what's new" documentation of new versions... Thank you for pointing me to it, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver
Re: \markup text outside Lyrics - how?
[moving instructional text above notes and outside of lyrics] you could create a Dynamics context before the staff containing the markup. Thanks Valentin, that works like a charm :) Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver
\markup text outside Lyrics - how?
Dear lilyponders, I would like to have directional text outside of lyrics. I've been trying to use \markup but so far I only managed to have the text between notes and Lyrics. See the following example: - snip - snip - snip - snip - \version "2.25.8" music = { <>^\markup "This Text shall be outside of the Lyrics" \repeat unfold 16 { c' } } verse = \lyricmode { \repeat unfold 16 { du } } \score { << \new Staff = "s" { \new Voice = "s1" { \music } } \new Lyrics \with { alignAboveContext = #"s" } \lyricsto "s1" { \verse } >> } - snip - snip - snip - snip - Any ideas what the proper incantation would be? Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver\version "2.25.8" music = { <>^\markup "This Text shall be outside of the Lyrics" \repeat unfold 16 { c' } } verse = \lyricmode { \repeat unfold 16 { du } } \score { << \new Staff = "s" { \new Voice = "s1" { \music } } \new Lyrics \with { alignAboveContext = #"s" } \lyricsto "s1" { \verse } >> } TextTest.pdf Description: Adobe PDF document
Re: Alternating time signature with cue clef
On Wed, Sep 27, 2023 at 12:59 PM Knute Snortum wrote: > On Tue, Sep 26, 2023 at 11:25 PM Michael Werner > wrote: > >> Hi Knute, >> >> On Tue, Sep 26, 2023 at 3:27 PM Knute Snortum wrote: >> >>> TL;DR >>> How do I engrave an alternating time signature and an initial cue clef? >>> >>> [snip] > >> >> What about using a CueVoice, resetting sizes back to default? It seems to >> work both visually and listening to the midi produced. I've attached some >> code that engraves the first 7 measures of the Scriabin piece. Within the >> CueVoice I did have to explicitly set the slur, stem and articulation >> directions - apparently CueVoice either overrides or ignores voiceOne and >> voiceTwo settings in those regards. Quite likely there are better ways to >> go about this, but maybe this can at least get something going. >> -- >> Michael >> >> > Thanks Michael for your work on my problem. I'm impressed that you > figured out the prelude I was working on and wrote out two staves worth of > music! > You're quite welcome. It was a welcome change from the old time folk / Appalachian and Irish traditional I've been working with recently. > I think I did myself a disservice by calling what I want a "cue clef". > Yeah, that kinda threw me. I have a bad tendency to get too focused on an idea instead of stepping back to look at the wider view. Been trying to break myself of that. Still needs work. Ah well. > I believe what I want is a "change clef" -- it's bigger than a cue clef > but smaller than a regular clef. It's what you get when you engrave this > snippet: > > { c'4 4 4 4 | \clef bass 4 4 4 4 } > > ...or in markup: > > \markup \musicglyph "clefs.F_change" > Anyway, the good news here is I think I might have cracked it, with a bit of help from the LSR. But a different entry than you found - the one that seems to have gotten me there is https://lsr.di.unimi.it/LSR/Item?id=956 I've attached an updated version - the F clef at the beginning of the first measure is noticeably bigger than the original I posted yesterday. Yesterday's is on the left, the updated version on the right. [image: image.png] Short version - the magic ingredient seems to be a hidden grace note right at the beginning. -- Michael \version "2.24.2" \language "english" %%% Alternating time #(define ((time-alternate-time upa downa upb downb) grob) (grob-interpret-markup grob (markup #:override '(baseline-skip . 0) #:number (#:line ( (#:center-column (upa downa)) (#:center-column (upb downb))) \header { title = "Twenty-Four Préludes" composer = "Alexander Scriabin" } upperUpper = \relative { \key bf \minor \clef treble \partial 8 %% This technique courtesy of https://lsr.di.unimi.it/LSR/Item?id=956 %% Use a hidden grace note: \once\hideNotes\grace c64 %% Adjust the clef spacing: %\once\override Staff.Clef.X-extent = #'(1 . 2) %% Put in the clef: \clef F r8^\markup { \italic \small "sotto voce" } | bf'4.-- bf8.-- bf16-- | bf4.-- r8 | df4. df8. df16 | df4. r8 | f4.( f8) r8 | e4.( e8) \clef treble r8 | f4. r4 } upperLower = \relative { \key bf \minor \clef treble \partial 8 %% Use a hidden grace note: \once\hideNotes\grace c64 %% Adjust the clef spacing: %\once\override Staff.Clef.X-extent = #'(1 . 2) %% Put in the clef: \clef F \tuplet 3/2 { bf16( c16 ef16 } | bf'8[ af ef gf df] | f[ c df]) \tuplet 3/2 {bf16( df16 gf16 } | df'8[ c gf bf f] | gf[ ef df]) \tuplet 3/2 { df16( gf16 bf16 } | f'8[ ef bf df]) \tuplet 3/2 { c,16( gf'16 bf16 } | e8[ df bf c]) \clef treble \tuplet 3/2 { f,16( a16 df16 } | f8[ ef c df bf]) } lowerUpper = \relative { \key bf \minor \clef F \voiceOne \partial 8 \once\hideNotes\grace c64 r8 bf4.-- bf8.-- bf16-- | bf4.-- r8 | df4. df8. df16 | df4. r8 | f4.( f8) r8 | e4.( e8) r8 | f4. r4 } lowerLower = \relative { \key bf \minor \clef F \voiceTwo \partial 8 \once\hideNotes\grace c64 \tuplet 3/2 { bf,16(_\markup { \small "una corda" } c16 ef16 } | bf'8[ af ef gf df] | f[ c df)] \tuplet 3/2 { bf16( df16 gf16 } | df'8[ c gf bf f] | gf[ ef df]) \tuplet 3/2 { df16( gf16 bf16 } | f'8[ ef bf df)] \tuplet 3/2 { c,16( gf'16 bf16 } | ef8[ df bf c]) \tuplet 3/2 { f,16( a16 df16 } | f8[ ef c df bf]) } timeSignatures = { \override Score.TimeSignature.stencil = #(time-alternate-time "5" "8" "4" "8") \time 5/8 \partial 8 \once\hideNotes\grace s64 s8 \override Score.TimeSignature.stencil = ##f \time 5/8 s4. s4 | \time 4/8 s2 | \time 5/8
Re: Alternating time signature with cue clef
Hi Knute, On Tue, Sep 26, 2023 at 3:27 PM Knute Snortum wrote: > TL;DR > How do I engrave an alternating time signature and an initial cue clef? > > Scriabin has a prelude where he has written a time signature as > alternating 5/8 and 4/8 time. After the initial one, no other time > signatures are written. I have figured out a way to engrave this with help > from a LSR entry. > > Also, the first notes in the right hand are in bass clef. I want to > engrave the initial clef in the right hand as treble, then after the time > signature have a cue bass clef. Lukas-Fabian Moser wrote a solution for > that (thanks!) > > The problem is those two solutions don't work together. (Looking at them, > I can see why they wouldn't.) I am not clever enough to merge the two > solutions or think of a third. Can anyone help me? > > I've attached a screenshot of what I'm trying to engrave. Also attached > is my attempt to use the two solutions, but without success. > What about using a CueVoice, resetting sizes back to default? It seems to work both visually and listening to the midi produced. I've attached some code that engraves the first 7 measures of the Scriabin piece. Within the CueVoice I did have to explicitly set the slur, stem and articulation directions - apparently CueVoice either overrides or ignores voiceOne and voiceTwo settings in those regards. Quite likely there are better ways to go about this, but maybe this can at least get something going. -- Michael \version "2.24.2" \language "english" %%% Alternating time #(define ((time-alternate-time upa downa upb downb) grob) (grob-interpret-markup grob (markup #:override '(baseline-skip . 0) #:number (#:line ( (#:center-column (upa downa)) (#:center-column (upb downb))) \header { title = "Twenty-Four Préludes" composer = "Alexander Scriabin" } upperUpper = \relative { \key bf \minor \new CueVoice { \set fontSize = #0 \override Beam.length-fraction = #1 \override Stem.length-fraction = #1 \override Beam.beam-thickness = #0.48 \override Script.direction = #UP \cueClef "bass" \stemUp \slurUp \partial 8 r8^\markup { \italic \small "sotto voce" } | bf4.-- bf8.-- bf16-- | bf4.-- r8 | df4. df8. df16 | df4. r8 | f4.( f8) r8 | e4.( e8) \cueClefUnset } % End CueVoice r8 | f4. r4 } upperLower = \relative { \key bf \minor \new CueVoice { \set fontSize = #0 \override Beam.length-fraction = #1 \override Stem.length-fraction = #1 \override Beam.beam-thickness = #0.48 \override Script.direction = #DOWN \cueClef "bass" \stemDown \slurDown \partial 8 \tuplet 3/2 { bf,16( c16 ef16 } | bf'8[ af ef gf df] | f[ c df]) \tuplet 3/2 {bf16( df16 gf16 } | df'8[ c gf bf f] | gf[ ef df]) \tuplet 3/2 { df16( gf16 bf16 } | f'8[ ef bf df]) \tuplet 3/2 { c,16( gf'16 bf16 } | e8[ df bf c]) \cueClefUnset } % End CueVoice \tuplet 3/2 { f,16( a16 df16 } | f8[ ef c df bf]) } lowerUpper = \relative { \key bf \minor \clef bass \voiceOne \partial 8 r8 bf,4.-- bf8.-- bf16-- | bf4.-- r8 | df4. df8. df16 | df4. r8 | f4.( f8) r8 | e4.( e8) r8 | f4. r4 } lowerLower = \relative { \key bf \minor \clef bass \voiceTwo \partial 8 \tuplet 3/2 { bf,,16(_\markup { \small "una corda" } c16 ef16 } | bf'8[ af ef gf df] | f[ c df)] \tuplet 3/2 { bf16( df16 gf16 } | df'8[ c gf bf f] | gf[ ef df]) \tuplet 3/2 { df16( gf16 bf16 } | f'8[ ef bf df)] \tuplet 3/2 { c,16( gf'16 bf16 } | ef8[ df bf c]) \tuplet 3/2 { f,16( a16 df16 } | f8[ ef c df bf]) } timeSignatures = { \override Score.TimeSignature.stencil = #(time-alternate-time "5" "8" "4" "8") \time 5/8 \partial 8 s8 \override Score.TimeSignature.stencil = ##f \time 5/8 s4. s4 | \time 4/8 s2 | \time 5/8 s4. s4 | \time 4/8 s2 | \time 5/8 s4. s4 | \time 5/8 s4. s4 | \time 5/8 s4. s4 } dynamicMarks = { \override DynamicTextSpanner.style = #'none \partial 8 s8\p s4. s4 s2 s4. s4 s2 s8-\cresc s2 s4. s4 s8-\dim s2\! } \score { \new PianoStaff << \new Staff << \tempo \markup { Misterioso \rhythm { { 8 } } = 160-168 } \mergeDifferentlyHeadedOn \mergeDifferentlyDottedOn \new Voice = "upperUpper" { \relative { \voiceOne \upperUpper } } \new Voice = "upperLower" { \relative { \voiceTwo \upperLower } } >> \new Dynamics { \dynamicMarks } \new Staff << \mergeDifferentlyHeadedOn \mergeDifferentlyDottedOn \new Voice { \lowerUpper } \new Voice { \lowerLower } >> \new Devnull \timeSignatures >> \layout { } \midi { } }
Re: Empty Staff/TabStaff/StaffGroup creates indentation
Basically, this is https://gitlab.com/lilypond/lilypond/-/issues/4157 <https://gitlab.com/lilypond/lilypond/-/issues/4157> Thanks for looking into it. I just wanted to make sure it is either me being stupid or a bug/weirdness in LP. Since apparently it is known already that's fine with me. The problem is related to \RemoveAllEmptyStaves. In essence, horizontal spacing is computed as if the staves that are being removed were still present. If you comment out the \RemoveAllEmptyStaves line, you will see that the objects taking this space are the clefs and time signatures. FWIW my expectation would be that staves with no content at all have no impact whatsoever on the layout when I say \RemoveAllEmptyStaves. It's not clear from your example what the \guitarPart is for, I removed the content for the sake of simplicity. In my real world application I do add the content conditionally (or leave it out). Kind regards, Michael -- Michael Gerdau email: m...@qata.de GPG-keys available on request or at public keyserver
Re: custom replace/map of one set of pitches to another
Thank you Valentin for this solution and the following explanation why it is likely safer. All responses have been much appreciated. Best, Michael Sep 1, 2023, 00:15 by valen...@petzel.at: > Hi Michael, > > some time ago I created a function for exactly that for a stackexchange > question: > https://music.stackexchange.com/questions/127175/lilypond-transpose-a-sequence-to-modes-with-different-intervallic-structure > > Essentially it introduces a function to map one scale to another, and it does > so by basepitch to retain alteration. One could easily adapt this function to > match by base pitch and alteration: > > transposePitchClasses = > #(define-music-function (scaleA scaleB music) (ly:music? ly:music? ly:music?) > (let* ((scaleA (ly:music-property scaleA 'elements)) > (scaleB (ly:music-property scaleB 'elements)) > (scaleA (map (lambda (x) (ly:music-property x 'pitch)) scaleA)) > (scaleB (map (lambda (x) (ly:music-property x 'pitch)) scaleB)) > (classesA (map (lambda (p) (cons (ly:pitch-notename p) (ly:pitch- > alteration p))) scaleA))) > (map-some-music > (lambda (m) > (let ((p (ly:music-property m 'pitch))) > (if (not (null? p)) > (let* ((nn (ly:pitch-notename p)) > (oct (ly:pitch-octave p)) > (alt (ly:pitch-alteration p)) > (pos (list-index (lambda (x) (and (= (car x) nn) (= (cdr x) > alt))) classesA))) > (if pos > (let* ((p2 (list-ref scaleA pos)) > (oct2 (ly:pitch-octave p2)) > (p3 (list-ref scaleB pos)) > (new-pitch (ly:pitch-transpose p3 (ly:make-pitch (- > oct oct2) 0 > (ly:music-set-property! m 'pitch new-pitch))) > m) > #f))) > music) > music)) > > \transposePitchClasses {d fih g aih} {dih f gis a} > { c' cis' d' dis' f' fih' fis' g' a' aih' } > > Am Donnerstag, 31. August 2023, 12:53:26 CEST schrieb Michael Winter via > LilyPond user discussion: > >> I would like to do something (hopefully simple), which is basically a custom >> find and replace for a set of notes in an entire score. >> >> For example {c cis d dis fih g aih} -> {c cis dih dis f gis a} >> >> So basically on arbitrary list of pitches / scale to another. >> >> Is this possible without writing a custom function. If not, any hints on how >> to tackle the problem would be much appreciated. Thanks in advance. >> >> -Michael >>
Re: custom replace/map of one set of pitches to another
That is very helpful. Thank you. I will ping again if I have any further questions. Aug 31, 2023, 14:35 by l...@gmx.de: > Hi Michael, > > over time, I found that doing something like this in an engraver (as opposed > to a music function) is actually much easier and conceptually clear, in spite > of the seeming difficulty of the engraver syntax. The advantage of using an > engraver being that you see the "actual" pitches and don't have to fight with > problems of \relative, \transpose and so on. > > \version "2.24.0" > > pitch-replace-dictionary = > #(list > (cons #{ c #} #{ cis #}) > (cons #{ d #} #{ des #}) > ) > > #(define (pitch-class= p q) > (and > (= (ly:pitch-notename p) (ly:pitch-notename q)) > (= (ly:pitch-alteration p) (ly:pitch-alteration q > > Pitch_replace_engraver = > #(lambda (context) > (make-engraver > (listeners > ((note-event engraver event) > (let* > ((pitch (ly:event-property event 'pitch)) > (rule (assoc pitch pitch-replace-dictionary pitch-class=))) > > (if rule > (ly:event-set-property! > event 'pitch > (ly:make-pitch (ly:pitch-octave pitch) > (ly:pitch-notename (cdr rule)) > (ly:pitch-alteration (cdr rule)) > > \layout { > \context { > \Score > \consists #Pitch_replace_engraver > } > } > > \relative { > c'4 d e c8 8 > \transpose f c \relative { > f'4 g a > } > } > > This engraver can also be added to just a single score (\layout inside \score > {}) or even a single Staff or Voice. At the moment, the replacement > dictionary is global, but this could be changed if needed. > > At the moment the mechanism I chose is too crude to do replacements that > involve changing the pitch-octave (eg from c to b,). Do you need this? > > Lukas > > Am 31.08.23 um 12:53 schrieb Michael Winter via LilyPond user discussion: > >> I would like to do something (hopefully simple), which is basically a custom >> find and replace for a set of notes in an entire score. >> >> For example {c cis d dis fih g aih} -> {c cis dih dis f gis a} >> >> So basically on arbitrary list of pitches / scale to another. >> >> Is this possible without writing a custom function. If not, any hints on how >> to tackle the problem would be much appreciated. Thanks in advance. >> >> -Michael >>
Re: custom replace/map of one set of pitches to another
I am now realizing that it would be useful to have this both at the level of the entire score and individually for each part. Aug 31, 2023, 12:53 by mwin...@unboundedpress.org: > I would like to do something (hopefully simple), which is basically a custom > find and replace for a set of notes in an entire score. > > For example {c cis d dis fih g aih} -> {c cis dih dis f gis a} > > So basically on arbitrary list of pitches / scale to another. > > Is this possible without writing a custom function. If not, any hints on how > to tackle the problem would be much appreciated. Thanks in advance. > > -Michael >
custom replace/map of one set of pitches to another
I would like to do something (hopefully simple), which is basically a custom find and replace for a set of notes in an entire score. For example {c cis d dis fih g aih} -> {c cis dih dis f gis a} So basically on arbitrary list of pitches / scale to another. Is this possible without writing a custom function. If not, any hints on how to tackle the problem would be much appreciated. Thanks in advance. -Michael