transposing cues
(I have looked this up in the NR) Should I be able transpose a part including the cues (or quotes)? \version "2.19.2" partB = \relative c' { \transposition f \key g \major c'1 d e } \addQuote qb \partB partA = \relative c' { \transposition c' \cueDuring qb #down R1 b'1 c } \score{ \new StaffGroup << \new Staff \new Voice \partB \new Staff \new Voice \partA \new Staff \new Voice \transpose f c' \partA >> } How I can I get the first note in the third staff to be a C above middle C? Thanks for any ideas or corrections of any mistaken understandings I may have. Paul ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: consolidate code
Hi, David: Thank you for your patience and the modified solfege-engraver. Now that you mention David Kastrup I remember reading his presentation (long time ago) and copy his code and adapted for my use. Thanks for you help. Emmanuel, Ming. On Tuesday, February 11, 2014 8:25:53 PM, David Nalesnik wrote: Hi Ming, On Tue, Feb 11, 2014 at 7:13 PM, MING TSANG wrote: Hi, David: I cut & paste http://www.mail-archive.com/address@hidden/msg73062.html >but I got >Not Found >The document you were looking for was not found. Hmm. That's something I don't fully understand. I see the address differently in the email I sent you. It's not hidden. Anyway--you could just search a few meaningful terms. For example, I just tried "newgrob ming engraver lilypond" with Google and I got to David Kastrup's talk where he originally created the engraver. Best, David___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: consolidate code
On Tue, Feb 11, 2014 at 7:49 PM, MING TSANG wrote: > David, > Thank you very much. Now that I have a clean function instead of duplicate > code in the same file for minor difference - what a life-saver. > Emmanuel, > Ming. > Glad I could help! --David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: consolidate code
David, Thank you very much. Now that I have a clean function instead of duplicate code in the same file for minor difference - what a life-saver. Emmanuel, Ming. On Tuesday, February 11, 2014 8:08:48 PM, David Nalesnik wrote: Hi Ming, On Tue, Feb 11, 2014 at 4:28 PM, MING TSANG wrote: Hi all, >I further reduce the code to 53 lines. line 4 - 20 & line 24 - 40 are >identical except line 14 vs line 34. The actual code for notes is only 8 >lines ( 45 - 52). I think I cannot reduce anymore in order to show my problem >and request. Thank you for cutting this down further. I suspect you could cut down the musical example still further, because all you need to show is inconsistent placement of numbers vs. syllables. Again to ask: >problem 1: I am expecting all numbers (jianpu) on top of the letters (solfege) >- on bar 1 and bar 3 they are reversed; is it possible to solve? Yes. You simply need to override TextScript.outside-staff-priority for one of the voices. See attached. request 2: Is it possible to combine lins 4-20 & lines 24-40 into one define variable so that line 14 and line 34 can be access by parameter or by if statement? Yes. Here I took the liberty of using your original file, since it's easy enough to condense everything there and I assume that's still your goal. See the attached file. Best, David___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: consolidate code
Hi Ming, On Tue, Feb 11, 2014 at 7:13 PM, MING TSANG wrote: > > Hi, David: I cut & paste > http://www.mail-archive.com/address@hidden/msg73062.html > > but I got > > Not Found > The document you were looking for was not found. > Hmm. That's something I don't fully understand. I see the address differently in the email I sent you. It's not hidden. Anyway--you could just search a few meaningful terms. For example, I just tried "newgrob ming engraver lilypond" with Google and I got to David Kastrup's talk where he originally created the engraver. Best, David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: consolidate code
David Nalesnik-2 wrote >Hi, > > >On Tue, Feb 11, 2014 at 3:35 PM, Phil Holmes < >mail@ >> wrote: >> >> OK - so this "tiny" example is 107 lines of code. >> >> >> >> - >Original Message - >> *From:* MING TSANG < >tsang94@ >> >> *To:* >-Eluze < >eluzew@ >> ; lilypond-user mailinglist< >lilypond-user@ >>> >> *Sent:* Tuesday, February 11, 2014 9:07 PM >> *Subject:* Re: >consolidate code >> >> *From*: Eluze *Subject*: Re: consolidate code *Date*: >Tue, 11 Feb 2014 >> 11:57:54 -0800 (PST) >> -- >> >>> MING TSANG wrote >> >* I hope the attached .ly file qualifies as tiny >snippet.* >> >> >>certainly not - please reduce it to one or two notes to show >the >> >>unexpected >> >>behavior, and define clearly what you'd expect! >> >> >In this case, I think that there might be a misunderstanding. Cutting >> the >>example down further wouldn't convey one of the problems the OP is having, >I >think. Namely, that the .ly file contains a function which he has had >to >repeat several times for the sake of tiny modifications. He's wondering >if >it can be expressed more simply as a function that takes arguments to cut >down on the repetition. > >Unfortunately, I'm not at a machine where I can help at the moment. > >Best, >David > >P.S. @Ming: I found the source of your code very rapidly with a simple >search: http://www.mail-archive.com/ >lilypond-user@ >/msg73062.html I think that's not an answer to what I asked for, namely /please reduce it to one or two notes to show the problem.../ nothing against functions in the background - but it doesn't make sense to include functions which are not used in the incriminated code - otherwise you could include the whole LilyPond code for each report... Eluze Hi, Eluze: I cut down couple notes. To my best I cannot cut down anymore. As David has said, I cannot cut down amore in order to show my problem. I had coded variables (or functions) and I do use in my tiny sample. Please note line 49 and line 50 which use \xup \nup (defined in line 20 & 40 respectively). Sorry for all the trouble I cause. Hi, David: I cut & paste http://www.mail-archive.com/address@hidden/msg73062.html but I got Not Found The document you were looking for was not found. Emmanuel, Ming \version "2.19.2" solfegeUP = #(make-engraver (acknowledgers ((note-head-interface engraver grob source) (let* ( (context (ly:translator-context engraver)) (tonic-pitch (ly:context-property context 'tonic)) (tonic-index (ly:pitch-notename tonic-pitch)) (event (ly:grob-property grob 'cause)) (grob-pitch (ly:event-property event 'pitch)) (grob-index (ly:pitch-notename grob-pitch)) (delta (modulo (- grob-index tonic-index) 7)) (name (list-ref '("do" "re" "mi" "fa" "so" "la" "ti") delta)) (newgrob (ly:engraver-make-grob engraver 'TextScript event))) (if (string= name "Hb") (set! name "B")) (set! (ly:grob-property newgrob 'text) name) (set! (ly:grob-property newgrob 'direction) UP) xup=\with { \consists #solfegeUP } %% numbrUP = #(make-engraver (acknowledgers ((note-head-interface engraver grob source) (let* ( (context (ly:translator-context engraver)) (tonic-pitch (ly:context-property context 'tonic)) (tonic-index (ly:pitch-notename tonic-pitch)) (event (ly:grob-property grob 'cause)) (grob-pitch (ly:event-property event 'pitch)) (grob-index (ly:pitch-notename grob-pitch)) (delta (modulo (- grob-index tonic-index) 7)) (name (list-ref '("1" "2" "3" "4" "5" "6" "7") delta)) (newgrob (ly:engraver-make-grob engraver 'TextScript event))) (if (string= name "Hb") (set! name "B")) (set! (ly:grob-property newgrob 'text) name) (set! (ly:grob-property newgrob 'direction) UP) nup=\with { \consists #numbrUP } % soprano = { a'1 g'1 | g'4 r4 g'4 s4 | f'1 } alto = { f'1 e'1 | e'2 e'2 | c'1|} \new Staff { << \new Voice = "soprano" \xup { \voiceOne \soprano } \new Voice = "alto" \nup { \voiceTwo \alto } >> } test_num-solfege(3).pdf Description: Adobe PDF document ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: consolidate code
Hi Ming, On Tue, Feb 11, 2014 at 4:28 PM, MING TSANG wrote: > Hi all, > I further reduce the code to 53 lines. line 4 - 20 & line 24 - 40 are > identical except line 14 vs line 34. The actual code for notes is only 8 > lines ( 45 - 52). I think I cannot reduce anymore in order to show my > problem and request. > Thank you for cutting this down further. I suspect you could cut down the musical example still further, because all you need to show is inconsistent placement of numbers vs. syllables. > Again to ask: > problem 1: I am expecting all numbers (jianpu) on top of the letters > (solfege) - on bar 1 and bar 3 they are reversed; is it possible to solve? > Yes. You simply need to override TextScript.outside-staff-priority for one of the voices. See attached. > request 2: Is it possible to combine lins 4-20 & lines 24-40 into one > define variable so that line 14 and line 34 can be access by parameter or > by if statement? > Yes. Here I took the liberty of using your original file, since it's easy enough to condense everything there and I assume that's still your goal. See the attached file. Best, David \version "2.18" #(define syllables '("do" "re" "mi" "fa" "so" "la" "ti")) #(define syls '("d" "r" "m" "f" "s" "l" "t")) #(define numbers '("1" "2" "3" "4" "5" "6" "7")) #(define (solfege-engraver lst dir) (make-engraver (acknowledgers ((note-head-interface engraver grob source) (let* ( (context (ly:translator-context engraver)) (tonic-pitch (ly:context-property context 'tonic)) (tonic-index (ly:pitch-notename tonic-pitch)) (event (ly:grob-property grob 'cause)) (grob-pitch (ly:event-property event 'pitch)) (grob-index (ly:pitch-notename grob-pitch)) (delta (modulo (- grob-index tonic-index) 7)) (name (list-ref lst delta)) (newgrob (ly:engraver-make-grob engraver 'TextScript event))) (if (string= name "Hb") (set! name "B")) (set! (ly:grob-property newgrob 'text) name) (set! (ly:grob-property newgrob 'direction) dir) ) xup = \with { \consists #(solfege-engraver syllables UP) } xdown = \with { \consists #(solfege-engraver syllables DOWN) } zup= \with { \consists #(solfege-engraver syls UP) } zdown= \with { \consists #(solfege-engraver syls DOWN) } nup= \with { \consists #(solfege-engraver numbers UP) } ndown= \with { \consists #(solfege-engraver numbers DOWN) } % soprano = { g'1 | g'4 g'8.g'16 a'2 | f'1 } alto = { e'1 | e'2 e'2 | c'1| } \new Staff { << \new Voice = "soprano" \xup { \override TextScript.outside-staff-priority = 1000 \textLengthOn % make room for text! \voiceOne \soprano } \new Voice = "alto" \nup { \voiceTwo \alto } >> }___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: consolidate code
David Nalesnik-2 wrote > Hi, > > > On Tue, Feb 11, 2014 at 3:35 PM, Phil Holmes < > mail@ > > wrote: > >> OK - so this "tiny" example is 107 lines of code. >> >> >> >> - Original Message - >> *From:* MING TSANG < > tsang94@ > > >> *To:* -Eluze < > eluzew@ > > ; lilypond-user mailinglist< > lilypond-user@ > > >> *Sent:* Tuesday, February 11, 2014 9:07 PM >> *Subject:* Re: consolidate code >> >> *From*: Eluze *Subject*: Re: consolidate code *Date*: Tue, 11 Feb 2014 >> 11:57:54 -0800 (PST) >> -- >> >> MING TSANG wrote >> >* I hope the attached .ly file qualifies as tiny snippet.* >> >> >>certainly not - please reduce it to one or two notes to show the >> >>unexpected >> >>behavior, and define clearly what you'd expect! >> >> In this case, I think that there might be a misunderstanding. Cutting >> the > example down further wouldn't convey one of the problems the OP is having, > I think. Namely, that the .ly file contains a function which he has had > to > repeat several times for the sake of tiny modifications. He's wondering > if > it can be expressed more simply as a function that takes arguments to cut > down on the repetition. > > Unfortunately, I'm not at a machine where I can help at the moment. > > Best, > David > > P.S. @Ming: I found the source of your code very rapidly with a simple > search: http://www.mail-archive.com/ > lilypond-user@ > /msg73062.html I think that's not an answer to what I asked for, namely /please reduce it to one or two notes to show the problem.../ nothing against functions in the background - but it doesn't make sense to include functions which are not used in the incriminated code - otherwise you could include the whole LilyPond code for each report... Eluze -- View this message in context: http://lilypond.1069038.n5.nabble.com/consolidate-code-tp159125p159132.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: consolidate code
Hi all, I further reduce the code to 53 lines. line 4 - 20 & line 24 - 40 are identical except line 14 vs line 34. The actual code for notes is only 8 lines ( 45 - 52). I think I cannot reduce anymore in order to show my problem and request. Again to ask: problem 1: I am expecting all numbers (jianpu) on top of the letters (solfege) - on bar 1 and bar 3 they are reversed; is it possible to solve? request 2: Is it possible to combine lins 4-20 & lines 24-40 into one define variable so that line 14 and line 34 can be access by parameter or by if statement? Emmanuel, Ming. On Tuesday, February 11, 2014 5:00:02 PM, David Nalesnik wrote: Hi, On Tue, Feb 11, 2014 at 3:35 PM, Phil Holmes wrote: >OK - so this "tiny" example is 107 lines of code. > >- Original Message - >>From: MING TSANG >>To: -Eluze ; lilypond-user mailinglist >>Sent: Tuesday, February 11, 2014 9:07 PM >>Subject: Re: consolidate code >> >> >>From: Eluze >>Subject: Re: consolidate code >>Date: Tue, 11 Feb 2014 11:57:54 -0800 (PST) >> >> >>MING TSANG wrote >I hope the attached .ly file qualifies as tiny snippet. >>certainly not - >please reduce it to one or two notes to show the >>unexpected >>behavior, and define clearly what you'd expect! In this case, I think that there might be a misunderstanding. Cutting the example down further wouldn't convey one of the problems the OP is having, I think. Namely, that the .ly file contains a function which he has had to repeat several times for the sake of tiny modifications. He's wondering if it can be expressed more simply as a function that takes arguments to cut down on the repetition. Unfortunately, I'm not at a machine where I can help at the moment. Best, David P.S. @Ming: I found the source of your code very rapidly with a simple search: http://www.mail-archive.com/lilypond-user@gnu.org/msg73062.html\version "2.19.2" %\include "include_solfege.ly" % \new Satff \with { \consists | #solfegeUP | #solfegeU | #solfegeDOWNN | #solfegeD } OR \zup \xup xdown zdown solfegeUP = #(make-engraver (acknowledgers ((note-head-interface engraver grob source) (let* ( (context (ly:translator-context engraver)) (tonic-pitch (ly:context-property context 'tonic)) (tonic-index (ly:pitch-notename tonic-pitch)) (event (ly:grob-property grob 'cause)) (grob-pitch (ly:event-property event 'pitch)) (grob-index (ly:pitch-notename grob-pitch)) (delta (modulo (- grob-index tonic-index) 7)) (name (list-ref '("do" "re" "mi" "fa" "so" "la" "ti") delta)) (newgrob (ly:engraver-make-grob engraver 'TextScript event))) (if (string= name "Hb") (set! name "B")) (set! (ly:grob-property newgrob 'text) name) (set! (ly:grob-property newgrob 'direction) UP) xup=\with { \consists #solfegeUP } %% % \include "include_numbrs.ly" % \new Staff \with { \consists #numbrUP }#nmubrDOWN OR \nup \ndown numbrUP = #(make-engraver (acknowledgers ((note-head-interface engraver grob source) (let* ( (context (ly:translator-context engraver)) (tonic-pitch (ly:context-property context 'tonic)) (tonic-index (ly:pitch-notename tonic-pitch)) (event (ly:grob-property grob 'cause)) (grob-pitch (ly:event-property event 'pitch)) (grob-index (ly:pitch-notename grob-pitch)) (delta (modulo (- grob-index tonic-index) 7)) (name (list-ref '("1" "2" "3" "4" "5" "6" "7") delta)) (newgrob (ly:engraver-make-grob engraver 'TextScript event))) (if (string= name "Hb") (set! name "B")) (set! (ly:grob-property newgrob 'text) name) (set! (ly:grob-property newgrob 'direction) UP) nup=\with { \consists #numbrUP } % soprano = { g'1 | g'4 g'8.g'16 a'2 | f'1 } alto = { e'1 | e'2 e'2 | c'1|} \new Staff { << \new Voice = "soprano" \xup { \voiceOne \soprano } \new Voice = "alto" \nup { \voiceTwo \alto } >> } test_num-solfege(2).pdf Description: Adobe PDF document ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: New try with lyric extender
Hi David, sorry for replying so late. Thanks a lot for your help. I'll try to see if I can do something on this topic, and I'll keep the list updated if I get to something working (or not working...) Yann ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: consolidate code
Hi, On Tue, Feb 11, 2014 at 3:35 PM, Phil Holmes wrote: > OK - so this "tiny" example is 107 lines of code. > > > > - Original Message - > *From:* MING TSANG > *To:* -Eluze ; lilypond-user > mailinglist > *Sent:* Tuesday, February 11, 2014 9:07 PM > *Subject:* Re: consolidate code > > *From*: Eluze *Subject*: Re: consolidate code *Date*: Tue, 11 Feb 2014 > 11:57:54 -0800 (PST) > -- > > MING TSANG wrote > >* I hope the attached .ly file qualifies as tiny snippet.* > > >>certainly not - please reduce it to one or two notes to show the > unexpected > >>behavior, and define clearly what you'd expect! > > In this case, I think that there might be a misunderstanding. Cutting the example down further wouldn't convey one of the problems the OP is having, I think. Namely, that the .ly file contains a function which he has had to repeat several times for the sake of tiny modifications. He's wondering if it can be expressed more simply as a function that takes arguments to cut down on the repetition. Unfortunately, I'm not at a machine where I can help at the moment. Best, David P.S. @Ming: I found the source of your code very rapidly with a simple search: http://www.mail-archive.com/lilypond-user@gnu.org/msg73062.html ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: consolidate code
OK - so this "tiny" example is 107 lines of code. I don't believe this is the absolute minimum that this can be reduced to to make the point - it's too complex for me to understand. If you want help with this it's your job (not anyone else's) to reduce it to the absolute minimum that shows the problem. Please do that, and then hope that someone can help. We're looking for code of something like 10 lines maximum, not over 100. -- Phil Holmes - Original Message - From: MING TSANG To: -Eluze ; lilypond-user mailinglist Sent: Tuesday, February 11, 2014 9:07 PM Subject: Re: consolidate code From: Eluze Subject: Re: consolidate code Date: Tue, 11 Feb 2014 11:57:54 -0800 (PST) -- MING TSANG wrote > I hope the attached .ly file qualifies as tiny snippet. >>certainly not - please reduce it to one or two notes to show the >>unexpected >>behavior, and define clearly what you'd expect!I reduce the six variables to >>three; six bars note to 3 bars. I want to demonstrate the problem and what I >>expect. I expect all numbers on top of solfege ( s, so; f, fa). > Any help or suggestion is appreciated. I don't know scheme code. I do not > under what the code is doing except they display numbers or solfege. >>you could at least specify where the code you use is coming from!I don't >>recall where and when I got the original code. It was since v2.15 not v1.15 >>as I mention on my original post. >>thanks! >>EluzeHere is the revise .ly and .pdf -- ___ 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: consolidate code
From: Eluze Subject: Re: consolidate code Date: Tue, 11 Feb 2014 11:57:54 -0800 (PST) MING TSANG wrote >I hope the attached .ly file qualifies as tiny snippet. >>certainly not - >please reduce it to one or two notes to show the >>unexpected >>behavior, and define clearly what you'd expect! I reduce the six variables to three; six bars note to 3 bars. I want to demonstrate the problem and what I expect. I expect all numbers on top of solfege ( s, so; f, fa). >Any help or suggestion is appreciated. I don't know scheme code. I do not >under what the code is doing except they display numbers or solfege. >>you could at least specify where the code you use is coming from! I don't recall where and when I got the original code. It was since v2.15 not v1.15 as I mention on my original post. >>thanks! >>Eluze Here is the revise .ly and .pdf \version "2.19.2" %\include "include_solfege.ly" % \new Satff \with { \consists | #solfegeUP | #solfegeU | #solfegeDOWNN | #solfegeD } OR \zup \xup xdown zdown solfegeUP = #(make-engraver (acknowledgers ((note-head-interface engraver grob source) (let* ( (context (ly:translator-context engraver)) (tonic-pitch (ly:context-property context 'tonic)) (tonic-index (ly:pitch-notename tonic-pitch)) (event (ly:grob-property grob 'cause)) (grob-pitch (ly:event-property event 'pitch)) (grob-index (ly:pitch-notename grob-pitch)) (delta (modulo (- grob-index tonic-index) 7)) (name (list-ref '("do" "re" "mi" "fa" "so" "la" "ti") delta)) (newgrob (ly:engraver-make-grob engraver 'TextScript event))) (if (string= name "Hb") (set! name "B")) (set! (ly:grob-property newgrob 'text) name) (set! (ly:grob-property newgrob 'direction) UP) xup=\with { \consists #solfegeUP } solfegeU = #(make-engraver (acknowledgers ((note-head-interface engraver grob source) (let* ( (context (ly:translator-context engraver)) (tonic-pitch (ly:context-property context 'tonic)) (tonic-index (ly:pitch-notename tonic-pitch)) (event (ly:grob-property grob 'cause)) (grob-pitch (ly:event-property event 'pitch)) (grob-index (ly:pitch-notename grob-pitch)) (delta (modulo (- grob-index tonic-index) 7)) (name (list-ref '("d" "r" "m" "f" "s" "l" "t") delta)) (newgrob (ly:engraver-make-grob engraver 'TextScript event))) (if (string= name "Hb") (set! name "B")) (set! (ly:grob-property newgrob 'text) name) (set! (ly:grob-property newgrob 'direction) UP) zup=\with { \consists #solfegeU } %% % \include "include_numbrs.ly" % \new Staff \with { \consists #numbrUP }#nmubrDOWN OR \nup \ndown numbrUP = #(make-engraver (acknowledgers ((note-head-interface engraver grob source) (let* ( (context (ly:translator-context engraver)) (tonic-pitch (ly:context-property context 'tonic)) (tonic-index (ly:pitch-notename tonic-pitch)) (event (ly:grob-property grob 'cause)) (grob-pitch (ly:event-property event 'pitch)) (grob-index (ly:pitch-notename grob-pitch)) (delta (modulo (- grob-index tonic-index) 7)) (name (list-ref '("1" "2" "3" "4" "5" "6" "7") delta)) (newgrob (ly:engraver-make-grob engraver 'TextScript event))) (if (string= name "Hb") (set! name "B")) (set! (ly:grob-property newgrob 'text) name) (set! (ly:grob-property newgrob 'direction) UP) nup=\with { \consists #numbrUP } % soprano = { g'1 | %m12 g'4 g'8.g'16 a'2 |%m15 f'1 } alto = { e'1 |%m12 e'2 e'2 |%m15 c'1|%m16 } \score { \new Staff \with { } << \new Voice = "soprano" \xup { \voiceOne \soprano } \new Voice = "alto" \nup { \voiceTwo \alto } >> \layout { } } \score { \new Staff \with { } << \new Voice = "soprano" \zup { \voiceOne \soprano } \new Voice = "alto" \nup { \voiceTwo \alto } >> \layout { } } test_num-solfege(1).pdf Description: Adobe PDF document ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: consolidate code
MING TSANG wrote > I hope the attached .ly file qualifies as tiny snippet. certainly not - please reduce it to one or two notes to show the unexpected behavior, and define clearly what you'd expect! > Any help or suggestion is appreciated. I don't know scheme code. I do not > under what the code is doing except they display numbers or solfege. you could at least specify where the code you use is coming from! thanks! Eluze -- View this message in context: http://lilypond.1069038.n5.nabble.com/consolidate-code-tp159125p159126.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: Dynamics over-lapping with bar-lines
I've now had a chance to experiment further with this, and to try the suggestions you have made, which were very helpful. For Dynamic-Text objects, the self-alignment-X = #-1 appears to align the left edge of the dynamic with the left edge of the note; self-alignment-X = #1 aligns the right edge of the dynamic with the right edge of the note. Presumably the default value of 0 aligns the centre of the dynamic mark with the centre of the note. None of this is terribly helpful if one wants consistent, sensible placing of dynamics! However, combining self-alignment-X = #-1 with a small negative value for X-offset gives the kind of result I want: that is, dynamic marks should have their left-edges consistently aligned very slightly to the left of the beginning (i.e. the left-edge) of the first note to which they apply. Using the two variables already mentioned, I can get a consistent, sensible placing for dynamics of different widths, such as "f" and "". However, there is an irritating anomaly, which is that a dynamic in a Dynamics context is not placed in the same horizontal position as one attached to a note in a Staff context. I find that X-offset values of -1 in a Staff context and -0.3 in a Dynamics context produce similar (and, to me, satisfactory) results to each other. How weird is that! I also experimented with setting DynamicText.extra-spacing-width to '(0 . 0). With the default values of the other variables this is not a good solution to the problem of dynamic/bar-line collisions, because it produces an unwanted gap between the bar-line and the first note of the bar if the dynamic mark is a wide one. And with self-alignment-X = #-1 and a small value for X-offset these collisions are probably not going to arise very often, if at all. Thanks again for all your help. David On Tue, 2014-02-04 at 10:45 -0500, Hwaen Ch'uqi wrote: > Greetings David, > > > generally I prefer the left edge of dynamics to be related to the note > > position. But I should like it to be a little further to the left than > > the value of -1 gives. That is a bit of a problem, because the value > > required for a dynamic such as 'f' will be different from that needed by > > a wider marking such as ''. > > > > Is there perhaps a way of specifying where the left edge of the dynamic > > should be in relation to the note? For instance, I might like all > > dynamics to appear about half a note-head's width before the left edge > > of the note-head itself. It is going to get very tedious having > > continually to specify different self-alignment-X values when there are, > > say, alternating 'p' and 'mf' markings. > > Have you tried using decimal numbers with self-alignment-X, as in > numbers between -1 and 0? I am guessing that this will produce what > you want. If I understand things correctly, the self-alignment-X > property, at least in this instance, is calculating relative to the > note. The DynamicText entry of the Internals Reference (Section > 3.1.39) also give X-offset as another changeable property. It will > also move the dynamic text horizontally, though I am not clear what is > its X-parent. > > If you have not yet done it, I would highly recommend looking at > Chapter 4 (and especially sections 4.6 and 4.7) of the Learning > Manual, which will give you an invaluable introduction to tweaking the > output. In particular, you might be interested in 4.7.2 and 4.7.3, > where it is shown how you can minimize typing of tweaks by using > variables and stylesheets. > > > Also, considering that LilyPond is generally so good at avoiding > > collisions, I have been surprised to find that it seems to have no > > objection to printing dynamics and bar-lines on top of one another. Is > > there no way to tell it to avoid these collisions? I would have > > expected avoidance to be the default, with an override to allow > > collisions if that is what is wanted in a particular case. But the > > default appears to be that bar-lines and dynamics pay no regard for each > > other. > > Why the default is, I cannot say. But according to the same entry in > the IR, the extra-spacing-width property is set to #'(+inf.0 . -inf.0) > by default, which I believe means that, in LilyPond's calculations, > the object takes no horizontal space. Changing the elements within the > parentheses to actual numbers should force LilyPond to give it a > horizontal value and thus to place other objects with recognition of > that value. This is my understanding; if I am speaking amiss, please, > anyone, feel free to correct me. > > I hope this helps. > Hwaen Ch'uqi ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Frescobaldi and Colors with LilyPond
Philip Rhoades wrote > Ben, > > Move to Linux? > > Sorry, I just had to . . > > Phil. Phil, I use GNU/Linux but for this project I happened to be on my Windows machine when I noticed the crash. Wilbert Berendsen-4 wrote > op 11-02-14 06:42, SoundsFromSound schreef: >> Hello everyone. >> >> Has anybody ever encountered this crash before? It's happening >> relentlessly >> on Windows 7 x64 bit. I'm currently unable to import /any /color scheme >> into >> Frescobaldi. I've tried running as admin, re-installing the program, >> working >> with other versions of LilyPond; I am unsure how to proceed. >> >> To reproduce, you can try going to Edit --> Preferences --> Colors --> >> "Menu" button and "Import" color scheme. >> >> Does the file selection dialog not appear? **No, the moment I select Import the error pops up. What kind of crash (Internal error message?, Segmentation fault?) **I attached a screenshot showing the error. Did you export a color scheme successfully? **No, I cannot export any color schemes either. Import/Export both show the same crash window. This seems to only happen on Windows, as I can import/export just fine with Linux. (Please use the Frescobaldi mailing list for frescobaldi issues: frescobaldi@) **Sorry, I'll do that next time. - composer | sound designer LilyPond Tutorials (for beginners) --> http://bit.ly/bcl-lilypond -- View this message in context: http://lilypond.1069038.n5.nabble.com/Frescobaldi-and-Colors-with-LilyPond-tp159111p159122.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: Frescobaldi and Colors with LilyPond
op 11-02-14 06:42, SoundsFromSound schreef: Hello everyone. Has anybody ever encountered this crash before? It's happening relentlessly on Windows 7 x64 bit. I'm currently unable to import /any /color scheme into Frescobaldi. I've tried running as admin, re-installing the program, working with other versions of LilyPond; I am unsure how to proceed. To reproduce, you can try going to Edit --> Preferences --> Colors --> "Menu" button and "Import" color scheme. Does the file selection dialog not appear? What kind of crash (Internal error message?, Segmentation fault?) Did you export a color scheme successfully? (Please use the Frescobaldi mailing list for frescobaldi issues: frescoba...@googlegroups.com) Wilbert -- Wilbert Berendsen http://www.wilbertberendsen.nl/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: filenames of png and svg not consistent (fwd)
Martin Tarenskeen writes: > On Tue, 11 Feb 2014, Werner LEMBERG wrote: > >> >> > 01,02,...09,10,11 >> > in case of 11 pages, instead of >> > 1,2,...,9,10,11 (as it is right now) which may result in non-canonic >> > ordering of files. > >> I think this is too smart. Just imagine that you have 99 images >> embedded in a web page. Now add a single image, rerun lilypond, and >> suddenly you have to correct all image names to add another leading >> zero. > > Then maybe always use a 3-digit number 001 ... 999 > That should be sufficient in most cases? If not (!) the user could > probably split the project in separate parts ? > > I have never seen a 1000+ page score ... yet It depends on what you are doing. The preview-latex system http://www.gnu.org/software/auctex/preview-latex> turns each embedded math construct into one page in a PDF or DVI file and papers written by father (Theoretical Physics) routinely take 1000+ of those. LilyPond's documentation uses a similar mechanism though with separate file name bases. If it wanted to employ GhostScript on multiple images in a single run (and that significantly cuts down on execution time), it would likely need to route this through a single file name as well. So at any rate, a 1000+ page document does not need to consist of just a single \score. %d is a simple format supported by basically all tools that allow for autogenerated file names. Stuff like %03d is much more tricky. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re:filenames of png and svg not consistent (fwd)
> Message du 11/02/14 08:45 > De : "Martin Tarenskeen" > A : "lilypond-user mailinglist" > Objet : Re:filenames of png and svg not consistent (fwd) > > > On Tue, 11 Feb 2014, Werner LEMBERG wrote: > > > > > > 01,02,...09,10,11 > > > in case of 11 pages, instead of > > > 1,2,...,9,10,11 (as it is right now) which may result in non-canonic > > > ordering of files. > > > I think this is too smart. Just imagine that you have 99 images > > embedded in a web page. Now add a single image, rerun lilypond, and > > suddenly you have to correct all image names to add another leading > > zero. > > Then maybe always use a 3-digit number 001 ... 999 > That should be sufficient in most cases? If not (!) the user could probably > split the project in separate parts ? > > I have never seen a 1000+ page score ... yet > Might be worth also when outputting more than 9 MIDI files; the only way I found to deal with it was to have one \book (with \bookOutputName) per piece in order to get a decent ordering! Cheers, Jean-Charles ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user