Re: Ties between voices
> Le 3 juin 2022 à 20:09, Andrew Bernard a écrit : > > I've been away from LilyPond for a long time. Can we now make ties and > or/slurs between notes in different voices? I can't seem to find any > documentation on this. See the recent thread https://lists.gnu.org/archive/html/lilypond-devel/2022-05/msg00175.html Jean
Re: Ties between voices
Thanks Jean, I recall this now. A pity this hit a brick wall. In my scores I need it a lot. Dorico does it with ease, so I am going to have to go back to that. Sigh. Jean Abou Samra wrote on 4/06/2022 5:49 AM: See the recent thread https://lists.gnu.org/archive/html/lilypond-devel/2022-05/msg00175.html
Re: Ties between voices
Complete coincidence. Andrew Kevin Cole wrote on 4/06/2022 4:28 AM: On Fri, Jun 3, 2022 at 2:10 PM Andrew Bernard mailto:andrew.bern...@mailbox.org>> wrote: I've been away from LilyPond for a long time. Can we now make ties and or/slurs between notes in different voices? I can't seem to find any documentation on this. Was this prompted by my thread from 21 hours ago? Or did you just coincidentally find a need to do the same thing? (Or am I completely misunderstanding your question? Probably the most likely answer.)
Re: ties between voices
On Mon, 29 Jun 2020 at 21:37, David Zelinsky wrote: > > I've done some reasonably complicated things in Lilypond, but still have > lots to learn. My current conundrum is to typeset the attached snippet. > I can't figure out how to get the tie between the G's, without breaking > the double stops in the first measure into two separate voices, and so > breaking their stems. Can someone show me how to do this? > > It may be debatable whether it should be notated this way. I think it > should. (It's from the Glière cello duos, op. 53.) But my question is > how to do it, assuming this is desired result. Hi David, I would probably write it this way, but there are other possibilities (maybe start the voiceOne already on the second beat of the first measure). \relative c' { \key g \major 8.( 16) 2^( 4 | << { \voiceOne g'4 f) } \new Voice = "voiceTwo" { \voiceTwo a,2 } >> \oneVoice c4( d) | } Cheers, Xavier -- Xavier Scheuer
Re: ties between voices
David Zelinsky writes: > I've done some reasonably complicated things in Lilypond, but still have > lots to learn. My current conundrum is to typeset the attached snippet. > I can't figure out how to get the tie between the G's, without breaking > the double stops in the first measure into two separate voices, and so > breaking their stems. Can someone show me how to do this? > > It may be debatable whether it should be notated this way. I think it > should. (It's from the Glière cello duos, op. 53.) But my question is > how to do it, assuming this is desired result. > > If it matters, I'm using version 2.20. Just keep most stuff in the main voice, like \fixed c' \new Voice = "main" { \key g \major 8.( 16) \voiceOne 2\( 4~ | \voices "main", 2 << { g4 f\) } \\ a,2 >> \oneVoice c4( d) } -- David Kastrup
Re: ties between voices
Sorry, forgot the list... Lukas-Fabian Moser schrieb am Mo., 29. Juni 2020, 22:08: > Hi David, > > I can't figure out how to get the tie between the G's, without breaking >> the double stops in the first measure into two separate voices, and so >> breaking their stems. Can someone show me how to do this? >> > > \version "2.20" > > \relative { > \key g \major > \omit Staff.TimeSignature > 8.( 16) 2^( 4~ > \voices "",2 << { g f) } \\ a,2 >> c4( d) > } > > [image: grafik.png] > > > >> It may be debatable whether it should be notated this way. I think it >> should. (It's from the Glière cello duos, op. 53.) But my question is >> how to do it, assuming this is desired result. >> > > No, I'd say this is a perfectly standard way of notating music for > instruments that _can_ do polyphony. Piano pieces (e.g. by Schumann) are > full of examples like these, and one might say that this is not the area > where LilyPond particularly shines: It often involves trickery with hidden > duplicated notes etc. But in this case, it works relatively straightforward. > > If it matters, I'm using version 2.20. >> > > The command \voices I am using above was added by David Kastrup during the > 2.19.xx cylce. It's also possible to avoid it using 2.18.2 constructs: you > only have to refrain from using the \\ shortcut (because this creates named > voices and makes it impossible to continue the main voice): > > \version "2.18.2" > > \relative { > \key g \major > \omit Staff.TimeSignature > 8.( 16) 2^( 4~ > << { g f) } \new Voice { \voiceTwo a,2 } >> c4( d) > } > > Lukas >
Re: ties between voices
Le lun. 29 juin 2020 à 22:31, David Kastrup a écrit : > > Just keep most stuff in the main voice, like > ... > \voices "main", 2 << { g4 f\) } \\ a,2 >> ... WTF??? 'just discovered that \voices is in the 2.20 learning manual... One word: bravo. Cheers, Pierre
Re: ties between voices
Pierre Perol-Schneider writes: > Le lun. 29 juin 2020 à 22:31, David Kastrup a écrit : > >> >> Just keep most stuff in the main voice, like >> > ... > >> \voices "main", 2 << { g4 f\) } \\ a,2 >> > > ... > WTF??? > 'just discovered that \voices is in the 2.20 learning manual... > One word: bravo. The actual commits are not all that much material: commit 4244c3a9fbf1f3ff2e20e665f92516d35b61de53 Author: David Kastrup Date: Mon Apr 3 00:25:10 2017 +0200 Issue 5114/4: Document \voices Documentation/learning/fundamental.itely | 65 ++--- Documentation/notation/simultaneous.itely | 22 ++ 2 files changed, 80 insertions(+), 7 deletions(-) commit 93be41a1622bc33a01719d1d75af3dca40d75354 Author: David Kastrup Date: Sun Apr 2 17:52:28 2017 +0200 Issue 5114/3: Add regtest for \voices input/regression/voices-command.ly | 19 +++ 1 file changed, 19 insertions(+) commit 40dc095e51ecfe198b9209e2a1612d44325a4bfb Author: David Kastrup Date: Sat Apr 1 13:25:57 2017 +0200 Issue 5114/2: Add a \voices command ly/music-functions-init.ly | 22 ++ 1 file changed, 22 insertions(+) commit 13165dec9fb20fdeef2612b0d0c8276584cc9d15 Author: David Kastrup Date: Sat Apr 1 11:52:10 2017 +0200 Issue 5114/1: Let voicify-music receive an optional id list scm/music-functions.scm | 90 +- 1 file changed, 61 insertions(+), 29 deletions(-) Of course, there is considerable groundwork to make this a reasonably simple addition of a music function, and there were a lot of discussions on the mailing list. The principal shortcoming that this feature was supposed to address is the ability to specify more than 2 voices in top-down manner, and that basically now means \voices 1,3,4,2 << \soprano \\ \alto \\ \tenor \\ \bass >> which is ugly enough as it is but better than the previous << \soprano \\ \bass \\ \alto \\ \tenor >> particularly because the latter makes even more of a mess of \relative mode than you already have. And we couldn't agree on changing the numbering used for << ...\\...\\... ...>>, so making it easy to override it seemed like the next best thing. I like the results well enough that I advertise their use where I feel they make sense. -- David Kastrup
Re: ties between voices
On 2020-06-29 2:17 pm, David Kastrup wrote: \voices 1,3,4,2 << \soprano \\ \alto \\ \tenor \\ \bass >> which is ugly enough as it is [...] Does not seem that ugly to me, but I suppose one could encapsulate it via the ever-handy \etc: \version "2.20.0" soprano = { c''4 } alto = { a'4 } tenor = { fis'4 } bass = { d'4 } satb = \voices 1,3,4,2 \etc \satb << \soprano \\ \alto \\ \tenor \\ \bass >> -- Aaron Hill
Re: ties between voices
Aaron Hill writes: > On 2020-06-29 2:17 pm, David Kastrup wrote: >> \voices 1,3,4,2 << \soprano \\ \alto \\ \tenor \\ \bass >> >> which is ugly enough as it is [...] > > Does not seem that ugly to me, but I suppose one could encapsulate it > via the ever-handy \etc: > > > \version "2.20.0" > > soprano = { c''4 } > alto = { a'4 } > tenor = { fis'4 } > bass = { d'4 } > > satb = \voices 1,3,4,2 \etc > > \satb << \soprano \\ \alto \\ \tenor \\ \bass >> > Cute. I mean, for SATB one would likely use explicit voices anyway, but it's a nice shortcutlery nevertheless. -- David Kastrup
Re: ties between voices
On Mon, Jun 29, 2020 at 3:44 PM David Kastrup wrote: > > Aaron Hill writes: > > > On 2020-06-29 2:17 pm, David Kastrup wrote: > >> \voices 1,3,4,2 << \soprano \\ \alto \\ \tenor \\ \bass >> > >> which is ugly enough as it is [...] > > > > Does not seem that ugly to me, but I suppose one could encapsulate it > > via the ever-handy \etc: > > > > > > \version "2.20.0" > > > > soprano = { c''4 } > > alto = { a'4 } > > tenor = { fis'4 } > > bass = { d'4 } > > > > satb = \voices 1,3,4,2 \etc > > > > \satb << \soprano \\ \alto \\ \tenor \\ \bass >> > > > > Cute. I mean, for SATB one would likely use explicit voices anyway, but > it's a nice shortcutlery nevertheless. > David, This notation will greatly simplify some of the choral music I set in the past year. I forgot about the discussion on the lists, and so didn't use it even though it was available. Thanks for making it work Aaron, I think this is a useful enough wrapper that it should be in the NR (and/or the LM). I would most likely use it just in sa or tb, since those are the voices that usually share a staff. This notation might actually reduce my use of \partcombine. I'll have to try it out. Thanks! Carl
Re: ties between voices
Carl Sorensen writes: > David, > > This notation will greatly simplify some of the choral music I set in > the past year. I forgot about the discussion on the lists, and so > didn't use it even though it was available. Thanks for making it work > > Aaron, > > I think this is a useful enough wrapper that it should be in the NR > (and/or the LM). I would most likely use it just in sa or tb, since > those are the voices that usually share a staff. This notation might > actually reduce my use of \partcombine. I'll have to try it out. My personal experience is that \partcombine is mainly useful for piano extracts (or to some degree partitura mashing): boiling down material without much of a view for voice relations. For choral music (and even polyphonic piano music) I tend to prefer fixed voice relations. -- David Kastrup
Re: ties between voices
David Zelinsky writes: > I've done some reasonably complicated things in Lilypond, but still have > lots to learn. My current conundrum is to typeset the attached snippet. > I can't figure out how to get the tie between the G's, without breaking > the double stops in the first measure into two separate voices, and so > breaking their stems. Can someone show me how to do this? Thanks to everone for all the responses! I now have at 3 or 4 different ways to do this! I had seen "\voices" in the manual, but it did not say anything about continuing phrasing or dynamics across voices. I fact it said it can't be done. But after seeing people's responses, I looked further and found where it explained this feature. So there seems to be an inconsistency in the manual. What's the best way to go about reporting/fixing this? -David
RE: ties between voices
David, Would you, or someone else, direct me to "\voices" in the manual. I might be using incorrect search terms. Thank you, Mark -Original Message- From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of David Zelinsky Sent: Tuesday, June 30, 2020 6:23 PM To: lilypond-user@gnu.org Subject: Re: ties between voices David Zelinsky writes: > I've done some reasonably complicated things in Lilypond, but still > have lots to learn. My current conundrum is to typeset the attached snippet. > I can't figure out how to get the tie between the G's, without > breaking the double stops in the first measure into two separate > voices, and so breaking their stems. Can someone show me how to do this? Thanks to everone for all the responses! I now have at 3 or 4 different ways to do this! I had seen "\voices" in the manual, but it did not say anything about continuing phrasing or dynamics across voices. I fact it said it can't be done. But after seeing people's responses, I looked further and found where it explained this feature. So there seems to be an inconsistency in the manual. What's the best way to go about reporting/fixing this? -David
Re: ties between voices
"Mark Stephen Mrotek" writes: > David Zelinsky writes: > >> I had seen "\voices" in the manual, but it did not say anything about >> continuing phrasing or dynamics across voices. I fact it said it can't be >> done. But after seeing people's responses, I looked further and found where >> it explained this feature. So there seems to be an inconsistency in the >> manual. What's the best way to go about reporting/fixing this? > > Would you, or someone else, direct me to "\voices" in the manual. > I might be using incorrect search terms. > Thank you, > > Mark Here's where it says "Lyrics and spanners (such as slurs, ties, hairpins, etc.) cannot be created *across* voices.": http://lilypond.org/doc/v2.20/Documentation/notation/multiple-voices#index-_005cvoices And here's where it says they can: http://lilypond.org/doc/v2.20/Documentation/notation/available-music-functions (Scroll down to "\voices".) -David
Re: ties between voices
On Tue, Jun 30, 2020 at 8:32 PM David Zelinsky wrote: > > Here's where it says "Lyrics and spanners (such as slurs, ties, > hairpins, etc.) cannot be created *across* voices.": > > http://lilypond.org/doc/v2.20/Documentation/notation/multiple-voices#index-_005cvoices > > And here's where it says they can: > > http://lilypond.org/doc/v2.20/Documentation/notation/available-music-functions > > (Scroll down to "\voices".) > > David, I think you misunderstood. The \voices command does not let slurs go across voices. Rather, it allows existing voices to go into the << \\ >> polyphony expression. Previously (and still, if you don't use the \voices command), << \\ >> created two temporary voices, neither one related to the voice containing the << \\ >> construct. With the \voices command (strictly speaking it's a music function, IIUC), the voices within the << \\ >> construct can be specified, such that the slurs/ties/etc. go between entities in the same voice, rather than trying to go between entities in different voices. HTH, Carl > -David >
RE: ties between voices
David, Thank you. Mark -Original Message- From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of David Zelinsky Sent: Tuesday, June 30, 2020 7:32 PM To: lilypond-user@gnu.org Subject: Re: ties between voices "Mark Stephen Mrotek" writes: > David Zelinsky writes: > >> I had seen "\voices" in the manual, but it did not say anything about >> continuing phrasing or dynamics across voices. I fact it said it >> can't be done. But after seeing people's responses, I looked further >> and found where it explained this feature. So there seems to be an >> inconsistency in the manual. What's the best way to go about reporting/fixing this? > > Would you, or someone else, direct me to "\voices" in the manual. > I might be using incorrect search terms. > Thank you, > > Mark Here's where it says "Lyrics and spanners (such as slurs, ties, hairpins, etc.) cannot be created *across* voices.": http://lilypond.org/doc/v2.20/Documentation/notation/multiple-voices#index-_ 005cvoices And here's where it says they can: http://lilypond.org/doc/v2.20/Documentation/notation/available-music-functio ns (Scroll down to "\voices".) -David
Re: ties between voices
Hi Mark, Here you go: http://lilypond.org/doc/v2.20/Documentation/learning/i_0027m-hearing-voices#index-voices-and-stem-directions I could not find the discussion David's referring to. Cheers, Pierre Le mer. 1 juil. 2020 à 03:59, Mark Stephen Mrotek a écrit : > David, > > Would you, or someone else, direct me to "\voices" in the manual. > I might be using incorrect search terms. > Thank you, > > Mark > > -Original Message- > From: lilypond-user > [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of > David Zelinsky > Sent: Tuesday, June 30, 2020 6:23 PM > To: lilypond-user@gnu.org > Subject: Re: ties between voices > > David Zelinsky writes: > > > I've done some reasonably complicated things in Lilypond, but still > > have lots to learn. My current conundrum is to typeset the attached > snippet. > > I can't figure out how to get the tie between the G's, without > > breaking the double stops in the first measure into two separate > > voices, and so breaking their stems. Can someone show me how to do this? > > Thanks to everone for all the responses! I now have at 3 or 4 different > ways to do this! > > I had seen "\voices" in the manual, but it did not say anything about > continuing phrasing or dynamics across voices. I fact it said it can't be > done. But after seeing people's responses, I looked further and found > where > it explained this feature. So there seems to be an inconsistency in the > manual. What's the best way to go about reporting/fixing this? > > -David > > >
Re: ties between voices
Hi Carl, I think you misunderstood. The \voices command does not let slurs go across voices. Rather, it allows existing voices to go into the << \\ >> polyphony expression. Previously (and still, if you don't use the \voices command), << \\ >> created two temporary voices, neither one related to the voice containing the << \\ >> construct. With the \voices command (strictly speaking it's a music function, IIUC), the voices within the << \\ >> construct can be specified, such that the slurs/ties/etc. go between entities in the same voice, rather than trying to go between entities in different voices. It might be worth pointing out that it has always been possible to let existing voices continue into a polyphonic section by working without the double backslash \\. So, you can always write \fixed c' { << { \voiceOne f8) b~ } \new Voice { \voiceTwo d4 } >> 4 } at the price of having to state \voiceOne etc. manually. Of course you know this, but it's my impression that beginners often are not aware that it's possible to use << >> (inside a staff) without \\, so I thought I'd mention it. (Of course, the tricky part begins as soon as _both_ voices of a << >> construct are to be "connected" via ties/slurs to the surrounding homophonic music, but that doesn't change with \voices either.) Lukas
Re: Ties between voices
Hey Andrew, this might not help but did you try the technique in this snippet? https://lists.gnu.org/archive/html/bug-lilypond/2012-03/msg00663.html Just found this while looking around for people discussing slurs across voices previously. (pasted from url incase website is dead) Snippet \version "2.15.33" % also works with 2.23.10 \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" } } } End of snippet -William On 7/22/22 21:49, Andrew Bernard wrote: 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. This is such a critical feature for keyboard music. When there are hundreds of such ties in major pieces, it is just too tedious to do all the workarounds with hidden notes and voices. I'm sorry to say that I have switched to Dorico because of this significant shortcoming, after having been a Lilypond user for a decade or more. So, my question is this. Is the codebase just painted into a corner that can't be gotten out of in this area due to architectural design decisions? Are there any plans at all to develop this functionality in the forseeable future? Andrew -- William Rehwinkel will...@williamrehwinkel.net https://williamrehwinkel.net
Re: Ties between voices
Le 23/07/2022 à 03:49, Andrew Bernard a écrit : 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. This is such a critical feature for keyboard music. When there are hundreds of such ties in major pieces, it is just too tedious to do all the workarounds with hidden notes and voices. I'm sorry to say that I have switched to Dorico because of this significant shortcoming, after having been a Lilypond user for a decade or more. So, my question is this. Is the codebase just painted into a corner that can't be gotten out of in this area due to architectural design decisions? I don't think so, but it's definitely not a trivial problem either, and requires new design. Are there any plans at all to develop this functionality in the forseeable future? Did you see this recent discussion? https://lists.gnu.org/archive/html/lilypond-devel/2022-05/msg00175.html It's not possible to answer your question, as most plans to develop functionality are a private decision of a particular contributor that are not public until (perhaps a few days before) a patch is submitted. Best, Jean
Re: Ties between voices
I thought there may be a roadmap that contributors create? Or is current development just more or less ad hoc? I am aware that it is currently a difficult problem, as I said. On 23/07/2022 4:04 pm, Jean Abou Samra wrote: It's not possible to answer your question, as most plans to develop functionality are a private decision of a particular contributor that are not public until (perhaps a few days before) a patch is submitted.
Re: Ties between voices
Le 23/07/2022 à 08:11, Andrew Bernard a écrit : I thought there may be a roadmap that contributors create? Or is current development just more or less ad hoc? Like most community-driven free software projects, LilyPond is developed as a hobby by contributors who do that each for their own reasons, as a loosely assembled team of people all around the world. There is no manager. There isn't, can't be and shouldn't be a precise roadmap. Each person works on what they have the motivation for at a given point of time. For large projects, it's often a good idea to discuss proposals on the mailing list, but this is more to get approval and discuss the big picture of a plan than anything else. Implementing the plan remains contingent on the contributor who proposes it. This is not a description of LilyPond's current development, but of how LilyPond's and many software projects' development has always worked. Would you imagine a roadmap for openLilyLib, for example? You can't imagine what contributors are going to come up with, and if you put a feature on your roadmap, is there a way to get it implemented other than doing it yourself? Best, Jean
Re: Ties between voices
I was just asking. It is possible to do open source to an agreed roadmap, but that's not how it is for LilyPond, so now I know. On 23/07/2022 4:42 pm, Jean Abou Samra wrote: Le 23/07/2022 à 08:11, Andrew Bernard a écrit : I thought there may be a roadmap that contributors create? Or is current development just more or less ad hoc? Like most community-driven free software projects, LilyPond is developed as a hobby by contributors who do that each for their own reasons, as a loosely assembled team of people all around the world. There is no manager. There isn't, can't be and shouldn't be a precise roadmap. Each person works on what they have the motivation for at a given point of time. For large projects, it's often a good idea to discuss proposals on the mailing list, but this is more to get approval and discuss the big picture of a plan than anything else. Implementing the plan remains contingent on the contributor who proposes it. This is not a description of LilyPond's current development, but of how LilyPond's and many software projects' development has always worked. Would you imagine a roadmap for openLilyLib, for example? You can't imagine what contributors are going to come up with, and if you put a feature on your roadmap, is there a way to get it implemented other than doing it yourself? Best, Jean
Re: Ties between voices
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.) Lukas \version "2.23.6" % TODO: Rename variables for clarity % TODO: Turn re-implementations of C++ helper functions into exported callbacks % Not in guile core for 1.8 (remove for Guile2) #(define (hash-count pred table) (count identity (hash-map->list pred table))) # (define (hash-non-empty? hash-table) ;; For Guile2, simplfy to ;; (positive? (hash-count (const #t) hash-table))) (pair? (hash-map->list (lambda (key handle) '()) hash-table))) # (define (tie-column::add_tie tie-column tie) ;;; TODO: Make callback from C++ (if (not (grob::has-interface (ly:grob-parent tie Y) 'tie-column-interface)) (begin (if (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 (begin (ly:spanner-set-bound! tie-column LEFT (ly:spanner-bound tie LEFT)) (ly:spanner-set-bound! tie-column RIGHT (ly:spanner-bound tie RIGHT (ly:grob-set-parent! tie Y tie-column) (ly:pointer-group-interface::add-grob tie-column 'ties tie %{ head-event-alist has the fields: '((end-moment . #f) (tie-stream-event . #f) (tie-articulation-event . #f) (tie-from-chord-created . #f) (tie . #f) ) %} # (define (ly:enharmonic-equivalent? p1 p2) (= (ly:pitch-tones p1) (ly:pitch-tones p2))) # (define (ly:tie::head tie dir) (let ((it (ly:spanner-bound tie dir))) (if (grob::has-interface it 'note-head-interface) it #f))) # (define-public (New_tie_engraver context) (define (report-unterminated-tie notehead alist) ;; give notehead argument in order to simplify use of ;; report-unterminated-tie as a proc in hash-for-each (if (not (assq-ref alist 'tie-from-chord-created)) (begin (ly:warning (G_ "unterminated tie")) ; TODO: Warn with source position (ly:grob-suicide! (assq-ref alist 'tie) (let ((event-processed #f) (tie-stream-event #f) ; corresponds to event_ in C++ (tie-column #f) (now-heads '()) (heads-to-tie (make-hash-table)) (ties '()) (target (ly:context-name context))) (define (typeset-tie her) ;; this seems not to change anything for "her" if both bounds ;; are note heads ??? (let ((left-head (ly:tie::head her LEFT)) (right-head (ly:tie::head her RIGHT))) (if (not (and left-head right-head)) (begin (ly:warning "lonely tie") (if (not left-head) (set! left-head right-head) (set! right-head left-head (ly:spanner-set-bound! her LEFT left-head) (ly:spanner-set-bound! her RIGHT right-head))) (define (tie-notehead engraver head enharmonic?) (let ((found #f)) (hash-for-each (lambda (registered-head alist) (let* ((right-ev (event-cause head)) (left-head registered-head) (left-ev (event-cause left-head))) (if (and (not found) left-ev right-ev) (let ((p1 (ly:event-property left-ev 'pitch)) (p2 (ly:event-property right-ev 'pitch))) (if (and ((if enharmonic? ly:enharmonic-equivalent? equal?) p1 p2) ;; Do not
Re: Ties between voices
Hi Lukas! As someone who writes/engraves a LOT of keyboard music: THANK YOU!! Excited that there might even be a Slur version in the [near] future. Best, Kieren.
Re: Ties between voices
I second Kieren's sentiment, thanks for this extension Lukas-Fabian. I'll remember this extension if the need for it pops up! -William On 7/23/22 06:49, Lukas-Fabian Moser wrote: 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.) Lukas -- William Rehwinkel will...@williamrehwinkel.net https://williamrehwinkel.net
Re: Ties between voices
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? Amusingly, I was thinking about pretty much the same concept yesterday, but in a completely different context and without cross-staff spanners in mind. I was musing about contributing a "highlight" feature to colorize a music passage, and how highlighting different contexts, like a full StaffGroup or just a Staff, would be handled internally. I thought that the engraver could refrain from handling an event if it detected that context the event wanted to highlight (stored in an event property) was not matching the engraver's context, but I wondered if it could be more general, which leads to thinking about your \to command being implemented as to = #(define-music-function (ctx mus) (symbol? ly:music?) (make-music 'ContextExclusiveMusic 'target ctx 'element mus)) where ContextExclusiveMusic would be recognized by Music_iterator::report_event (see find_above_by_music_type) to make any event within ContextExclusiveMusic only broadcast in engravers of the context addressed by \to. Just in case that helps you further your idea ... Cheers, Jean
Re: Ties between voices
Hi all I'm neither a professional engraver nor composer. But I've already tried to copy scores for my own use. That's where I got in touch with many "creative" engraving situations. One might ask how one could engrave something a manual engraver did 100 years ago. And then we have this fantastic list that comes up with ideas solutions. But from time to time I encounter things that don't make sense to me from a semantical perspective. Ties across voices is such a thing. How would that make sense? Yes, there has been a master in the past who did it, but nevertheless, it has (in developer speak) has a smell. Should I omit or correct that in my score? After all ties describe the relationship between two or several notes within a voice (i.e. that can be sung). Just my philosophical 2 cents ;-) Best regards Stephan Am 23.07.2022 um 08:04 schrieb Jean Abou Samra: Le 23/07/2022 à 03:49, Andrew Bernard a écrit : 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. This is such a critical feature for keyboard music. When there are hundreds of such ties in major pieces, it is just too tedious to do all the workarounds with hidden notes and voices. I'm sorry to say that I have switched to Dorico because of this significant shortcoming, after having been a Lilypond user for a decade or more. So, my question is this. Is the codebase just painted into a corner that can't be gotten out of in this area due to architectural design decisions? I don't think so, but it's definitely not a trivial problem either, and requires new design. Are there any plans at all to develop this functionality in the forseeable future? Did you see this recent discussion? https://lists.gnu.org/archive/html/lilypond-devel/2022-05/msg00175.html It's not possible to answer your question, as most plans to develop functionality are a private decision of a particular contributor that are not public until (perhaps a few days before) a patch is submitted. Best, Jean
Re: Ties between voices
Le 23/07/2022 à 19:14, Jean Abou Samra a écrit : to = #(define-music-function (ctx mus) (symbol? ly:music?) (make-music 'ContextExclusiveMusic 'target ctx 'element mus)) P.S. With some parser fiddling (and at the cost of making \to a reserved identifier), it should be possible to give \to a syntax like that of \new and \context. \to Staff ~ \to StaffGroup = "outer" \startHighlight
Re: Ties between voices
This is a good question, Stephan. I think it can be explained that when talking about keyboard music, even though there are abstract ideas of things like melody from playing one note after the previous, and other things such as chords, engraving techniques such as including many noteheads on one stem to form a chord can be considered a shorthand for representing different notes (voices?) that have the same start and end point. Furthermore, splitting a single-stem chord into an upper-stem group of notes and lower-stem group of notes is simply a shorthand...you could imagine writing each note separately (as with new German organ tablature for example), in which case this would not be a problem. For keyboard music, I don't think this is too objectionable, however this would of course not be acceptable for closed score choral music or other situations where distinct instruments are represented by different voices on one line. Speaking of tie-ing notes "between voices" is a bit of a misrepresentation, it's referring to the way that lilypond writes multiple polyphonic notes on the same staff using different voices. This thinking doesn't apply to other things like Chopin piano works with slurs across voices but I think those can be thought of more practically, to hold the first note long enough that it sounds legato with the last. -William On 7/23/22 13:27, Stephan Schöll wrote: Hi all I'm neither a professional engraver nor composer. But I've already tried to copy scores for my own use. That's where I got in touch with many "creative" engraving situations. One might ask how one could engrave something a manual engraver did 100 years ago. And then we have this fantastic list that comes up with ideas solutions. But from time to time I encounter things that don't make sense to me from a semantical perspective. Ties across voices is such a thing. How would that make sense? Yes, there has been a master in the past who did it, but nevertheless, it has (in developer speak) has a smell. Should I omit or correct that in my score? After all ties describe the relationship between two or several notes within a voice (i.e. that can be sung). Just my philosophical 2 cents ;-) Best regards Stephan Am 23.07.2022 um 08:04 schrieb Jean Abou Samra: Le 23/07/2022 à 03:49, Andrew Bernard a écrit : 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. This is such a critical feature for keyboard music. When there are hundreds of such ties in major pieces, it is just too tedious to do all the workarounds with hidden notes and voices. I'm sorry to say that I have switched to Dorico because of this significant shortcoming, after having been a Lilypond user for a decade or more. So, my question is this. Is the codebase just painted into a corner that can't be gotten out of in this area due to architectural design decisions? I don't think so, but it's definitely not a trivial problem either, and requires new design. Are there any plans at all to develop this functionality in the forseeable future? Did you see this recent discussion? https://lists.gnu.org/archive/html/lilypond-devel/2022-05/msg00175.html It's not possible to answer your question, as most plans to develop functionality are a private decision of a particular contributor that are not public until (perhaps a few days before) a patch is submitted. Best, Jean -- William Rehwinkel will...@williamrehwinkel.net https://williamrehwinkel.net
Re: Ties between voices
Gosh. There's no 'smell'. In piano music that has polyphony it is very common, and indeed necessary to tie across voices. Dorico enables it with ease (and if it did not make sense, I can assure you Dorico which is heavily rule bound would not allow it). Lilypond cannot do it natively. This is well known. Same with slurs, but that is not the present topic. We are not talking about singing, and 'voices' in this context does not relate to the human voice. Perhaps you are conflating sung voices with voices in polyphony for keyboards. I'll find a few examples to post later on to illustrate. This has been a long standing limitation with LilyPond, not something that I have suddenly cooked up. I encounter this extensively in the modernist music I set, but I am doing the JSB WTC at the moment and even he does it quite a lot, especially in the four and five part works. Andrew On 24/07/2022 3:27 am, Stephan Schöll wrote: But from time to time I encounter things that don't make sense to me from a semantical perspective. Ties across voices is such a thing. How would that make sense? Yes, there has been a master in the past who did it, but nevertheless, it has (in developer speak) has a smell. Should I omit or correct that in my score? After all ties describe the relationship between two or several notes within a voice (i.e. that can be sung).
Re: Ties between voices
Andrew, did you get a chance to try Lukas-Fabian's extension yet? Was it working for you or were there something wrong? -William On 7/23/22 18:03, Andrew Bernard wrote: Gosh. There's no 'smell'. In piano music that has polyphony it is very common, and indeed necessary to tie across voices. Dorico enables it with ease (and if it did not make sense, I can assure you Dorico which is heavily rule bound would not allow it). Lilypond cannot do it natively. This is well known. Same with slurs, but that is not the present topic. We are not talking about singing, and 'voices' in this context does not relate to the human voice. Perhaps you are conflating sung voices with voices in polyphony for keyboards. I'll find a few examples to post later on to illustrate. This has been a long standing limitation with LilyPond, not something that I have suddenly cooked up. I encounter this extensively in the modernist music I set, but I am doing the JSB WTC at the moment and even he does it quite a lot, especially in the four and five part works. Andrew On 24/07/2022 3:27 am, Stephan Schöll wrote: But from time to time I encounter things that don't make sense to me from a semantical perspective. Ties across voices is such a thing. How would that make sense? Yes, there has been a master in the past who did it, but nevertheless, it has (in developer speak) has a smell. Should I omit or correct that in my score? After all ties describe the relationship between two or several notes within a voice (i.e. that can be sung). -- William Rehwinkel will...@williamrehwinkel.net https://williamrehwinkel.net
Re: Ties between voices
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
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)) (ly:spanner-set-bo
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
> 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?
Am 05.10.2017 um 10:56 schrieb James Harkins: One nut I never cracked in LilyPond: how to tie a note from one Voice to another, e.g. Does LSR snippet 8 (http://lsr.di.unimi.it/LSR/Item?id=8) help? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
2017-10-05 10:56 GMT+02:00 James Harkins : > Hi, been away for awhile. > > I'm now writing for khaen, a Thai mouth organ. Fascinating instrument. > Notation is usually single-staff and heavily multi-voiced. > > One nut I never cracked in LilyPond: how to tie a note from one Voice to > another, e.g. > > \new Score { > \new Staff << > \numericTimeSignature \time 2/4 % barline, so E must be tied > \new Voice \relative c' { > \voiceOne 2 a8 g4. > } > \new Voice \relative c' { > \voiceTwo r4 f4 ~ 2 > } > >> > } > > I need a tie from the e in 2 (voice 1) to the e in 2 (voice 2). > > How to restructure this to make it possible? > > Thanks. > > hjh Probably: \new Score { \new Staff { \numericTimeSignature \time 2/4 % barline, so E must be tied << \new Voice = "xy" \relative c' { \set tieWaitForNote = ##t 2~ } \context Voice = "xy" \relative c' { s4 \voiceTwo f4 ~ 2 } \new Voice { r4 s4 a'8 g'4. } >> \unset tieWaitForNote } } Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
On Thu, Oct 5, 2017 at 3:56 AM, James Harkins wrote: > I need a tie from the e in 2 (voice 1) to the e in 2 (voice 2). > > How to restructure this to make it possible? This reminds me of last year's Google Summer of Code project. http://lilypondblog.org/2016/08/google-summer-of-code-2016-cross-voice-spanners/ -- Karlin High Missouri, USA ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
> Probably: > > \new Score { > \new Staff { > \numericTimeSignature \time 2/4 % barline, so E must be tied > << > \new Voice = "xy" \relative c' { > \set tieWaitForNote = ##t > 2~ > } > \context Voice = "xy" \relative c' { > s4 \voiceTwo f4 ~ 2 > } > \new Voice { r4 s4 a'8 g'4. } > >> > \unset tieWaitForNote > } > } Ah, that's a lovely idea -- but I had oversimplified, and this doesn't quite scale up. \version "2.18.2" \language "english" \new Score { \new Staff { \numericTimeSignature << \new Voice = "a" \relative c' { \voiceOne c16 g' ~ 8 ~ q2. ~ \set tieWaitForNote = ##t q2 ~ } \context Voice = "a" \relative c' { s4 s8 \voiceTwo f \override Beam.grow-direction = #RIGHT f16 [ %{ \override NoteHead.transparent = ##t %} f f f f f f f ] \override Beam.grow-direction = #LEFT f [ f f %{ \revert NoteHead.transparent %} f ] ~ f4 ~ 2 } \new Voice = "b" \relative c' { \voiceTwo r4 r8 s8 s2 s2 \voiceOne a'8 g4. } >> \unset tieWaitForNote } } If you uncomment the transparent note heads, it's a right bloody mess. I might have to rethink it. Maybe two staves are the only way. hjh ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
A-ha, got it, it was a combination of Harm's trick plus a hidden note: \new Score { \new Staff { \numericTimeSignature << \new Voice = "a" \relative c' { \voiceOne \set tieWaitForNote = ##t c16 g' ~ 8 ~ q2. ~ q2 ~ 2 } \context Voice = "a" \relative c' { s1 s4 \voiceTwo \hideNotes f4 ~ \unHideNotes } \new Voice = "b" \relative c' { \voiceTwo r4 r8 f8 \override Beam.grow-direction = #RIGHT f16 [ f f f f f f f ] \override Beam.grow-direction = #LEFT f [ f f f ] ~ f4 } \new Voice = "c" \relative c'' { s1 s2 \voiceOne a8 ( g4. ) } >> } } Thanks, I would never have figured out "\context Voice" by myself. hjh ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
Continuing with this neat "\context Voice" trick -- quite powerful. I see how it works: you have two expressions stuffing events into the same Voice context, and LP merges them into one timed list and does the best it can to make sense out of the tie properties. I've got one I can't quite get right. I would like the tie from the upper B whole note to be up instead of down. It almost looks like it's inferring voiceTwo or voiceFour from somewhere, but I've been fiddling with it and I can't find it. Even with multiple \tieNeutral commands (which surely must be redundant), LP insists on pulling the ties on both B notes down. Removing zeroB03 and zeroC03: no difference. Removing \context Voice = "zeroA03" -- the B ties are as I expect, but then I don't get the ties on the other notes going into the next bar. \new Score { \new Staff { << { \time 4/4 \partial 4 s4 | s4*2 } \new Voice = "zeroA03" \relative c' { \set tieWaitForNote = ##t 4 ~ \tieNeutral q1 ~ ) \oneVoice \tieNeutral 1 } \context Voice = "zeroA03" \relative c' { s4 s2. \oneVoice \stemDown \tieNeutral \hideNotes 4 ~ \unHideNotes } \new Voice = "zeroB03" \relative c' { s4 \voiceTwo \tieNeutral r4 2 ~ 4 %~ } \new Voice = "zeroC03" \relative c''' { s4 s1 \voiceThree r8 g4. ~ g2 } >> } } Any suggestions? (I know it's hard. The instrument spans two octaves, so a single staff is more appropriate, and it can play 6-8-note chords easily, with independent note-on/off. It's a stretch, even with pen and paper.) hjh___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
> I've got one I can't quite get right. I would like the tie from the > upper B whole note to be up instead of down. [...] Without looking at your example: Use `_~' and `^~' instead of `~' to immediately specify a tie's direction. Werner ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
On October 7, 2017 14:52:06 Werner LEMBERG wrote: Without looking at your example: Use `_~' and `^~' instead of `~' to immediately specify a tie's direction. Crikey, I knew about that for slurs, didn't think of it for ties. But, it's a chord where I want the lower tie to go down, and the upper one to go up... I have played with tie-configuration before but I have no idea how it works when the tie onsets are staggered. hjh Sent with AquaMail for Android http://www.aqua-mail.com ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
On 07.10.2017 13:55, James Harkins wrote: But, it's a chord where I want the lower tie to go down, and the upper one to go up... Put the ties inside the chord: Best, Simon ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
On October 7, 2017 20:49:38 Simon Albrecht wrote: On 07.10.2017 13:55, James Harkins wrote: But, it's a chord where I want the lower tie to go down, and the upper one to go up... Put the ties inside the chord: I'm binge watching Rick & Morty season 3, but this blows my mind even more than that. Never dreamed it. :-O Thanks -- hjh Sent with AquaMail for Android http://www.aqua-mail.com ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
On Sat, 07 Oct 2017 20:49:31 +0800 Simon Albrecht wrote > On 07.10.2017 13:55, James Harkins wrote: > > But, it's a chord where I want the lower tie to go down, and > > the upper one to go up... > > Put the ties inside the chord: > Oh... I'm afraid I spoke too soon. The syntax is accepted, but ignored in the printed output. I still get two down-ties. It must be conflict-resolution logic. See the comment: "I remove *either* the a or the d from this chord, I get up/down ties." \new Score { \new Staff { << { \time 4/4 \partial 4 s4 | s4*2 } \new Voice = "zeroA03" \relative c' { \set tieWaitForNote = ##t 4 ~ 1 1 } \context Voice = "zeroA03" \relative c' { s4 s2. \hideNotes % if I remove *either* the a or the d from this chord, % I get up/down ties from above \voiceTwo \tieNeutral 4 ~ \unHideNotes } % This displays the e-f-a-d notes % that are the source of the 4 extra ties. % Doesn't matter to tie behavior %\new Voice = "zeroB03" \relative c' { % s4 % \voiceTwo \tieNeutral r4 2 ~ 4 %~ %} >> } } hjh ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
2017-10-07 16:40 GMT+02:00 James Harkins : > On Sat, 07 Oct 2017 20:49:31 +0800 Simon Albrecht > wrote >> On 07.10.2017 13:55, James Harkins wrote: >> > But, it's a chord where I want the lower tie to go down, and >> > the upper one to go up... >> >> Put the ties inside the chord: >> > > Oh... I'm afraid I spoke too soon. The syntax is accepted, but ignored in the > printed output. I still get two down-ties. > > It must be conflict-resolution logic. See the comment: "I remove *either* the > a or the d from this chord, I get up/down ties." > > \new Score { > \new Staff { > << > { \time 4/4 \partial 4 s4 | s4*2 } > \new Voice = "zeroA03" \relative c' { > \set tieWaitForNote = ##t > 4 ~ > 1 1 > } > \context Voice = "zeroA03" \relative c' { > s4 > s2. > \hideNotes > % if I remove *either* the a or the d from this chord, > % I get up/down ties from above > \voiceTwo \tieNeutral 4 ~ > \unHideNotes > } > % This displays the e-f-a-d notes > % that are the source of the 4 extra ties. > % Doesn't matter to tie behavior > %\new Voice = "zeroB03" \relative c' { > % s4 > % \voiceTwo \tieNeutral r4 2 ~ 4 %~ > %} > >> > } > } > > hjh You could do \override TieColumn.positioning-done = ##t, but be aware, using it means you are now responsible yourself for the Tie's directions. You tell LilyPond "Don't bother placing the Ties, I'll do" \new Score { \new Staff { << { \time 4/4 \partial 4 s4 | s4*2 } \new Voice = "zeroA03" \relative c' { \set tieWaitForNote = ##t 4 ~ 1 \once \override TieColumn.positioning-done = ##t 1 } \context Voice = "zeroA03" \relative c' { s4 s2. \hideNotes % if I remove *either* the a or the d from this chord, % I get up/down ties from above \voiceTwo \tieNeutral 4 \unHideNotes } % This displays the e-f-a-d notes % that are the source of the 4 extra ties. % Doesn't matter to tie behavior %\new Voice = "zeroB03" \relative c' { % s4 % \voiceTwo \tieNeutral r4 2 ~ 4 %~ %} >> } } Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
2017-10-07 17:08 GMT+02:00 Thomas Morley : > 2017-10-07 16:40 GMT+02:00 James Harkins : >> On Sat, 07 Oct 2017 20:49:31 +0800 Simon Albrecht >> wrote >>> On 07.10.2017 13:55, James Harkins wrote: >>> > But, it's a chord where I want the lower tie to go down, and >>> > the upper one to go up... >>> >>> Put the ties inside the chord: >>> >> >> Oh... I'm afraid I spoke too soon. The syntax is accepted, but ignored in >> the printed output. I still get two down-ties. >> >> It must be conflict-resolution logic. See the comment: "I remove *either* >> the a or the d from this chord, I get up/down ties." >> >> \new Score { >> \new Staff { >> << >> { \time 4/4 \partial 4 s4 | s4*2 } >> \new Voice = "zeroA03" \relative c' { >> \set tieWaitForNote = ##t >> 4 ~ >> 1 1 >> } >> \context Voice = "zeroA03" \relative c' { >> s4 >> s2. >> \hideNotes >> % if I remove *either* the a or the d from this chord, >> % I get up/down ties from above >> \voiceTwo \tieNeutral 4 ~ >> \unHideNotes >> } >> % This displays the e-f-a-d notes >> % that are the source of the 4 extra ties. >> % Doesn't matter to tie behavior >> %\new Voice = "zeroB03" \relative c' { >> % s4 >> % \voiceTwo \tieNeutral r4 2 ~ 4 %~ >> %} >> >> >> } >> } >> >> hjh > > > > You could do \override TieColumn.positioning-done = ##t, but be aware, > using it means you are now responsible yourself for the Tie's > directions. > You tell LilyPond "Don't bother placing the Ties, I'll do" > > \new Score { > \new Staff { > << > { \time 4/4 \partial 4 s4 | s4*2 } > \new Voice = "zeroA03" \relative c' { > \set tieWaitForNote = ##t > 4 ~ > 1 > \once \override TieColumn.positioning-done = ##t > 1 > } > \context Voice = "zeroA03" \relative c' { > s4 > s2. > \hideNotes > % if I remove *either* the a or the d from this chord, > % I get up/down ties from above > \voiceTwo \tieNeutral 4 > \unHideNotes > } > % This displays the e-f-a-d notes > % that are the source of the 4 extra ties. > % Doesn't matter to tie behavior > %\new Voice = "zeroB03" \relative c' { > % s4 > % \voiceTwo \tieNeutral r4 2 ~ 4 %~ > %} > >> > } > } > > Cheers, > Harm Though the output is not convincing, imho. I'd prefer: \new Staff \relative c ' { \time 4/4 \partial 4 4 ~ 1\laissezVibrer 1\repeatTie } Probably lengthen the semi-ties a bit. Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Ties between voices?
On Sat, 07 Oct 2017 23:15:17 +0800 Thomas Morley wrote > > You could do \override TieColumn.positioning-done = ##t, but be aware, > > using it means you are now responsible yourself for the Tie's > > directions. > > You tell LilyPond "Don't bother placing the Ties, I'll do" > > Though the output is not convincing, imho. I think there's not really a good way. So far, three options: - LilyPond places ties (normal behavior): Three upper b's, two ties. The first tie is up and the second is down. The down-tie passes through a thick chord. I lose it visually. - "positioning-done = ##t": Both upper-b ties go up. The second passes through a d note head and it passes under a tie that starts later, both of which are ugly, but I can see the tie clearly. - \laissezVibrer: The \laissezVibrer ties go up and down, but the \repeatTies both go down. I could split the b's into one voice and the other chord notes into a different voice, but then I have an unpleasant bargain between the b's sitting off to the side (and, in my test, LP pushes the b's to the right, obscuring the \repeatTie), or smashing them into \oneVoice and then LP doesn't arrange the a and b properly. To my eye, "positioning-done = ##t" is the least objectionable, so I'll go with that. Thanks for all the advice -- I learned *a lot* from this and I'm happy with the outcome. hjh ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ties between voices
On Wed, Jan 17, 2007 at 08:15:24AM +0200, Joe Neeman wrote: > We've had a few questions about ties between voices (especially ties from > polyphony to chords). It seems that you can get this behaviour simply by > moving the Tie_engraver form the Voice context to the Staff context. Note > that the Tie_engraver was probably designed to live in the Voice context, so > it may not work perfectly, but if people will test it and report problems > then it will get fixed. > > \version "2.10.0" > > \layout { > \context { >\Staff >\consists "Tie_engraver" > } > \context { >\Voice >\remove "Tie_engraver" > } > } What a great idea and suggestion! Thank you so much Joe. I'm going to try this right away on a piano piece with many such between-voice or multi-voice-to-single-voice ties that has had me stumped for quite a few weeks now. Thanks! Steve D New Mexico, US ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ties between voices
On Wed, Jan 17, 2007 at 08:15:24AM +0200, Joe Neeman wrote: > We've had a few questions about ties between voices (especially ties from > polyphony to chords). It seems that you can get this behaviour simply by > moving the Tie_engraver form the Voice context to the Staff context. Note > that the Tie_engraver was probably designed to live in the Voice context, so > it may not work perfectly, but if people will test it and report problems > then it will get fixed. > > \version "2.10.0" > \layout { > \context { >\Staff >\consists "Tie_engraver" > } > \context { >\Voice >\remove "Tie_engraver" > } > } > \new Staff { > \relative { ><< > {a' b~ c d} \\ > {a, b b' c} >>> > } > } --- --- --- Thank you very much for the suggestion, Joe. However, in LilyPond 2.11.12, if I add a layout section such as you suggested above, there is an error message when I invoke LilyPond to process the file-- --- begin error message --- GNU LilyPond 2.11.12 Processing `blues-in-c-1.ly' Parsing... Interpreting music... Interpreting music... [8][11] Preprocessing graphical objects... /home/xscd/lilypond/usr/bin/../share/lilypond/current/ly/init.ly:37:1: error: GUILE signaled an error for the expression beginning here # (if (or (pair? toplevel-scores) output-empty-score-list) Wrong type argument in position 1: () /home/xscd/lilypond/usr/bin/../share/lilypond/current/ly/init.ly:37:5: error: syntax error, unexpected '(', expecting '=' #(if (or (pair? toplevel-scores) output-empty-score-list) programming error: Parsed object should be dead: static scm_unused_struct* Prob::mark_smob(scm_unused_struct*) continuing, cross fingers programming error: Parsed object should be dead: static scm_unused_struct* Context_def::mark_smob(scm_unused_struct*) continuing, cross fingers error: failed files: "blues-in-c-1.ly" --- end quote of error message --- However, if I comment-out the layout section (with %{ %}), as in the attached file, no error message occurs. best wishes, Steve D New Mexico, US -- The military was created to protect the leisure lifestyles of the ruling class. -Eli Khamarov % Blues in C 1, work for piano by Stephen C. Doonan, [EMAIL PROTECTED] \version "2.11.12" \paper { } \header { title = "Blues in C 1" composer = \markup \center-align { "Stephen C. Doonan" \small "(1952- )" } piece = \markup { \bold "Andantino (" \tiny \note #"4" #0.75 \normalsize " = 85-115" \bold ")" } % Mutopiaproject.org headers mutopiatitle = "Blues in C 1" mutopiacomposer = "DoonanSC" mutopiainstrument = "Piano" date = "2006/Sep" source = "Composer" style = "Jazz" copyright = "Creative Commons Attribution-ShareAlike 2.5" maintainer = "Stephen C. Doonan" maintainerEmail = "[EMAIL PROTECTED]" maintainerWeb = "http://www.xscd.com/pub/music/"; lastupdated = "2006/September/25" } rightHand = \relative c'' { % 1 \key c \major \time 4/4 \clef treble 2.. 8~ | ~ 4 4 8~ 4 | 4 << \new Voice { \voiceOne c'4. r8 } { \voiceTwo e,8 f g \oneVoice 8~ } >> | 4. 8~ \afterGrace 2 {bes16[ a]} | 2.. << \new Voice { \voiceTwo ees8~ | ees2 aes | } { \voiceOne 8~ | 8 aes bes c c d ees f \oneVoice | } >> % 7 4 << \new Voice { \voiceOne c4. r8 } { \voiceTwo e,8 f g \oneVoice 8~ } >> | 4. 8~ \afterGrace 2 {bes16[ a]} | 2 << \new Voice { \voiceOne c'4. r8 } { \voiceTwo e, f g \oneVoice 8~ } >> | ~ 4 4~ 4 8~ | 8~ 4 4~ 4. | } leftHand = \relative c, { % 1 \time 4/4 \key c \major \clef bass c8 g' d' e d e ~ | ees d c bes aes g f | c g' d' e d e ~ | ees f ~ 2 | } \score { \new PianoStaff << #(set-accidental-style 'piano-cautionary) \set PianoStaff.printPartCombineTexts = ##f \new Staff = "up" \new Voice = "rh" \rightHand \new Staff = "down" \new Voice = "lh" \leftHand >> \midi { \context { \Score tempoWholesPerMinute = #(ly:make-moment 100 4) } } %{\layout { \context { \Staff \consists "Tie_engraver" } \context { \Voice \remove "Tie_engraver" } } %} } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ties between voices
Steve D escreveu: > On Wed, Jan 17, 2007 at 08:15:24AM +0200, Joe Neeman wrote: >> We've had a few questions about ties between voices (especially ties from >> polyphony to chords). It seems that you can get this behaviour simply by >> moving the Tie_engraver form the Voice context to the Staff context. Note >> that the Tie_engraver was probably designed to live in the Voice context, so >> it may not work perfectly, but if people will test it and report problems >> then it will get fixed. >> >> \version "2.10.0" >> \layout { >> \context { >>\Staff >>\consists "Tie_engraver" >> } >> \context { >>\Voice >>\remove "Tie_engraver" >> } >> } >> \new Staff { >> \relative { >><< >> {a' b~ c d} \\ >> {a, b b' c} >>>> >> } >> } > > --- --- --- > > Thank you very much for the suggestion, Joe. However, in LilyPond > 2.11.12, if I add a layout section such as you suggested above, there is > an error message when I invoke LilyPond to process the file-- this should be fixed in .13, currently uploading. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen LilyPond Software Design -- Code for Music Notation http://www.lilypond-design.com ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ties between voices
First, on Wed, Jan 17, 2007 at 08:15:24AM +0200, Joe Neeman wrote: > We've had a few questions about ties between voices (especially ties from > polyphony to chords). It seems that you can get this behaviour simply by > moving the Tie_engraver form the Voice context to the Staff context. Note > that the Tie_engraver was probably designed to live in the Voice context, so > it may not work perfectly, but if people will test it and report problems > then it will get fixed. > > \version "2.10.0" > \layout { > \context { >\Staff >\consists "Tie_engraver" > } > \context { >\Voice >\remove "Tie_engraver" > } > } > \new Staff { > \relative { ><< > {a' b~ c d} \\ > {a, b b' c} >>> > } > } --- --- Then, Steve D wrote: > Thank you very much for the suggestion, Joe. However, in LilyPond > 2.11.12, if I add a layout section such as you suggested above, there is > an error message when I invoke LilyPond to process the file-- --- --- Then Han-Wen wrote: > this should be fixed in .13, currently uploading. --- --- Steve D continues: Yes, the error message disappears with LilyPond 2.11.13. Thank you so much Han-Wen. And Joe, thank *you* so much for the suggestion to move the Tie_engraver from the default Voice context to the Staff context instead. So far, working with staves in a PianoStaff context, your suggestion is working brilliantly, although I have only begun to test it and the piano piece I'm working on now will really stress-test the technique I believe, because it has many of these temporary splitting of the notes of the right or left hand into two or more voices per hand, often for just a fraction of a measure or spanning just parts of two or more measures. If this technique (removing the Tie_engraver from the Voice context to the Staff context) continues to work well, and if any bugs it causes can be fixed or sponsored to fix, then this is an incredibly good solution to the problem of temporary, non-formal, intermittent voices that often occur in the notated music of polyphonic instruments such as piano. It *greatly* simplifies the LilyPond code in such circumstances, and I am personally very excited and enthused about the results so far. Thank you Joe (Neeman), and thank you Han-Wen and other developers. -Steve D New Mexico, US -- Good fortune is what happens naturally in the life of a happy man. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ties between voices
LilyPond 2.11.13, Linux This message pertains to ties between single and multiple voice sections of notation of polyphonic instruments, using a technique suggested by Joe Neeman of moving the Tie_engraver from the default Voice context to the Staff context instead. A Goal -- Piano (and presumably other polyphonic instrument) notation often includes sections where a single polyphonic voice splits into two or more voices for the sake of convenience and clarity of notation. These temporary changes in number of voices per staff, often as brief as a mere fraction of a measure, are common and there are frequently ties between these sections of one-, two-, or three- or more voice sections. It would be very nice if there were an easy way to allow ties to extend from one voice to another voice, from a single voice to multiple voices, or from multiple voices to fewer voices or a single voice, without resorting to code that is complex, verbose or which uses "tricks" to accomplish the task. A Proposed Solution --- One possible solution, proposed by Joe Neeman, is to cause the Tie_engraver to act at the Staff level instead of the Voice level, by removing it in the \layout section from the Voice context and inserting the Tie_engraver into the Staff context. This seems like a great solution, but because the Tie_engraver was originally intended for a Voice context, some unexpected issues may occur when trying to use the Tie_engraver at the Staff level instead of the Voice level. Issues So Far - In trying the technique of moving the Tie_engraver from the Voice level to the Staff level while notating a piano piece with many instances of single-to-multiple voices and vice versa, with many ties between the sections of fewer and more numerous voices, I have encountered a few issues so far. Issue 1: As illustrated in Figure 1 (attached PNG), LilyPond's default placement of the tie between the top notes of chords 2 and 3 of the illustration is so short (to avoid the flat symbol on the 3rd chord) that it is invisible, unless the chords (and measures that contain the chords) are spaced farther apart horizontally (which I did with the \break command at the end of the second measure), as illustrated in Figure 2. Issue 2: I tried to manually add horizontal space between the second and third chord with the following-- \once \override Score.SeparationItem #'padding = #2 --between the 2nd and 3rd chord. However, that had no effect. Does this tweak still work, or has it been deprecated? Issue 3: I tried to manually configure the ties between the second and third chords using-- 8~ \once \override Score.TieColumn #'tie-configuration = #'( (4 . 1) #t ) 4 --However, as is illustrated in Figure 3 (attached PNG image), although the top tie was correctly formatted, the lower tie, which is supposed to be beween the lowest notes of the 3-note chords, was misplaced for some reason by LilyPond. Notice that instead of "TieColumn" I had to use "Score.TieColumn" because the Tie_engraver is now in the Staff rather than Voice context, and a simple "TieColumn" had no effect whatsoever. Also note that I had to raise the top tie to staff position 4 (3 was insufficient to cause the tie to clear the top of the flat symbol on the 3rd chord). *** *** *** *** *** *** *** I would be _happy_to_sponsor_ whatever work these issues might require, if Han-Wen and the developers consider the features worthy enough. :-) I'm sure more issues will come to light as I "stress-test" this idea of moving the Tie_engraver from the Voice to the Staff context, but I think it's a great idea and a great solution if the "kinks" can be worked out. Notators of polyphonic instruments such as the piano will be very grateful for this functionality. Best wishes everyone, Steve D New Mexico, US -- Seen at a bicycle enthusiasts' web forum-- Question: How many people with Attention Deficit Disorder does it take to change a light bulb? Answer: Want to go on a bike ride?! figure-1.png Description: PNG image figure-2.png Description: PNG image figure-3.png Description: PNG image ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ties between voices
On Tue, Jan 23, 2007 at 06:21:53PM -0700, Steve D wrote: > > Issue 3: > I tried to manually configure the ties between the second and third > chords using-- > > 8~ \once \override Score.TieColumn #'tie-configuration = > #'( (4 . 1) #t ) 4 > > --However, as is illustrated in Figure 3 (attached PNG image), although > the top tie was correctly formatted, the lower tie, which is supposed to > be beween the lowest notes of the 3-note chords, was misplaced for some > reason by LilyPond. Notice that instead of "TieColumn" I had to use > "Score.TieColumn" because the Tie_engraver is now in the Staff rather > than Voice context, and a simple "TieColumn" had no effect whatsoever. I should have tried "Staff.TieColumn" instead of "Score.TieColumn" -- So I did try both, but the effect (as in Figure 3 of my previous message) was the same regardless of which (Staff... or Score...) was used. :-) Steve D -- A patriot must always be ready to defend his country against his government. -Edward Abbey ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ties between voices
Steve D escreveu: > As illustrated in Figure 1 (attached PNG), LilyPond's default placement > of the tie between the top notes of chords 2 and 3 of the illustration > is so short (to avoid the flat symbol on the 3rd chord) that it is > invisible, unless the chords (and measures that contain the chords) are > spaced farther apart horizontally (which I did with the \break command > at the end of the second measure), as illustrated in Figure 2. hi, please submit bugreport of this. thanks. > > I would be _happy_to_sponsor_ whatever work these issues might require, > if Han-Wen and the developers consider the features worthy enough. :-) -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen LilyPond Software Design -- Code for Music Notation http://www.lilypond-design.com ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user