Re: Ottava printing at beginning of system
Hello Harm, You’re right, I forgot a (begin ...) block. Seems like recalculating the stencil is not nescessary ... Then (member grob (cdr siblings)) is hardly shorter than (not (eq? grob (car siblings))), but requires to check against each entry in siblings, while the latter only needs to check against the first one (also you probably want memq for this one). Thing is: We DO know that grob is a member of siblings! About grob-original I suppose that you’re right. But if we are at that point you can omit (pair? siblings), as siblings will nescessarily be a non empty list. So I suppose the compact version should be #(define (my-callback grob) (let* ((orig (ly:grob-original grob)) (siblings (ly:spanner-broken-into orig))) (if (not (eq? grob (car siblings))) (ly:grob-set-property! grob 'text #f Cheers, Valentin Am Dienstag, 30. November 2021, 00:16:22 CET schrieb Thomas Morley: > Am Mo., 29. Nov. 2021 um 22:49 Uhr schrieb Valentin Petzel : > > Basically grob.after-line-breaking is a function that get’s called on grob > > after line breaks are determined and allows us to do tweaks related to > > line- breaking. So what this function does is: > > > > If the ottava bracket is broken we check if the grob is a broken part. > > This is done by getting all broken parts (the siblings) and checking if > > grob is the first of these (implying that it is the first part which we > > do not want to change) or not (in which case it is a broken part which we > > want to change). > > > > Then we we remove the text from these broken properties and recalculate > > the > > stencil (which will then be without text). > > > > Cheers, > > Valentin > > Well, actually you set 'stencil for the _first_ of siblings. > Simply delete that: > > #(define (my-callback grob) > (let* ( > ; have we been split? > (orig (ly:grob-original grob)) > ; if yes, get the split pieces (our siblings) > (siblings (if (ly:grob? orig) > (ly:spanner-broken-into orig) '() ))) > > (if (and (>= (length siblings) 2) > (not (eq? (car siblings) grob))) > (ly:grob-set-property! grob 'text #f > > Furthermore, I think ly:grob-original will always return a grob, thus > the check for it could be removed. > Probably a different if-condition may be cheaper (not sure about it, > though), making for: > > #(define (my-callback grob) > (let* ((orig (ly:grob-original grob)) > (siblings (ly:spanner-broken-into orig))) > (if (and (pair? siblings) (member grob (cdr siblings))) > (ly:grob-set-property! grob 'text #f > > > Cheers, > Harm signature.asc Description: This is a digitally signed message part.
Re: Ottava printing at beginning of system
Am Mo., 29. Nov. 2021 um 22:49 Uhr schrieb Valentin Petzel : > > Basically grob.after-line-breaking is a function that get’s called on grob > after line breaks are determined and allows us to do tweaks related to line- > breaking. So what this function does is: > > If the ottava bracket is broken we check if the grob is a broken part. This is > done by getting all broken parts (the siblings) and checking if grob is the > first of these (implying that it is the first part which we do not want to > change) or not (in which case it is a broken part which we want to change). > > Then we we remove the text from these broken properties and recalculate the > stencil (which will then be without text). > > Cheers, > Valentin Well, actually you set 'stencil for the _first_ of siblings. Simply delete that: #(define (my-callback grob) (let* ( ; have we been split? (orig (ly:grob-original grob)) ; if yes, get the split pieces (our siblings) (siblings (if (ly:grob? orig) (ly:spanner-broken-into orig) '() ))) (if (and (>= (length siblings) 2) (not (eq? (car siblings) grob))) (ly:grob-set-property! grob 'text #f Furthermore, I think ly:grob-original will always return a grob, thus the check for it could be removed. Probably a different if-condition may be cheaper (not sure about it, though), making for: #(define (my-callback grob) (let* ((orig (ly:grob-original grob)) (siblings (ly:spanner-broken-into orig))) (if (and (pair? siblings) (member grob (cdr siblings))) (ly:grob-set-property! grob 'text #f Cheers, Harm
Re: \chordmode question
Hello Valentin Yes, that does the trick, thanks a lot! JM > Le 29 nov. 2021 à 19:42, Valentin Petzel a écrit : > > Hello Jacques, > > Does this do the trick? > > \new ChordNames \chordmode { > \language "nederlands" > \key f \major > \numericTimeSignature \time 6/8 > > \clef "treble" > f4.:5.3 d:m | % 1 > \barNumberCheck #2 > | % 2 > \barNumberCheck #2 > > \once\override ChordName.text = "%" > \parenthesize d2.:m | % 2 HERE > > d2.:m | % 1 > \barNumberCheck #4 > | % 1 > \barNumberCheck #4 > } > > > Cheers, > Valentin > > Am Montag, 29. November 2021, 16:21:08 CET schrieb Jacques Menu: >> Hello Folks, >> >> I’d like to have the Dm in measure 2 displayed as ‘%’. Is that possible? >> Thanks! >> >> JM >> >> — >> >> Part_POne_HARMONIES_Staff_Voice_Eleven_HARMONIES = \chordmode { >> \language "nederlands" >> \key f \major >> \numericTimeSignature \time 6/8 >> >> \clef "treble" >> f4.:5.3 d:m | % 1 >> \barNumberCheck #2 >> >> | % 2 >> >> \barNumberCheck #2 >> >> \parenthesize d2.:m | % 2 HERE >> >> d2.:m | % 1 >> \barNumberCheck #4 >> >> | % 1 >> >> \barNumberCheck #4 >> }
Re: Ottava printing at beginning of system
Basically grob.after-line-breaking is a function that get’s called on grob after line breaks are determined and allows us to do tweaks related to line- breaking. So what this function does is: If the ottava bracket is broken we check if the grob is a broken part. This is done by getting all broken parts (the siblings) and checking if grob is the first of these (implying that it is the first part which we do not want to change) or not (in which case it is a broken part which we want to change). Then we we remove the text from these broken properties and recalculate the stencil (which will then be without text). Cheers, Valentin Am Montag, 29. November 2021, 22:20:18 CET schrieb Molly Preston: > That worked! Thank you so much! I've used lilypond for a long time but have > never had to use any super advanced tweaks. So all the scheme code is > confusing to me, but maybe I should learn more about it. > > Thank you so much Valentin! > > -Molly > > On Mon, Nov 29, 2021 at 3:32 PM Valentin Petzel wrote: > > Hello Molly, > > > > Try the appended method using after line breaking (slight modification > > from > > https://lilypond.org/doc/v2.21/Documentation/extending/difficult-tweaks). > > As > > of now OttavaBracket has no property for continuation text. > > > > Cheers, > > Valentin > > > > Am Montag, 29. November 2021, 20:53:09 CET schrieb Molly Preston: > > > Hi everyone! > > > I'm wondering if anyone has a solution for this. I can't find one in the > > > manuals. > > > Is there a way to get it to not print that 8va on the second line, but > > > > just > > > > > continue it with a dashed line? > > > > > > \version "2.22.1" > > > > > > \score { > > > > > > \new Staff { > > > \set Staff.ottavationMarkups = #ottavation-ordinals > > > > > > \ottava #1 > > > > > > c''' 4 d''' e f > > > \break > > > d''' f g a > > > > > >} > > > > > > } > > > > > > -Molly signature.asc Description: This is a digitally signed message part.
Re: Ottava printing at beginning of system
That worked! Thank you so much! I've used lilypond for a long time but have never had to use any super advanced tweaks. So all the scheme code is confusing to me, but maybe I should learn more about it. Thank you so much Valentin! -Molly On Mon, Nov 29, 2021 at 3:32 PM Valentin Petzel wrote: > Hello Molly, > > Try the appended method using after line breaking (slight modification > from > https://lilypond.org/doc/v2.21/Documentation/extending/difficult-tweaks). > As > of now OttavaBracket has no property for continuation text. > > Cheers, > Valentin > > Am Montag, 29. November 2021, 20:53:09 CET schrieb Molly Preston: > > Hi everyone! > > I'm wondering if anyone has a solution for this. I can't find one in the > > manuals. > > Is there a way to get it to not print that 8va on the second line, but > just > > continue it with a dashed line? > > > > \version "2.22.1" > > > > \score { > > > > \new Staff { > > \set Staff.ottavationMarkups = #ottavation-ordinals > > \ottava #1 > > c''' 4 d''' e f > > \break > > d''' f g a > > > >} > > } > > > > -Molly
Re: Ottava printing at beginning of system
Hello Molly, Try the appended method using after line breaking (slight modification from https://lilypond.org/doc/v2.21/Documentation/extending/difficult-tweaks). As of now OttavaBracket has no property for continuation text. Cheers, Valentin Am Montag, 29. November 2021, 20:53:09 CET schrieb Molly Preston: > Hi everyone! > I'm wondering if anyone has a solution for this. I can't find one in the > manuals. > Is there a way to get it to not print that 8va on the second line, but just > continue it with a dashed line? > > \version "2.22.1" > > \score { > > \new Staff { > \set Staff.ottavationMarkups = #ottavation-ordinals > \ottava #1 > c''' 4 d''' e f > \break > d''' f g a > >} > } > > -Molly\version "2.22.1" #(define (my-callback grob) (let* ( ; have we been split? (orig (ly:grob-original grob)) ; if yes, get the split pieces (our siblings) (siblings (if (ly:grob? orig) (ly:spanner-broken-into orig) '() ))) (if (and (>= (length siblings) 2) (not (eq? (car siblings) grob))) (ly:grob-set-property! grob 'text #f) (ly:grob-set-property! grob 'stencil (ly:ottava-bracket::print grob) \score { \new Staff { \set Staff.ottavationMarkups = #ottavation-ordinals \override Staff.OttavaBracket.after-line-breaking = #my-callback \ottava #1 c''' 4 d''' e f \break d''' f g a \break d''' f''' g''' a''' } } signature.asc Description: This is a digitally signed message part.
Ottava printing at beginning of system
Hi everyone! I'm wondering if anyone has a solution for this. I can't find one in the manuals. Is there a way to get it to not print that 8va on the second line, but just continue it with a dashed line? \version "2.22.1" \score { \new Staff { \set Staff.ottavationMarkups = #ottavation-ordinals \ottava #1 c''' 4 d''' e f \break d''' f g a } } -Molly
Re: acciaccatura "slurs" are getting canceled with hide Slur
Hi Adam, hide overrides the specified grobs to be transparent (they will still affect spacing!) One option would be doing something like the appended example, which overrides appoggiatura to tweak the slur to that transparent is #f. A better way would be the use \omit Slur, which sets Slur.stencil to #f (and thus prevents any graphics to be created). In that case appoggiatura needs to tweak the stencil back to ly:slur::print. Cheers, Valentin Am Montag, 29. November 2021, 19:55:13 CET schrieb Adam Good: > Hi Everyone, > Could someone help me please. Using... > > \hide Slur > > ...I would like to cancel my slur markings yet retain the small slur in my > acciaccatura. On a bit of a deadline and would appreciate any help! > > Thank you in advance. > Adam > > %%% > \relative c' { > c8 (d e f) g (a b c) > \acciaccatura d8 c4 > } > > \layout { > \context { \Score \remove "Bar_number_engraver" %\hide Slur > } > } > > %%% > \relative c' { > c8 (d e f) g (a b c) > \acciaccatura d8 c4 > } > > \layout { > \context { \Score \remove "Bar_number_engraver" \hide Slur > } > }appoggiatura = #(define-music-function (music) (ly:music?) #{ \grace { \temporary\override Stem.direction = #UP <>_\tweak transparent ##f _\tweak stencil #ly:slur::print _( #music \revert Stem.direction } <>) #}) {\hide Slur c''( d'') \appoggiatura c'' d'' } {\omit Slur c''( d'') \appoggiatura c'' d'' } signature.asc Description: This is a digitally signed message part.
acciaccatura "slurs" are getting canceled with hide Slur
Hi Everyone, Could someone help me please. Using... \hide Slur ...I would like to cancel my slur markings yet retain the small slur in my acciaccatura. On a bit of a deadline and would appreciate any help! Thank you in advance. Adam %%% \relative c' { c8 (d e f) g (a b c) \acciaccatura d8 c4 } \layout { \context { \Score \remove "Bar_number_engraver" %\hide Slur } } %%% \relative c' { c8 (d e f) g (a b c) \acciaccatura d8 c4 } \layout { \context { \Score \remove "Bar_number_engraver" \hide Slur } }
Re: \chordmode question
Hello Jacques, Does this do the trick? \new ChordNames \chordmode { \language "nederlands" \key f \major \numericTimeSignature \time 6/8 \clef "treble" f4.:5.3 d:m | % 1 \barNumberCheck #2 | % 2 \barNumberCheck #2 \once\override ChordName.text = "%" \parenthesize d2.:m | % 2 HERE d2.:m | % 1 \barNumberCheck #4 | % 1 \barNumberCheck #4 } Cheers, Valentin Am Montag, 29. November 2021, 16:21:08 CET schrieb Jacques Menu: > Hello Folks, > > I’d like to have the Dm in measure 2 displayed as ‘%’. Is that possible? > Thanks! > > JM > > — > > Part_POne_HARMONIES_Staff_Voice_Eleven_HARMONIES = \chordmode { > \language "nederlands" > \key f \major > \numericTimeSignature \time 6/8 > > \clef "treble" > f4.:5.3 d:m | % 1 > \barNumberCheck #2 > > | % 2 > > \barNumberCheck #2 > > \parenthesize d2.:m | % 2 HERE > > d2.:m | % 1 > \barNumberCheck #4 > > | % 1 > > \barNumberCheck #4 > } signature.asc Description: This is a digitally signed message part.
Re: UTF-8 unicode use in \markup
Thank you very much. Helpful information. Sent from my iPhone > On Nov 28, 2021, at 7:39 PM, Valentin Petzel wrote: > > Just for clarification: > > 00a7 is not a special code, but a hexadecimal number. Basically any unicode > char is linked with a number, and the „code” is just this number in > hexadecimal digits. > > U+ is just a way to specify that a hexadecimal number stands for a > unicode > char. In our case that function is taken by char. #xSOMETHING is just a guile > way of entering numbers as hexadecimal. So instead of ##x00a7 you can also do > ##xa7 as well as simply 167 (which is the decimal numeric value for hex A7). > > Thus char basically takes a number and gives us that unicode character. > > Cheers, > Valentin > > Am Montag, 29. November 2021, 01:27:37 CET schrieb ming tsang: >> Hi Valentin Petzel, >> Thank you for your reply. I found a >> UTF-8 encoding table and Unicode characters >> https://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=0x >> Now I can look up the U+00a7 and then use \markup { \char ##x00a7 ) to >> display it. >> for \char I cannot use unicode U+00a7. I was hoping \char could accept >> U+00a7. Now I can use ##x00a7. >> Thank you for your info. >> Shalom, >> yMing. >> >>> On Sun, Nov 28, 2021 at 5:16 PM Valentin Petzel wrote: >>> Hello Ming, >>> >>> I do not understand your exact problem. If you want to have € in markup >>> you >>> can either directly put € in the markup, or use \char ##20ac. >>> >>> Valentin >>> >>> Am Sonntag, 28. November 2021, 22:42:47 CET schrieb ming tsang: Hi lilyponder, I would like to use \markup to display € using U+20AC. I can use >>> >>> \markup >>> { \char ##x2197 } to display / print / output to pdf. ##x2197 is [image: image.png] Your help is appreciated. Shalom, yMing
Re: Problems with trill spanner length
Hi, without more context I can't say which combo of tweaks will work for you but here are some options: { ees1 -\tweak to-barline ##t \startTrillSpan \time 3/4 d2 -\tweak bound-details.right.padding #1 -\tweak springs-and-rods #ly:spanner::set-spacing-rods -\tweak minimum-length #8 \startTrillSpan d4\startTrillSpan \stopTrillSpan } HTH, Dimitris On Mon, Nov 29, 2021 at 6:24 PM Lib Lists wrote: > Hi, > I have two problems related to the trill spanner length. > > \version "2.22.1" > { > ees1\startTrillSpan > \time 3/4 > d2\startTrillSpan d4\startTrillSpan \stopTrillSpan > } > > First bar: according to Gould (p. 136) the trill line should stop at > the barline. Is there a way to achieve this? > Second bar: the tril lines overlap. If I remove the time signature > change (\time 3/4), the trill lines are not aligned and I'd wish to > have them on the same line. > > Thank you in advance for any help. > > Cheers, > Lib > >
Problems with trill spanner length
Hi, I have two problems related to the trill spanner length. \version "2.22.1" { ees1\startTrillSpan \time 3/4 d2\startTrillSpan d4\startTrillSpan \stopTrillSpan } First bar: according to Gould (p. 136) the trill line should stop at the barline. Is there a way to achieve this? Second bar: the tril lines overlap. If I remove the time signature change (\time 3/4), the trill lines are not aligned and I'd wish to have them on the same line. Thank you in advance for any help. Cheers, Lib
\chordmode question
Hello Folks, I’d like to have the Dm in measure 2 displayed as ‘%’. Is that possible? Thanks! JM — Part_POne_HARMONIES_Staff_Voice_Eleven_HARMONIES = \chordmode { \language "nederlands" \key f \major \numericTimeSignature \time 6/8 \clef "treble" f4.:5.3 d:m | % 1 \barNumberCheck #2 | % 2 \barNumberCheck #2 \parenthesize d2.:m | % 2 HERE d2.:m | % 1 \barNumberCheck #4 | % 1 \barNumberCheck #4 }
Re: Header inside the score context
On Mon, Nov 29, 2021 at 5:59 AM David Wright wrote: > On Wed 24 Nov 2021 at 19:44:59 (+0100), Paolo Prete wrote: > > > > If you do this regularly, I would suggest that that's just > what you do, copy your source through a simple filter to a > temporary file and compile that. > > [cut] Hello David, Your tip about a filter is an *excellent* idea and, I think, the only proper way to manage this task for *many* reasons. I'm adding it to my editor right now (a new release will follow ASAP). Thanks sincerely for your help! Cheers, Paolo > >
Re: da capo and MIDI
Am 29.11.21 um 02:44 schrieb Kees van den Doel: Is there a way to get correct MIDI when using \repeat volta and \unfoldrepeats with a DC al fine? I.e., make the MIDI stop at the "fine" second time through. There’s no automatical solution, you must split your score into variables and put them together as you need them, in different blocks for PDF and MIDI. Hraban