Re: Doubled entries with partcombiner
Am 10.04.2015 um 01:29 schrieb Urs Liska: Am 08.04.2015 um 10:18 schrieb Mark Knoop: At 09:35 on 08 Apr 2015, Urs Liska wrote: Am 8. April 2015 08:28:47 MESZ, schrieb Urs Liska u...@openlilylib.org: Hi all, what is the most viable approach to suppress all the doubled items like makuos, markups dynamics etc. that are produced by the partcombiner? Perhaps the merge-rests-engraver in OLL is adaptable? I could now look at that code, and it seems promising. Provided it can perform its action later than the partcombiner. But I think this should be the case. Unfortunately I'm not sure yet if I manage to make that work. In any case I don't think I'll be able to adapt it to spanners because that would require a significant additional layer of housekeeping compared to simple markups. OK, I've done a very primitive rewriting of the merge-rests-engraver, as can be seen in the attachment. Surprisingly the file compiled without real errors on first try, but it issued a warning ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Doubled entries with partcombiner
Am 10.04.2015 um 23:05 schrieb Urs Liska: Am 10.04.2015 um 01:29 schrieb Urs Liska: Am 08.04.2015 um 10:18 schrieb Mark Knoop: At 09:35 on 08 Apr 2015, Urs Liska wrote: Am 8. April 2015 08:28:47 MESZ, schrieb Urs Liska u...@openlilylib.org: Hi all, what is the most viable approach to suppress all the doubled items like makuos, markups dynamics etc. that are produced by the partcombiner? Perhaps the merge-rests-engraver in OLL is adaptable? I could now look at that code, and it seems promising. Provided it can perform its action later than the partcombiner. But I think this should be the case. Unfortunately I'm not sure yet if I manage to make that work. In any case I don't think I'll be able to adapt it to spanners because that would require a significant additional layer of housekeeping compared to simple markups. OK, I've done a very primitive rewriting of the merge-rests-engraver, as can be seen in the attachment. Surprisingly the file compiled without real errors on first try, but it issued a warning Sorry, hit the wrong keyboard shortcut ;-( The file issued the warning: warning: unknown translator: `merge-markups-engraver' warning: cannot find: `merge-markups-engraver' and produced normal output. Can anyone point me to the right direction to make this engraver noticed by the \score? Thanks Urs \version 2.18.0 \header { snippet-title = merge-rests-engraver snippet-author = Jay Anderson snippet-source = http://www.mail-archive.com/lilypond-user%40gnu.org/msg69608.html; snippet-description = \markup { Merge rests of equal duration in different voice } tags = merge, rest, rests, voice, voices status = ready } #(define has-one-or-less (lambda (lst) (or (null? lst) (null? (cdr lst) #(define has-at-least-two (lambda (lst) (not (has-one-or-less lst #(define (all-equal lst pred) (or (has-one-or-less lst) (and (pred (car lst) (cadr lst)) (all-equal (cdr lst) pred #(define merge-markups-engraver (lambda (context) (let ((markups-equal? (lambda (markup-a markup-b) (string=? (markup-string markup-a) (markup-string markup-b (markups '())) `((start-translation-timestep . ,(lambda (trans) (set! markups '( (stop-translation-timestep . ,(lambda (trans) (if (and (has-at-least-two markups) (all-equal markups markups-equal?)) (for-each (lambda (mkup) (ly:grob-set-property! mkup 'Y-offset 0)) mkup (acknowledgers (text-interface . ,(lambda (engraver grob source-engraver) (if (eq? 'Markup (assoc-ref (ly:grob-property grob 'meta) 'name)) (set! markups (cons grob markups)) \score { \new Staff \with { \consists merge-markups-engraver } \new Voice { \voiceOne c''^\markup Test } \new Voice { \voiceTwo c'_\markup Test } \layout {} }___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Re lyrics question
Abraham, You are right. First I had to discover what a melisma was. Now I know. At the beginning of the learning curve, I have a lot to learn. I think the LSR is a place for a lot of study. Thanks. Bill On 15-04-10 03:24 PM, tisimst wrote: Bill, The only thing I don't like is the use of the underscore to skip notes in the lyrics. Since this manually creates a melisma, it makes the syllable in each verse (except the third) shift unnaturally to the right, relative to its notehead, while the third verse is all lined up correctly. Other than that, LGTM! - Abraham On Fri, Apr 10, 2015 at 11:09 AM, William Marchant [via Lilypond] [hidden email] /user/SendEmail.jtp?type=nodenode=174346i=0 wrote: How about the mods I have put in. It seems to engrave OK. Still tedious to type though. Bill \version 2.14.2 \header { title = Li'l Liza Jane composer = Traditional tagline = % This disables lilypond's self-advertisement (in a footer of the last page). } mybrace = \set stanza = \markup {\right-brace #60 } melody = \relative c' { \clef treble % \key g \major e' \key c \major \time 4/4 \repeat unfold 2 { e4 c d c | e g g2 | } \alternative { { a4 g2 e4 | g1 | \break } { e4 e2 d4 | c1 | \break } } \repeat unfold 2 { c'2. g4 | a2 g | } \alternative { { a4 g2 e4 | g1 } { e4 e2 d4 | c1 } } } stanzaOne = \lyricmode { \set stanza = #1. I've gotta girl in | Bal -- ti -- more | %Li'l Li -- za | Jane, | _ _ _ _ \set stanza = #1. She's the girl that I a -- dore, | %Li'l Li -- za | Jane. _ _ _ _ \set stanza = #R: Oh, E -- li -- za | Li'l Li -- za | Jane | Oh, E -- li -- za | Li'l Li -- za | Jane | } stanzaTwo = \lyricmode { \set stanza = #2: I've gotta girl an' | you've got none, | %Li'l Li -- za | Jane, | _ _ _ _ \set stanza = #2: I've gotta girl that call me hon' % Li'l Li -- za | Jane. _ _ _ _ } stanzaThree = \lyricmode { \set stanza = #3: I know_a girl that | I a -- dore, | \mybrace Li'l Li -- za | Jane, | \set stanza = #3: way down south in | Bal -- ti -- more. | \mybrace Li'l Li -- za | Jane. } stanzaFour = \lyricmode { \set stanza = #4: Down where she lives po -- sies grow, | %Li'l Li -- za | Jane, | _ _ _ _ \set stanza = #4: Chick -- ens round the kitch -- en door. | % Li'l Li -- za | Jane. _ _ _ _ } stanzaFive = \lyricmode { \set stanza = #5: I woundn't care how | far we roam, | %Li'l Li -- za | Jane, | _ _ _ _ \set stanza = #5: Where she's at is | home sweet home. | %Li'l Li -- za | Jane. _ _ _ _ } \score { \new Voice = one { \melody } \new Lyrics \lyricsto one \stanzaOne \new Lyrics \lyricsto one \stanzaTwo \new Lyrics \lyricsto one \stanzaThree \new Lyrics \lyricsto one \stanzaFour \new Lyrics \lyricsto one \stanzaFive \layout { % Set the indentation of the first stave to 0 mm. indent = 0\mm % Increase the space in between the staves. system-system-spacing = #'((padding . 2)) } } ___ lilypond-user mailing list [hidden email] http:///user/SendEmail.jtp?type=nodenode=174343i=0 https://lists.gnu.org/mailman/listinfo/lilypond-user If you reply to this email, your message will be added to the discussion below: http://lilypond.1069038.n5.nabble.com/Re-lyrics-question-tp174343.html To start a new topic under User, email [hidden email] /user/SendEmail.jtp?type=nodenode=174346i=1 To unsubscribe from Lilypond, click here. NAML http://lilypond.1069038.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml View this message in context: Re: Re lyrics question http://lilypond.1069038.n5.nabble.com/Re-lyrics-question-tp174343p174346.html Sent from the User mailing list archive http://lilypond.1069038.n5.nabble.com/User-f3.html at Nabble.com. ___ lilypond-user
Re: Doubled entries with partcombiner
Am 10.04.2015 um 23:07 schrieb Urs Liska: Am 10.04.2015 um 23:05 schrieb Urs Liska: Am 10.04.2015 um 01:29 schrieb Urs Liska: Am 08.04.2015 um 10:18 schrieb Mark Knoop: At 09:35 on 08 Apr 2015, Urs Liska wrote: Am 8. April 2015 08:28:47 MESZ, schrieb Urs Liska u...@openlilylib.org: Hi all, what is the most viable approach to suppress all the doubled items like makuos, markups dynamics etc. that are produced by the partcombiner? Perhaps the merge-rests-engraver in OLL is adaptable? I could now look at that code, and it seems promising. Provided it can perform its action later than the partcombiner. But I think this should be the case. Unfortunately I'm not sure yet if I manage to make that work. In any case I don't think I'll be able to adapt it to spanners because that would require a significant additional layer of housekeeping compared to simple markups. OK, I've done a very primitive rewriting of the merge-rests-engraver, as can be seen in the attachment. Surprisingly the file compiled without real errors on first try, but it issued a warning Sorry, hit the wrong keyboard shortcut ;-( The file issued the warning: warning: unknown translator: `merge-markups-engraver' warning: cannot find: `merge-markups-engraver' and produced normal output. Can anyone point me to the right direction to make this engraver noticed by the \score? OK, sorry, I immediately found two errors whose fixes make the file compile without warnings - but at first still without visible result. In line 37 I have to feed markups into the for-each loop and not mkup. And the engraver has to be consisted like \consists #merge-markups-engraver, And from there I was able to solve my initial request with regards to markups. See attached file. I managed to remove doubled markups and also DynamicText items. However, the next step would be to catch hairpins and text spanners too - because they are also very annoying in partcombined staves. PLEASE help me with this because a) I'm quite urgently in need to fix this stuff for a current project and b) I'm sure this will result in a very helpful tool for common use. Many thanks in advance Urs Thanks Urs ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user \version 2.18.0 % Merge identical TextScript objects in multiple voices of a staff, % like they are produced by the partcombiner. % Based on an engraver by Jay Anderson, from % http://www.mail-archive.com/lilypond-user%40gnu.org/msg69608.html; % Engraver listening for TextScript grobs. % When two or more TextScripts are present at the same moment % and their text content is identical, all but the first one % are omitted through setting their 'stencil property to false. #(define merge-markups-engraver (lambda (context) (let ((markups '()) (processed-markups '())) `((start-translation-timestep . ,(lambda (trans) (set! markups '( (stop-translation-timestep . ,(lambda (trans) (if ( (length markups) 1) (begin ;; There are more than one markups at the time-step (set! processed-markups '()) (for-each (lambda (mkup) ;; Retrieve the text content for the iterated markup grob (let ((text (markup-string (ly:grob-property mkup 'text (if (member text processed-markups) ;; If we have already encountered this text omit the grob ... (ly:grob-set-property! mkup 'stencil #f) ;; ... else accept it this time and add it to the list of ;; encountered texts (set! processed-markups (append processed-markups (list text)) (reverse markups)) (acknowledgers (text-interface . ,(lambda (engraver grob source-engraver) (if (member (assoc-ref (ly:grob-property grob 'meta) 'name) '(TextScript DynamicText )) (set! markups (cons grob markups)) %%{ musica = \relative c'' { \partcombineApart c1^\markup Test c1^\markup Test c1^\markup Test % TODO % Also handle hairpins (or other spanners). % Obviously removing the stencil of the middle \p doesn't do any harm % to the behaviour of the hairpins. c1 \ c1 \p c1 \ c1 \! } musicb = \relative c' { c1_\markup Test c1_\markup Prost c1 _\markup Test ^\markup Test-alternative c1 \ c1 \p c1 \ c1 \! } \score { \new Staff \with { \consists #merge-markups-engraver } \partcombine \musica \musicb \layout {} }
Re: Re lyrics question
On 10/04/15 23:46, William Marchant wrote: Abraham, You are right. First I had to discover what a melisma was. Now I know. At the beginning of the learning curve, I have a lot to learn. I think the LSR is a place for a lot of study. Thanks. Bill Thank you guys. These tricks work for me (after I upgraded lilypond). I presumed that the result would be clearer and that I can (subjectively) confirm. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Superimposing notes
Paul, Thanks so much. This is most helpful. But in fact, the issue was far more subtle, and three days of debugging sorted it out. For future searchers of the mail archive, the following may be useful information. The snippet I posted worked fine in isolation and allows you to move notes arbitrarily, including over the top of each other. In the large score I am creating, the notes pushed each other away like mortal enemies. Eventually it transpired that this setting was causing that problem: \remove “Separating_line_group_engraver” This was turned on because the score uses proportional notation. Not removing this engraver allows the notes to be shifted wherever you like. I thought this was worth posting since it seems pretty subtle to me, and there is certainly no explicit documentation about this behaviour. Andrew ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user