Re: Help with music-function generating music
Am 26.03.2014 22:53, schrieb Paul Morris: Hi Urs, I had a chance to work on the iteration part. This one accepts a note as an argument which is a better approach, following the examples here: http://lilypond.org/doc/v2.18/Documentation/extending/doubling-a-note-with-slurs-_0028example_0029 http://lilypond.org/doc/v2.18/Documentation/extending/adding-articulation-to-notes-_0028example_0029 The iteration is done with a named let (which is just one option) see these docs for Guile and Scheme: https://www.gnu.org/software/mit-scheme/documentation/mit-scheme-ref/Iteration.html https://www.gnu.org/software/guile/manual/guile.html#while-do Cheers, -Paul Thank you very much. Such concrete examples are incredibly helpful. I had already started to fiddle around with yesterday's example and was trying to achieve something similar to your new example. But I didn't come to an end (Scheme gives you soo many opportunities to do something wrong ...), so I can now investigate your example with some pre-knowledge. I hope (but honestly doubt) to find the time to pour these experiences in a tutorial (series), as I think that this step is a hard one for many people, and the respective documentation is really hard to grasp. Urs \version 2.18.0 myNotes = #(define-music-function (parser location note num) (ly:music? number?) Returns a series of notes. @var{note} is repeated @var{num} times. @var{note} is supposed to be a single note. ;; iteration by named let (let loop ;; two variables/arguments, ;; i is the iteration count ;; nts is the list of notes we're building ((i 0) (nts '())) ;; conditional (cond (( i num) ;; call the loop again with modified values for i and nts (loop (+ i 1) (append nts (list (ly:music-deep-copy note) (else ;; when done, return the music (make-music 'SequentialMusic 'elements nts) { \myNotes g'16 #8 } -- View this message in context: http://lilypond.1069038.n5.nabble.com/Help-with-music-function-generating-music-tp160833p160867.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Help with music-function generating music
Urs Liska u...@openlilylib.org writes: \version 2.18.0 myNotes = #(define-music-function (parser location note num) (ly:music? number?) Returns a series of notes. @var{note} is repeated @var{num} times. @var{note} is supposed to be a single note. ;; iteration by named let (let loop ;; two variables/arguments, ;; i is the iteration count ;; nts is the list of notes we're building ((i 0) (nts '())) ;; conditional (cond (( i num) ;; call the loop again with modified values for i and nts (loop (+ i 1) (append nts (list (ly:music-deep-copy note) (else ;; when done, return the music (make-music 'SequentialMusic 'elements nts) In this case, it is likely easier to replace the named let with (make-sequential-music (ly:music-deep-copy (make-list num note))) Which is a bit of a dead end for further manipulation which one would likely do with map or similar on the list returned by ly:music-deep-copy. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Extra Staff length
Try the effect of restoring your line-width and removing the etc. markup. -- Phil Holmes - Original Message - From: Conor Cook To: lilypond-user@gnu.org Sent: Wednesday, March 26, 2014 10:43 PM Subject: Extra Staff length Dear Lilypond Community, I am working on a musical example for a paper, and I am in need of some assistance. It started out longer and even more complicated, but I deleted a few measures, but when I did so, I ended up with staff lines that extend beyond the end of the music, which happens mid-measure. The etc… is connected to the last pitches, and the extra length stays when I move it to the left. The example is trying to show how the same material in the first bar goes to different material. Also, if there is a way to show slurs connecting to material beyond the fragment, I would appreciate seeing how. Best, Conor -- -- -- Dear Lilypond Community, I am working on a musical example for a paper, and I am in need of some assistance. It started out longer and even more complicated, but I deleted a few measures, but when I did so, I ended up with staff lines that extend beyond the end of the music, which happens mid-measure. The etc… is connected to the last pitches, and the extra length stays when I move it to the left. The example is trying to show how the same material in the first bar goes to different material. Also, if there is a way to show slurs connecting to material beyond the fragment, I would appreciate seeing how. Best, Conor -- ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Extra Staff length
That did it! I don’t need the etc., but is there any way to put that back in without adding the same effect? ~Conor Cook On Mar 27, 2014, at 4:28 AM, Phil Holmes m...@philholmes.net wrote: Try the effect of restoring your line-width and removing the etc. markup. -- Phil Holmes - Original Message - From: Conor Cook To: lilypond-user@gnu.org Sent: Wednesday, March 26, 2014 10:43 PM Subject: Extra Staff length Dear Lilypond Community, I am working on a musical example for a paper, and I am in need of some assistance. It started out longer and even more complicated, but I deleted a few measures, but when I did so, I ended up with staff lines that extend beyond the end of the music, which happens mid-measure. The etc… is connected to the last pitches, and the extra length stays when I move it to the left. The example is trying to show how the same material in the first bar goes to different material. Also, if there is a way to show slurs connecting to material beyond the fragment, I would appreciate seeing how. Best, Conor Dear Lilypond Community, I am working on a musical example for a paper, and I am in need of some assistance. It started out longer and even more complicated, but I deleted a few measures, but when I did so, I ended up with staff lines that extend beyond the end of the music, which happens mid-measure. The etc… is connected to the last pitches, and the extra length stays when I move it to the left. The example is trying to show how the same material in the first bar goes to different material. Also, if there is a way to show slurs connecting to material beyond the fragment, I would appreciate seeing how. Best, Conor ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Help with music-function generating music
David Kastrup wrote In this case, it is likely easier to replace the named let with (make-sequential-music (ly:music-deep-copy (make-list num note))) Which is a bit of a dead end for further manipulation which one would likely do with map or similar on the list returned by ly:music-deep-copy. Thanks! That does look like a better approach. -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Help-with-music-function-generating-music-tp160833p160879.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Extra Staff length
I presume Lily will take any text moved to the right of the music as continuing music and surround it with staves. You could either move the text back to the left (why the \override TextScript.outside-staff-priority = ##f which causes a collision with the chord?) or try \stopStaff. -- Phil Holmes - Original Message - From: Conor Cook To: Phil Holmes Cc: lilypond-user@gnu.org Sent: Thursday, March 27, 2014 12:50 PM Subject: Re: Extra Staff length That did it! I don’t need the etc., but is there any way to put that back in without adding the same effect? ~Conor Cook On Mar 27, 2014, at 4:28 AM, Phil Holmes m...@philholmes.net wrote: Try the effect of restoring your line-width and removing the etc. markup. -- Phil Holmes - Original Message - From: Conor Cook To: lilypond-user@gnu.org Sent: Wednesday, March 26, 2014 10:43 PM Subject: Extra Staff length Dear Lilypond Community, I am working on a musical example for a paper, and I am in need of some assistance. It started out longer and even more complicated, but I deleted a few measures, but when I did so, I ended up with staff lines that extend beyond the end of the music, which happens mid-measure. The etc… is connected to the last pitches, and the extra length stays when I move it to the left. The example is trying to show how the same material in the first bar goes to different material. Also, if there is a way to show slurs connecting to material beyond the fragment, I would appreciate seeing how. Best, Conor Dear Lilypond Community, I am working on a musical example for a paper, and I am in need of some assistance. It started out longer and even more complicated, but I deleted a few measures, but when I did so, I ended up with staff lines that extend beyond the end of the music, which happens mid-measure. The etc… is connected to the last pitches, and the extra length stays when I move it to the left. The example is trying to show how the same material in the first bar goes to different material. Also, if there is a way to show slurs connecting to material beyond the fragment, I would appreciate seeing how. Best, Conor ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Extra Staff length
Hi, On Thu, Mar 27, 2014 at 10:08 AM, Phil Holmes m...@philholmes.net wrote: I presume Lily will take any text moved to the right of the music as continuing music and surround it with staves. You could either move the text back to the left (why the \override TextScript.outside-staff-priority = ##f which causes a collision with the chord?) or try \stopStaff. You might move the text to where you want it by first placing it where the staff length is unaffected, then overriding TextScript.extra-offset. This leaves the layout unchanged. --David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
acciaccatura before barline
Hi all, consider the attached image. Apart from the problematic slur which I don't want to deal with right now, how can I typeset the acciaccatura _before_ the barline. I was thinking of hacking something with \afterGrace, but that's not what it is. Thanks Urs attachment: spin2.png___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: acciaccatura before barline
On Thu, 27 Mar 2014 17:16:51 +0100 Urs Liska u...@openlilylib.org wrote: Hi all, consider the attached image. Apart from the problematic slur which I don't want to deal with right now, how can I typeset the acciaccatura _before_ the barline. I was thinking of hacking something with \afterGrace, but that's not what it is. But that is what it is. The legatura (slur) should attach to a previous something in the previous measure if you want the grace before the beat. If that is not what you mean, omit the legatura and just use small notes. What you want would have notes before the beat which the legatura mark indicates to be played on the beat. That is a self-contradiction, and therefore ambiguous. Regards, Rale -- For All Guitar Beginners: The pages of very easy solos missing from all of the published guitar methods of others. For All Guitarists: solos, duets, and peerless guitar exercises David Raleigh Arnold http://www.openguitar.com ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Printing Title Pages; has it been a thought?
On Wed, 26 Mar 2014 17:31:29 -0500 Joshua Nichols josh.d.nich...@gmail.com wrote: I am curious overall on what might be a useful enhancement: Has anyone thought about writing a permanent title page feature for lilypond? You know, something that I could invoke through the paper block? I suggested this in the Jurassic to the folks at Mutopia, but there was no interest then. I think that a title page, copyright page, and cover choices would also be useful options. Regards, Rale -- For All Guitar Beginners: The pages of very easy solos missing from all of the published guitar methods of others. For All Guitarists: solos, duets, and peerless guitar exercises David Raleigh Arnold http://www.openguitar.com ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: acciaccatura before barline
Urs Liska u...@openlilylib.org writes: Hi all, consider the attached image. Apart from the problematic slur which I don't want to deal with right now, how can I typeset the acciaccatura _before_ the barline. I was thinking of hacking something with \afterGrace, but that's not what it is. Well, here is a bit of a cheat: { r1 \acciaccatura { \bar a8 b \bar | } c'1 } -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: acciaccatura before barline
Is that really true? I've seen this notation regularly. What the composers seem to intend - and what is easily understood - is that the slur indicates that the grpup logically belongs to the _next_ note while the position before the barline tells to okay _before_ the beat. David Raleigh Arnold d...@openguitar.com schrieb am 27.03.2014: On Thu, 27 Mar 2014 17:16:51 +0100 Urs Liska u...@openlilylib.org wrote: Hi all, consider the attached image. Apart from the problematic slur which I don't want to deal with right now, how can I typeset the acciaccatura _before_ the barline. I was thinking of hacking something with \afterGrace, but that's not what it is. But that is what it is. The legatura (slur) should attach to a previous something in the previous measure if you want the grace before the beat. If that is not what you mean, omit the legatura and just use small notes. What you want would have notes before the beat which the legatura mark indicates to be played on the beat. That is a self-contradiction, and therefore ambiguous. Regards, Rale -- Diese Nachricht wurde mit a href=https://play.google.com/store/apps/details?id=com.onegravity.k10.pro2;bK-@ Mail/b/a gesendet.___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: acciaccatura before barline
Elaine Gould writes: Grace notes sounding on the beat should always be placed after the barline. However, a group of three or more grace notes sounding before the beat may go before the barline so that the first beat of the following bar is not pushed too far from the barline. (Behind Bars, p. 127). However, to avoid ambiguity it is recommended to specify how the grace notes should be performed, eg. All grace notes to be performed before/on the beat. As for slurs, she advises slurring to the following measured value provided that this is the intended articulation. Kurt Stone (Music Notation in the Twentieth Century, p. 22) seems to recommend omitting the slur entirely, and adding a staccato dot if the grace note(s) should be detached. On 27 March 2014 18:22, Urs Liska u...@openlilylib.org wrote: Is that really true? I've seen this notation regularly. What the composers seem to intend - and what is easily understood - is that the slur indicates that the grpup logically belongs to the _next_ note while the position before the barline tells to okay _before_ the beat. David Raleigh Arnold d...@openguitar.com schrieb am 27.03.2014: On Thu, 27 Mar 2014 17:16:51 +0100 Urs Liska u...@openlilylib.org wrote: Hi all, consider the attached image. Apart from the problematic slur which I don't want to deal with right now, how can I typeset the acciaccatura _before_ the barline. I was thinking of hacking something with \afterGrace, but that's not what it is. But that is what it is. The legatura (slur) should attach to a previous something in the previous measure if you want the grace before the beat. If that is not what you mean, omit the legatura and just use small notes. What you want would have notes before the beat which the legatura mark indicates to be played on the beat. That is a self-contradiction, and therefore ambiguous. Regards, Rale -- Diese Nachricht wurde mit *K-@ Mail*https://play.google.com/store/apps/details?id=com.onegravity.k10.pro2gesendet. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user -- David Stephen Grant da...@davidgrant.no www.davidgrant.no Phone: (+47) 918 14 276 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [SPAM] Re: acciaccatura before barline
Thanks, that's clarifying. Abs confirming that my model's notation is correct. David Stephen Grant da...@davidgrant.no schrieb am 27.03.2014: Elaine Gould writes: Grace notes sounding on the beat should always be placed after the barline. However, a group of three or more grace notes sounding before the beat may go before the barline so that the first beat of the following bar is not pushed too far from the barline. (Behind Bars, p. 127). However, to avoid ambiguity it is recommended to specify how the grace notes should be performed, eg. All grace notes to be performed before/on the beat. As for slurs, she advises slurring to the following measured value provided that this is the intended articulation. Kurt Stone (Music Notation in the Twentieth Century, p. 22) seems to recommend omitting the slur entirely, and adding a staccato dot if the grace note(s) should be detached. On 27 March 2014 18:22, Urs Liska u...@openlilylib.org wrote: Is that really true? I've seen this notation regularly. What the composers seem to intend - and what is easily understood - is that the slur indicates that the grpup logically belongs to the _next_ note while the position before the barline tells to okay _before_ the beat. David Raleigh Arnold d...@openguitar.com schrieb am 27.03.2014: On Thu, 27 Mar 2014 17:16:51 +0100 Urs Liska u...@openlilylib.org wrote: Hi all, consider the attached image. Apart from the problematic slur which I don't want to deal with right now, how can I typeset the acciaccatura _before_ the barline. I was thinking of hacking something with \afterGrace, but that's not what it is. But that is what it is. The legatura (slur) should attach to a previous something in the previous measure if you want the grace before the beat. If that is not what you mean, omit the legatura and just use small notes. What you want would have notes before the beat which the legatura mark indicates to be played on the beat. That is a self-contradiction, and therefore ambiguous. Regards, Rale -- Diese Nachricht wurde mit *K-@ Mail*https://play.google.com/store/apps/details?id=com.onegravity.k10.pro2gesendet. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user -- Diese Nachricht wurde mit a href=https://play.google.com/store/apps/details?id=com.onegravity.k10.pro2;bK-@ Mail/b/a gesendet.___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [SPAM] Re: acciaccatura before barline
Thanks, that's clarifying. Abs confirming that my model's notation is correct. David Stephen Grant da...@davidgrant.no schrieb am 27.03.2014: Elaine Gould writes: Grace notes sounding on the beat should always be placed after the barline. However, a group of three or more grace notes sounding before the beat may go before the barline so that the first beat of the following bar is not pushed too far from the barline. (Behind Bars, p. 127). However, to avoid ambiguity it is recommended to specify how the grace notes should be performed, eg. All grace notes to be performed before/on the beat. As for slurs, she advises slurring to the following measured value provided that this is the intended articulation. Kurt Stone (Music Notation in the Twentieth Century, p. 22) seems to recommend omitting the slur entirely, and adding a staccato dot if the grace note(s) should be detached. On 27 March 2014 18:22, Urs Liska u...@openlilylib.org wrote: Is that really true? I've seen this notation regularly. What the composers seem to intend - and what is easily understood - is that the slur indicates that the grpup logically belongs to the _next_ note while the position before the barline tells to okay _before_ the beat. David Raleigh Arnold d...@openguitar.com schrieb am 27.03.2014: On Thu, 27 Mar 2014 17:16:51 +0100 Urs Liska u...@openlilylib.org wrote: Hi all, consider the attached image. Apart from the problematic slur which I don't want to deal with right now, how can I typeset the acciaccatura _before_ the barline. I was thinking of hacking something with \afterGrace, but that's not what it is. But that is what it is. The legatura (slur) should attach to a previous something in the previous measure if you want the grace before the beat. If that is not what you mean, omit the legatura and just use small notes. What you want would have notes before the beat which the legatura mark indicates to be played on the beat. That is a self-contradiction, and therefore ambiguous. Regards, Rale -- Diese Nachricht wurde mit *K-@ Mail*https://play.google.com/store/apps/details?id=com.onegravity.k10.pro2gesendet. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user -- Diese Nachricht wurde mit a href=https://play.google.com/store/apps/details?id=com.onegravity.k10.pro2;bK-@ Mail/b/a gesendet.___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [SPAM] Re: acciaccatura before barline
Thanks, that's clarifying. Abs confirming that my model's notation is correct. David Stephen Grant da...@davidgrant.no schrieb am 27.03.2014: Elaine Gould writes: Grace notes sounding on the beat should always be placed after the barline. However, a group of three or more grace notes sounding before the beat may go before the barline so that the first beat of the following bar is not pushed too far from the barline. (Behind Bars, p. 127). However, to avoid ambiguity it is recommended to specify how the grace notes should be performed, eg. All grace notes to be performed before/on the beat. As for slurs, she advises slurring to the following measured value provided that this is the intended articulation. Kurt Stone (Music Notation in the Twentieth Century, p. 22) seems to recommend omitting the slur entirely, and adding a staccato dot if the grace note(s) should be detached. On 27 March 2014 18:22, Urs Liska u...@openlilylib.org wrote: Is that really true? I've seen this notation regularly. What the composers seem to intend - and what is easily understood - is that the slur indicates that the grpup logically belongs to the _next_ note while the position before the barline tells to okay _before_ the beat. David Raleigh Arnold d...@openguitar.com schrieb am 27.03.2014: On Thu, 27 Mar 2014 17:16:51 +0100 Urs Liska u...@openlilylib.org wrote: Hi all, consider the attached image. Apart from the problematic slur which I don't want to deal with right now, how can I typeset the acciaccatura _before_ the barline. I was thinking of hacking something with \afterGrace, but that's not what it is. But that is what it is. The legatura (slur) should attach to a previous something in the previous measure if you want the grace before the beat. If that is not what you mean, omit the legatura and just use small notes. What you want would have notes before the beat which the legatura mark indicates to be played on the beat. That is a self-contradiction, and therefore ambiguous. Regards, Rale -- Diese Nachricht wurde mit *K-@ Mail*https://play.google.com/store/apps/details?id=com.onegravity.k10.pro2gesendet. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user -- Diese Nachricht wurde mit a href=https://play.google.com/store/apps/details?id=com.onegravity.k10.pro2;bK-@ Mail/b/a gesendet.___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Lyrics: \set associatedVoice
Hello, I've got a problem: I'm typesetting a Brahms lied where some melismata are only for one stanza and not for the other. Now look at the following example (output attached): \version 2.19.3 \new Staff \new Voice = one { \voiceOne c'4 c' c'8 c' c'4 } \new Voice = two { \voiceTwo s4 s c' s } \new Lyrics \lyricsto one { foo \set associatedVoice = two foo \set associatedVoice = one bar bar } The associated voice has to be set one syllable early, which I did, only the lyrics come back to voice one one note early: it should be for the last quaver and not for the second crotchet. It seems to me that the roots of this problem lie very deep. An optimal fix would of course be to make the effect of \set associatedVoice enter immediately rather than one syllable later, but this is probably far away. Can anyone think of a workaround? In case someone might ask why this is necessary, I attach what I already have of the entire lied also. The \makeOctaves function is from LSR 445 http://lsr.di.unimi.it/LSR/Snippet?id=445 and I added it to scm/music-functions.scm or a similar one in order to always have it at hand. Best regards, Simon associatedVoice problem.pdf Description: Adobe PDF document \version 2.19.3 \language deutsch #(set-global-staff-size 18) %{ \satzspiegel definiert das Seiten- verhältnis des Satzspiegels (Zeilenlänge:Satzspiegelhöhe). % topMarginFactor ist das Verhältnis oberer Rand:Papierhöhe. % Es wird so berechnet, dass: %%% die oberen Ecken des Satz- spiegels auf den Diagonalen gedachter Doppelseiten %%% und die unteren Ecken auf den Diagonalen der Einzelseite liegen. % Daraus folgt bei DIN-Papier- formaten, dass das Satzspiegelseiten- verhältnis Zeilenlänge:Satzspiegel- höhe gröÃer als 1:1,414⦠(Wurzel aus 2) sein muss, und zwar je breiter die Seitenränder, desto mehr. %} satzspiegel = #'(2 . 3) % Standard 2/3 % Varianten: kleiner sind 5/8 und 3/5 topMarginFactor = #( / (- (cdr satzspiegel) (* (car satzspiegel) (sqrt 2))) (- (* 4 (cdr satzspiegel)) (* 3 (car satzspiegel) (sqrt 2))) ) \paper { #(set-paper-size a4) two-sided = ##f top-margin = #(* paper-height topMarginFactor) % In den folgenden Verhältnissen % steckt wohl die Qualität % dieser Konstruktionsweise⦠bottom-margin = #(* top-margin 2) left-margin = #(* top-margin (sqrt 2)) right-margin = #(* top-margin (sqrt 2)) fonts = #(make-pango-font-tree Linux Libertine O Linux Biolinum O Ubuntu Mono (/ (* staff-height pt) 2.5)) } \header { title = Es wohnet ein Fiedler composer = Johannes Brahms (1833â1897) piece = Original in a opus = WoO 33, Nr. 36 } \layout { \context { \Score \remove Bar_number_engraver } \context { \Voice \override TextScript.whiteout = ##t \override TextScript.layer = 5 \consists Melody_engraver \override Stem #'neutral-direction = #'() } } ru = #(define-music-function (parser location num mus) (number? ly:music?) #{ \repeat unfold $num $mus #} ) leftLyr = \once\override LyricText.self-alignment-X = #LEFT diff = #(define-music-function (parser location mus1 mus2) (ly:music? ly:music?) #{ { \voiceOne $mus1 \oneVoice } \context Voice = aux { \voiceTwo $mus2 } #} ) alt = #(define-music-function (parser location lyr) (ly:music?) #{ \set associatedVoice = aux $lyr \set associatedVoice = voice #} ) global = { \key c \major \time 4/4 \partial 4 \tempo Lebhaft, doch nicht zu rasch } voice = \transpose a fis \relative c'' { \global \autoBeamOff \repeat volta 2 { e,4 a gis8 gis a4 h8 h c4 h8 a h4 r8 e, a4 gis8 gis a4 h8 h c4 \diff { h8[ a] } { h8 a } h4 e,8 g c4 \diff { c8 c } { c4 } g4 r8 e' e[ d] \diff { d[ c] } { d c } h4 r8 h | c4 \diff { h8[ a] } { h a } gis4 r8 e | \diff { a gis a h c[ h] a } { a[ gis] a[ h] c[ h a] } d | c8[ h] a gis } \alternative { { a4 r | r2 r4 } { a4 r } } R1 r2 r4 \bar .|:-|| %\pageBreak } auxVoice = \relative { \autoBeamOff \repeat volta 2 { s4 s1*8 s2 } \alternative { { s4*5 } { s2 } } s4*7 % st. 3+4 %\repeat volta 2 { s4 s1*9 } %\alternative { { s4*3 } { s4*3 } } } verseOne = \lyricmode { \set stanza = 1. Es woh -- net ein Fied -- ler zu Frank -- furt am Main, der keh -- ret von lus -- ti -- ger Ze -- che heim, und er trat auf den Markt, was schaut er dort, was schaut er dort? Der schö -- nen Frau -- en schmaus -- ten gar viel an dem Ort. \skip 1 } verseTwo = \lyricmode { \set stanza = 2. Du buck -- lich -- ter Fied -- ler, nun fied -- le uns auf, wir wol -- len dir zah -- len des \alt { Loh -- nes } voll -- auf! Ei -- nen
Re: Lyrics: \set associatedVoice
Simon Albrecht simon.albre...@mail.de writes: Hello, I've got a problem: I'm typesetting a Brahms lied where some melismata are only for one stanza and not for the other. Now look at the following example (output attached): \version 2.19.3 \new Staff \new Voice = one { \voiceOne c'4 c' c'8 c' c'4 } \new Voice = two { \voiceTwo s4 s c' s } \new Lyrics \lyricsto one { foo \set associatedVoice = two foo \set associatedVoice = one bar bar } The associated voice has to be set one syllable early, which I did, only the lyrics come back to voice one one note early: it should be for the last quaver and not for the second crotchet. It seems to me that the roots of this problem lie very deep. An optimal fix would of course be to make the effect of \set associatedVoice enter immediately rather than one syllable later, but this is probably far away. Can anyone think of a workaround? Just keep the same associated voice throughout for the variant with most syllables, flipping it between \voiceOne, \voiceTwo and \oneVoice as needed. I lean towards not using \lyricsto here but just placing the durations in the lyrics. That makes the timing unproblematic and robust against slurs/beams/whatever, saving a lot of fiddling. Maybe a cute LSR entry would be a Lyric_time_translator which is placed in a lyricsto-governed context and then writes out the source file with proper durations in all its lyrics so that you can then use this and drop the lyricsto. Then you need to get only one stanza synchronized at a time... Associated voices still are good for not just aligning on the time but note values. In case someone might ask why this is necessary, I attach what I already have of the entire lied also. The \makeOctaves function is from LSR 445 http://lsr.di.unimi.it/LSR/Snippet?id=445 and I added it to scm/music-functions.scm or a similar one in order to always have it at hand. Non-compilable examples are a nuisance. You can just add makeOctaves = #(define-music-function (parser location oct mus) (integer? ly:music?) (make-relative (mus) mus #{ \transpose c' $(ly:make-pitch oct 0 0) $mus $mus #})) to the code. As opposed to LSR445, it should work fine with chords and also absolute music. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Extra Staff length
On Mar 27, 2014, at 10:15 AM, David Nalesnik david.nales...@gmail.com wrote: You might move the text to where you want it by first placing it where the staff length is unaffected, then overriding TextScript.extra-offset. This leaves the layout unchanged. I’m not entirely sure I follow (I’ve only been using this since February, which also explains the embarrassing file structure). ~Conor Cook ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user