Re: Last note of a first alternative is a tie to the first note in the repeat; how to engrave this?
Hi Hwaen and David; Thank you very much for your replies. It does solve the problem. I saw that command but, for some reason I did not think it applied to my situation. I will try to make a note of this so I don't ask this question again; I'll just have to consult my "gotcha" list. Ken On Wed, Jul 27, 2022 at 9:55 PM David Wright wrote: > > On Wed 27 Jul 2022 at 21:27:53 (-0700), Kenneth Wolcott wrote: > > > > I must be missing something obvious here. > > > > The last note of a first alternative is a tie to the first note in the > > repeat. > > > > Lilypond 2.22.2 complains: > > > > La_Bamba.ly:67:40: warning: unterminated tie > > r8 f'' f'' f'' f''4^. f''8^. e'' > >~ | % m26 > > > > Thanks in advance for pointing out what I missed in the documentation... > > Replace that tie with \laissezVibrer. It's on the second page of > Ties in NR, around p59 (I'm using 2.23 docs). It's the complement > of \repeatTie, and the difficulty with looking up these terms has > been commented on here quite recently. > > > My engraving, my Lilypond source and the 8notes.com's Brass Quartet > > arrangement of "La Bamba" are attached. > > > > The problem occurs at bar 26 in the first trumpet part. > > The 8notes's tie is far too long. > > Cheers, > David.
Re: Last note of a first alternative is a tie to the first note in the repeat; how to engrave this?
On Wed 27 Jul 2022 at 21:27:53 (-0700), Kenneth Wolcott wrote: > > I must be missing something obvious here. > > The last note of a first alternative is a tie to the first note in the > repeat. > > Lilypond 2.22.2 complains: > > La_Bamba.ly:67:40: warning: unterminated tie > r8 f'' f'' f'' f''4^. f''8^. e'' >~ | % m26 > > Thanks in advance for pointing out what I missed in the documentation... Replace that tie with \laissezVibrer. It's on the second page of Ties in NR, around p59 (I'm using 2.23 docs). It's the complement of \repeatTie, and the difficulty with looking up these terms has been commented on here quite recently. > My engraving, my Lilypond source and the 8notes.com's Brass Quartet > arrangement of "La Bamba" are attached. > > The problem occurs at bar 26 in the first trumpet part. The 8notes's tie is far too long. Cheers, David.
Re: Last note of a first alternative is a tie to the first note in the repeat; how to engrave this?
Greetings Ken, I wonder if this isn't a place for \laissezVibrer Hwaen Ch'uqi On 7/28/22, Kenneth Wolcott wrote: > Hi; > > I must be missing something obvious here. > > The last note of a first alternative is a tie to the first note in the > repeat. > > Lilypond 2.22.2 complains: > > La_Bamba.ly:67:40: warning: unterminated tie > r8 f'' f'' f'' f''4^. f''8^. e'' >~ | % m26 > > Thanks in advance for pointing out what I missed in the documentation... > > My engraving, my Lilypond source and the 8notes.com's Brass Quartet > arrangement of "La Bamba" are attached. > > The problem occurs at bar 26 in the first trumpet part. > > Thanks, > Ken Wolcott >
Re: slurs across voices
Hi William and Knute, Thanks for your suggestions. It's nice to have two options. I like Knute's since I'm not very knowledgable about the engraver functions, which are a black box to me, while the method Knute proposes is easily understandable and only requires tweaking the measure in question. best regards, Jim On Wed, 27 Jul 2022, William Rehwinkel wrote: Hey Jim, A little while ago I found this email which describes enabling the slur engraver on the staff level instead of voice level. Did you see this before, or give it a try? https://lists.gnu.org/archive/html/bug-lilypond/2012-03/msg00663.html \version "2.15.33" \score { \new Staff { \time 2/4 << \new Voice { \relative c'' { \voiceOne d16( c8. a16( g8. } } \new Voice { \relative c'' { \voiceTwo g8 g') c,,8 c'8) } } >> } \layout { \context { \Voice \remove "Slur_engraver" \remove "Slur_performer" } \context { \Staff \consists "Slur_engraver" \consists "Slur_performer" } } } On 7/27/22 11:28, Jim Cline wrote: I would like to create slurs between alternating notes across two voices in this example: \version "2.20.0" lower = \relative c { \time 3/4 \clef bass <<{\stemUp e''16\rest cis4 bis ais8~ais16}\\{\clef treble\stemDown \slurDown e4 dis cis}>>| } \score { \new Staff = "lower" \lower The documentation provides an example in http://lilypond.org/doc/v2.21/Documentation/snippets/expressive-marks ("creating slurs across voices") but it only works in the case where beats are missing in each voice. In my case, each voice has the full number of beats to make a measure. It seems like this issue was last discussed in 2015, https://lists.gnu.org/archive/html/lilypond-devel/2015-03/msg00288.html unless I missed something. Has this limitation been addressed since then? regards, Jim -- William Rehwinkel will...@williamrehwinkel.net https://williamrehwinkel.net
Re: slurs across voices
Hey Jim, A little while ago I found this email which describes enabling the slur engraver on the staff level instead of voice level. Did you see this before, or give it a try? https://lists.gnu.org/archive/html/bug-lilypond/2012-03/msg00663.html \version "2.15.33" \score { \new Staff { \time 2/4 << \new Voice { \relative c'' { \voiceOne d16( c8. a16( g8. } } \new Voice { \relative c'' { \voiceTwo g8 g') c,,8 c'8) } } >> } \layout { \context { \Voice \remove "Slur_engraver" \remove "Slur_performer" } \context { \Staff \consists "Slur_engraver" \consists "Slur_performer" } } } On 7/27/22 11:28, Jim Cline wrote: I would like to create slurs between alternating notes across two voices in this example: \version "2.20.0" lower = \relative c { \time 3/4 \clef bass <<{\stemUp e''16\rest cis4 bis ais8~ais16}\\{\clef treble\stemDown \slurDown e4 dis cis}>>| } \score { \new Staff = "lower" \lower The documentation provides an example in http://lilypond.org/doc/v2.21/Documentation/snippets/expressive-marks ("creating slurs across voices") but it only works in the case where beats are missing in each voice. In my case, each voice has the full number of beats to make a measure. It seems like this issue was last discussed in 2015, https://lists.gnu.org/archive/html/lilypond-devel/2015-03/msg00288.html unless I missed something. Has this limitation been addressed since then? regards, Jim -- William Rehwinkel will...@williamrehwinkel.net https://williamrehwinkel.net
Re: slurs across voices
On Wed, Jul 27, 2022 at 8:29 AM Jim Cline wrote: > > I would like to create slurs between alternating notes across two voices > in this example: > > \version "2.20.0" > lower = >\relative c { > \time 3/4 >\clef bass ><<{\stemUp e''16\rest cis4 bis ais8~ais16}\\{\clef treble\stemDown > \slurDown e4 dis cis}>>| > } > \score { > \new Staff = "lower" \lower > > The documentation provides an example in > http://lilypond.org/doc/v2.21/Documentation/snippets/expressive-marks > ("creating slurs across voices") but it only works in the case where beats > are missing in each voice. In my case, each voice has the full number of > beats to make a measure. It seems like this issue was last discussed in > 2015, > https://lists.gnu.org/archive/html/lilypond-devel/2015-03/msg00288.html > unless I missed something. Has this limitation been addressed since then? Well, here's my take on it. There may be a better way: First, I made your example into a MWE (minimum working example). Then I used the trick of reducing the duration of a note but keeping the duration that's engraved. I used 4*1/4 for a note that looks like a quarter note but only takes up the duration of a sixteenth. That gave me this: %%% \version "2.20.0" \relative c { \time 3/4 << { e''16\rest cis4 bis ais8~ais16 } \\ { e4*1/4( \once \hideNotes cis'4*3/4) dis,4*1/4( \once \hideNotes bis'4*3/4) cis,4*1/4( \once \hideNotes ais'4*3/4) } >>| } %%% -- Knute Snortum
slurs across voices
I would like to create slurs between alternating notes across two voices in this example: \version "2.20.0" lower = \relative c { \time 3/4 \clef bass <<{\stemUp e''16\rest cis4 bis ais8~ais16}\\{\clef treble\stemDown \slurDown e4 dis cis}>>| } \score { \new Staff = "lower" \lower The documentation provides an example in http://lilypond.org/doc/v2.21/Documentation/snippets/expressive-marks ("creating slurs across voices") but it only works in the case where beats are missing in each voice. In my case, each voice has the full number of beats to make a measure. It seems like this issue was last discussed in 2015, https://lists.gnu.org/archive/html/lilypond-devel/2015-03/msg00288.html unless I missed something. Has this limitation been addressed since then? regards, Jim
Re: Ties between voices
> Le 27 juil. 2022 à 10:41, Thomas Morley a écrit : > > Am Di., 26. Juli 2022 um 11:48 Uhr schrieb Thomas Morley > : >> >>> Am Sa., 23. Juli 2022 um 19:15 Uhr schrieb Jean Abou Samra >>> : >>> >>> >>> >>> Le 23/07/2022 à 12:49, Lukas-Fabian Moser a écrit : Hi Andrew, Am 23.07.22 um 03:49 schrieb Andrew Bernard: > I know that we can't natively make ties between notes in different > voices. I know that there was a Google Summer of Code task that could > not be completed. A few weeks ago, I sent you the following privately (I was too timid to post in on the list): My idea was to \consist the Tie_engraver to the Staff context not _instead_ of to the Voice context, but _in addition_. Then we have two Tie engravers and need a mechanism by which to tell if a given tie should be collected by the Voice-level Tie_engraver or at Staff level (in order to connect ties between different voices). During my experiments I re-implemented the Tie_engraver in Scheme; although it turned out that (contrary to my expectations) the necessary adjustments could just as easily have been made in C++, the advantage is that we can test this approach without the need to re-compile a custom LilyPond build. The attached file (requiring 2.23.6 and above) generates as easily as: \new Staff \with { \consists #New_tie_engraver } { << \relative { 4 c8 b a g~ 4 } \\ \relative { s4 c'2 e4 } >> } Of course the same mechanism might be implemented for, e.g., the Slur_engraver. But this requires additional work, as the slur positioning mechanism is not quite up to positioning Staff-level slurs correctly. The attached Scheme Tie_engraver may be used as a drop-in replacement for the standard C++ Tie_engraver; in my local branch, it compiles the full regression test suite without causing differences.) >>> >>> >>> >>> Interesting, Lukas! Now, this approach fails on cases where >>> ties are physically but not mentally interrupted, as pianists >>> sometimes encounter, like >>> >>> \version "2.23.10" >>> >>> \new Staff << >>> \relative { >>> <%{ tie this %} c' c'>2 >>> c'8 b a g >>> } >>> \\ >>> \relative { s2 %{ to this %} c'4 g } >>> \\ >>> \relative { g16 a c d e a g e f4 d } > >>> >>> but this might be rare enough that not catering for it >>> would be good enough? >> >> To make it visible, Jean's example, with Lukas' coding reads: >> >> \new Staff \with { \consists #New_tie_engraver } >> << >> \relative { >> <%{ tie this %} c'\to Staff ~ c'>2 >> c'8 b a g >> } >> \\ >> \relative { s2 %{ to this %} c'4 g } >> \\ >> \relative { g16 a c d e a g e f4 d } >> >> and gives the attached output. >> >> We probably need something like NoteColumn.tie-skip similar to >> 'glissando-skip. >> Though, why not something more general like 'spanner-skip for all >> spanners (usually) terminated at following NoteColumn? >> >> @Lukas >> You use hash-tables in your rewrite of the engraver. >> Does the C++-engraver do so? >> From a users point of view hash-tables are always inconvenient, imho. >> Is the performance advantage really as huge not to use more simple alists? >> >> Many thanks for your work! >> >> Cheers, >> Harm > > @ Jean > I've got your last mail off-list. By accident? Yes, sorry. To make it shorter, I was just saying that you could select the end note of the tie not as the first note with the right pitch that comes, but the first with the right pitch _and after the end of the tied note_, which would do the Right Thing automatically in the example being discussed. Also, on further thinking it’s probably a bad idea to let \to broadcast the event only in one context, as other engravers might need it as well (eg Accidental_engraver). Refining this idea, in the same fashion as the recently added "once" listener feature (which I just made available to Scheme, it existed in C++ for a long time), we could have (listeners ((event-class engraver event #:exclusive) …)) where #:exclusive means it’s not triggered if the engraver is not in the context adressed by \to (or some default context, probably specified in a property?). Cheers, Jean > @ Lukas > I have not yet understood all subtleties of your engraver code. > Though, as a proof of concept I implemented a possibility to select > and skip NoteHeads which should not be considered for ending a Tie. > See attachment. > > I stumbled across a certain condition. In tie-column::add_tie there is > (> (car (ly:grob-spanned-column-rank-interval tie-column)) > (car (ly:grob-spanned-column-rank-interval tie-column))) > How could this ever be true? > > Cheers, > Harm tie-engraver-02-skip.ly Description: Binary data
Re: Ties between voices
On 2022-07-27 1:41 am, Thomas Morley wrote: I stumbled across a certain condition. In tie-column::add_tie there is (> (car (ly:grob-spanned-column-rank-interval tie-column)) (car (ly:grob-spanned-column-rank-interval tie-column))) How could this ever be true? Looks to be a transcription error. The original C++ looks like this: if (!me->get_bound (LEFT) || (me->get_bound (LEFT)->get_column ()->get_rank () > tie->get_bound (LEFT)->get_column ()->get_rank ())) { me->set_bound (LEFT, Tie::head (tie, LEFT)); me->set_bound (RIGHT, Tie::head (tie, RIGHT)); } The relevant conditional check is regarding the "me" grob versus the "tie" grob. -- Aaron Hill
Re: Ties between voices
Am Di., 26. Juli 2022 um 11:48 Uhr schrieb Thomas Morley : > > Am Sa., 23. Juli 2022 um 19:15 Uhr schrieb Jean Abou Samra > : > > > > > > > > Le 23/07/2022 à 12:49, Lukas-Fabian Moser a écrit : > > > > > > Hi Andrew, > > > > > > Am 23.07.22 um 03:49 schrieb Andrew Bernard: > > >> I know that we can't natively make ties between notes in different > > >> voices. I know that there was a Google Summer of Code task that could > > >> not be completed. > > > > > > A few weeks ago, I sent you the following privately (I was too timid > > > to post in on the list): > > > > > > My idea was to \consist the Tie_engraver to the Staff context not > > > _instead_ of to the Voice context, but _in addition_. Then we have two > > > Tie engravers and need a mechanism by which to tell if a given tie > > > should be collected by the Voice-level Tie_engraver or at Staff level > > > (in order to connect ties between different voices). > > > > > > During my experiments I re-implemented the Tie_engraver in Scheme; > > > although it turned out that (contrary to my expectations) the > > > necessary adjustments could just as easily have been made in C++, the > > > advantage is that we can test this approach without the need to > > > re-compile a custom LilyPond build. > > > > > > The attached file (requiring 2.23.6 and above) generates > > > > > > > > > as easily as: > > > > > > \new Staff \with { \consists #New_tie_engraver } > > > { > > > << > > > \relative { > > > 4 c8 b a g~ 4 > > > } > > > \\ > > > \relative { > > > s4 c'2 e4 > > > } > > > >> > > > } > > > > > > Of course the same mechanism might be implemented for, e.g., the > > > Slur_engraver. But this requires additional work, as the slur > > > positioning mechanism is not quite up to positioning Staff-level slurs > > > correctly. > > > > > > The attached Scheme Tie_engraver may be used as a drop-in replacement > > > for the standard C++ Tie_engraver; in my local branch, it compiles the > > > full regression test suite without causing differences.) > > > > > > > > > > > Interesting, Lukas! Now, this approach fails on cases where > > ties are physically but not mentally interrupted, as pianists > > sometimes encounter, like > > > > \version "2.23.10" > > > > \new Staff << > >\relative { > > <%{ tie this %} c' c'>2 > > c'8 b a g > >} > >\\ > >\relative { s2 %{ to this %} c'4 g } > >\\ > >\relative { g16 a c d e a g e f4 d } > > >> > > > > but this might be rare enough that not catering for it > > would be good enough? > > To make it visible, Jean's example, with Lukas' coding reads: > > \new Staff \with { \consists #New_tie_engraver } > << >\relative { > <%{ tie this %} c'\to Staff ~ c'>2 > c'8 b a g >} >\\ >\relative { s2 %{ to this %} c'4 g } >\\ >\relative { g16 a c d e a g e f4 d } > >> > > and gives the attached output. > > We probably need something like NoteColumn.tie-skip similar to > 'glissando-skip. > Though, why not something more general like 'spanner-skip for all > spanners (usually) terminated at following NoteColumn? > > @Lukas > You use hash-tables in your rewrite of the engraver. > Does the C++-engraver do so? > From a users point of view hash-tables are always inconvenient, imho. > Is the performance advantage really as huge not to use more simple alists? > > Many thanks for your work! > > Cheers, > Harm @ Jean I've got your last mail off-list. By accident? @ Lukas I have not yet understood all subtleties of your engraver code. Though, as a proof of concept I implemented a possibility to select and skip NoteHeads which should not be considered for ending a Tie. See attachment. I stumbled across a certain condition. In tie-column::add_tie there is (> (car (ly:grob-spanned-column-rank-interval tie-column)) (car (ly:grob-spanned-column-rank-interval tie-column))) How could this ever be true? Cheers, Harm %% https://lists.gnu.org/archive/html/lilypond-user/2022-07/msg00353.html %% by Lukas-Fabian Moser %% Change-log Harm %% - drop support for guilev1 %% - exclude NoteHeads with details.tie-me set to #f %% - move some definitions out of engraver %% - reformating \version "2.23.9" % TODO: Rename variables for clarity % TODO: Turn re-implementations of C++ helper functions into exported callbacks #(define (hash-non-empty? hash-table) (positive? (hash-count (const #t) hash-table))) #(define (tie-column::add_tie tie-column tie) ;;; TODO: Make callback from C++ (when (not (grob::has-interface (ly:grob-parent tie Y) 'tie-column-interface)) (when (or (null? (ly:spanner-bound tie-column LEFT)) (> (car (ly:grob-spanned-column-rank-interval tie-column)) ; THINK: is this exactly equivalent to the C++ original? (car (ly:grob-spanned-column-rank-interval tie-column (ly:spanner-set-bound! tie-column LEFT (ly:spanner-bound tie LEFT))