|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
Inline score inside markup - bugs in music alignmentWhen \score is places inside \markuplines block, there are 3 problems:
1) music is not exactly inline (even if resized to fit the height of the text line) but its baseline is always a bit under the baseline of the text at the same line as the following example shows. I was trying to get rid of the staff padding by adding VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0). This helped a lot, but the staff would still need to rise a bit to match the baseline of the text. How this could be done? %begin Lily - Example 1 \version "2.12.2" \markuplines { \wordwrap-lines { the inline music: \score { \new Staff \relative c' { f2( a4) } \layout { \context { \Staff fontSize = #-12 \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0) \override StaffSymbol #'staff-space = #(magstep -12) \override StaffSymbol #'thickness = #(magstep -12) } } } the text continues after the music... } } %end Lily - Example 1 2) if the staff spans over several lines (longer music), then only the first line of the music is shown and the rest is ignored! How can this be corrected? Or is it a genuine bug in LilyPond? %begin Lily - Example 2 \version "2.12.2" \markuplines { \wordwrap-lines { the inline music: \score { \new Staff \relative c' { f2( a4) g \break f2 e} \layout { \context { \Staff fontSize = #-12 \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0) \override StaffSymbol #'staff-space = #(magstep -12) \override StaffSymbol #'thickness = #(magstep -12) } } } the text continues after the music... } } %end Lily - Example 2 3) in the example below I would expect that the music would start in the middle of the line where the text ends, then break and continue at the second line, and at the end of the music, the text should continue again at the same line where the music finished if there is still some place left. This would be a perfect in-line music. However, it is not the case. The music does not start at the same line where the text finished but it starts a new line under. How can I force the music to start at the same line where the text finished? %begin Lily - Example 3 \version "2.12.2" \paper { #(set-paper-size "b6") indent = 0.0 ragged-right = ##t ragged-last = ##t } \markuplines { \wordwrap-lines { the inline music: \score { \new Staff \relative c' { f2( a4) c2( a4) bes2( g'4) f8( e) e4 r d c f e d c b a } \layout { \context { \Staff fontSize = #-12 \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0) \override StaffSymbol #'staff-space = #(magstep -12) \override StaffSymbol #'thickness = #(magstep -12) } } } the text continues after the music... } } %end Lily -Example 3 |
|
|
Re: Inline score inside markup - bugs in music alignmentI was complaining about the music alignment within a markup text line.
After doing some more research on the topic, I discovered that it is really a limitation of Lilypond that it ignores all the systems of the music except the first one when score is inside the markup block. However, an able scheme programmer should be able to implement it easily, as Mats Bengtson pointed out a time ago. So, I am now looking for an able scheme coder to help me. In this thread, a scheme function is shown which (perhaps as a side effect) aligns correctly the staff within the text line! Very beautiful, but again, all the lines of music except the first one are ignored. Is there a way out of this limitation? |
|
|
Re: Inline score inside markup - bugs in music alignment2009/10/29 Jiri Zurek (Prague) <zurek@...>:
> After doing some more research on the topic, I discovered that it is really > a limitation of Lilypond that it ignores all the systems of the music except > the first one when score is inside the markup block. However, an able scheme > programmer should be able to implement it easily, as > http://www.mail-archive.com/lilypond-user@.../msg44780.html Mats > Bengtson pointed out a time ago . So, I am now looking for an able scheme > coder to help me. For some reason, it's not possible to redefine the \score markup command in a .ly file using define-markup-command. If you don't mind amending scm/define-markup-commands.scm, you can try the following tweaks. (define-builtin-markup-command (score layout props score) (ly:score?) music () Change () to ((baseline-skip)) Remove these lines: (paper-system-stencil (vector-ref (ly:paper-score-paper-systems output) 0)) Replace them with the following: (stack-stencils Y DOWN baseline-skip (map paper-system-stencil (vector->list (ly:paper-score-paper-systems output)))) Despite the rudimentary formatting here (you can only set the distance between the systems; paper variables set in \layout will be ignored), I think this would be a useful improvement on the current behaviour, so I'll prepare a patch with these changes. Regards, Neil _______________________________________________ lilypond-user mailing list lilypond-user@... http://lists.gnu.org/mailman/listinfo/lilypond-user |
|
|
Re: Inline score inside markup - bugs in music alignmentDear Neil,
your tweak of the score inside markup is indeed a GREAT improvement. I altered the scm/define-markup-commands.scm according to you suggestion and the score inside markuplines is now split into multiple lines as necessary. Nevertheless, for flawless output, I can see still one problem, regarding the start of the staff. The staff always begins at the start of a new line, leaving the previous line of the text half empty. This is not the case when the music is very short: then it is exactly in-line (i.e. staying at the same line as the surrounding text), but when the music is multi-line, it always tends to start at a new line. This is not so big problem, but when you need justified lines in the markupblock - and you do need justified lines in a top-quality publication - then this will ruin the half-empty line before the score, since the words will be spaced very wide apart (please see the appended example). This is not quite acceptable. Either I would need to let the last text line before the music ragged, or - better - I would need the staff to start exactly at the same line with the text to fill the rest of the half empty line, and only then break to a second line. This would be the most perfect solution. Is this possible, or am I asking too much? Also, please forgive my inability with Lilypond - I did read the documentation for the vertical spacing - but I still did not figure out how to make the systems inside the markuplines block appear closer together. As you can see from the example below, I was trying \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0), also between-system-padding = #0.0 and between-system-space = #0.0 and still, the staves are wider spaced than necessary. At best, the system vertical spacing should imitate the tight spacing of the lines of the surrounding text. Any help appreciated. %begin Lily - Example \version "2.12.2" \markuplines { \justified-lines { the inline music: \vcenter \score { \new Staff \relative c' { \repeat unfold 12 {r4 a d f a d f2} } \layout { indent = 0.0\cm \context { \Staff fontSize = #-12 \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0) \override StaffSymbol #'staff-space = #(magstep -12) \override StaffSymbol #'thickness = #(magstep -12) \remove "Time_signature_engraver" } \context { \Score \remove "Bar_number_engraver" between-system-padding = #0.0 between-system-space = #0.0 } } } the text continues after the music... } } %end Lily - Example
|
|
|
Re: Inline score inside markup - bugs in music alignment"Jiri Zurek (Prague)" <zurek@...> writes:
> your tweak of the score inside markup is indeed a GREAT improvement. I > altered the scm/define-markup-commands.scm according to you suggestion > and the score inside markuplines is now split into multiple lines as > necessary. Nevertheless, for flawless output, I can see still one > problem, regarding the start of the staff. The staff always begins at > the start of a new line, leaving the previous line of the text half > empty. This is not the case when the music is very short: then it is > exactly in-line (i.e. staying at the same line as the surrounding > text), but when the music is multi-line, it always tends to start at a > new line. This is not so big problem, but when you need justified > lines in the markupblock - and you do need justified lines in a > top-quality publication - then this will ruin the half-empty line > before the score, since the words will be spaced very wide apart > (please see the appended example). This is not quite acceptable. In such an arrangement, justified text is simply a bad idea to use. The same problem occurs with typesetting mathematics when writing inline formulas of more than a few characters in length. I would always prefer avoiding music line breaks in text. To make this work not just by accident, ragged-right is better to use than justified text. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@... http://lists.gnu.org/mailman/listinfo/lilypond-user |
|
|
Re: Inline score inside markup - bugs in music alignmentDear David,
thank you for your valuable opinion but, in my case, the text needs to be justified and the music inside markuplines should wrap along the lines of the surrounding text. I am using it for a musicological apparatus accompanying the piece and if the systems of the piece and other texts of the book are well justified, it makes no sense to interrupt the flow with ragged-right apparatus. Imagine, this book will have several hundred pages and hundreds of small musical pieces - liturgical antiphones, each accompanied by the apparatus. It must be justified. I still hope there is a solution for my problem, and I even suspect that it may be again very easy. Imagine, that if you have very short score inside markup, it is already now printed in-line, not at the new line!!! So, the functionality is already present. Therefore, according to my understanding, there might a function in Lilypond which tells: if you encounter a score block which is longer than the empty rest of the line, then jump to a new line. This made sense when there was no break within the score possible. Now, that thanks to Neil we have the score block inside markuplines breakable, the function should be simply disabled. The music would start at the same line with the text and when the end of line is reached, it would simply break to another one. Any help appreciated.
|
|
|
Re: Inline score inside markup - bugs in music alignment"Jiri Zurek (Prague)" <zurek@...> writes:
> Dear David, > thank you for your valuable opinion but, in my case, the text needs to > be justified and the music inside markuplines should wrap along the > lines of the surrounding text. I am using it for a musicological > apparatus accompanying the piece and if the systems of the piece and > other texts of the book are well justified, it makes no sense to > interrupt the flow with ragged-right apparatus. Imagine, this book > will have several hundred pages and hundreds of small musical pieces - > liturgical antiphones, each accompanied by the apparatus. It must be > justified. > > I still hope there is a solution for my problem, I recommend magic. At some point of time reality has to intrude. If there is no way to find an arrangement meeting all requirements by hand, the computer can do no better. > Now, that thanks to Neil we have the score block inside markuplines > breakable, the function should be simply disabled. The music would > start at the same line with the text and when the end of line is > reached, it would simply break to another one. Any help appreciated. I happen to be the author of a LaTeX style file that typesets footnotes, and tries merging several footnotes into one line automagically "where appropriate" (TM). Getting to the point where thousands of pages would be cranked out with footnotes of wildly varying size (single words to dozens of pages) _one_ algorithm without pages that would look better when done manually was quite some hard work. It involved a lot of fine-tuning and a solid bunch of fuzzy logic. Applying some of this to the context of scores, you would not want to have a _multi-line_ excerpt broken across lines. And not have one five-line excerpt end at the start of a line, have a few words of text, and the next excerpt start in the same line. And don't break a score excerpt if you don't save some space. And so forth and so on. Justifying text deals with other stretchabilities as justifying music. They don't match very well. There is no simple solution for your problem that would yield satisfactory output. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@... http://lists.gnu.org/mailman/listinfo/lilypond-user |
|
|
Re: Inline score inside markup - bugs in music alignment> I happen to be the author of a LaTeX style file that typesets > footnotes, [...] BTW, it is called `bigfoot', and is one of the most ingenious LaTeX packages IMHO. Werner _______________________________________________ lilypond-user mailing list lilypond-user@... http://lists.gnu.org/mailman/listinfo/lilypond-user |
|
|
Re: Inline score inside markup - bugs in music alignmentWerner LEMBERG <wl@...> writes:
>> I happen to be the author of a LaTeX style file that typesets >> footnotes, [...] > > BTW, it is called `bigfoot', and is one of the most ingenious LaTeX > packages IMHO. Its documentation is lousy. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@... http://lists.gnu.org/mailman/listinfo/lilypond-user |
|
|
Re: Inline score inside markup - bugs in music alignmentI do not think I am trying to do something magical. Although I have to admit with great respect to the creators of Lilypond that the software is capable of doing magic things. My deepest reverence towards the authors of Lilypond. Nevertheless, I have still good hope that there might be an able scheme coder who could find the function making the score to jump to the start of a new line when it is a longer excerpt and disable it for me. I am so sorry that I did not study computer science so that I would understand scheme coding, but to my greatest misfortune it is above my capabiblities. I am alone to be blamed for this, but this is the reason that I am looking for someone to help. This is EXCELLENT. Do you know that I offered sponsorship for someone who would built footnotes into the Lilypond? THere was even a rich man who promissed to make a double match for footnotes to be programmed. I would be most delighted if you took up the challenge! Of course, complete markup and score (breakable at any point) and freely mixable with the text should be native to lilypond footnotes. Why do you think I would not like that? I am aiming exactly at that. For me it would be beneficial, if music would finish at the start of a line, then few words of a text, and then new excerpt starting - better than when the new exceprt starts a new line, disturbing the justified half-empty line above. This is exacly my goal: making from the music and the text something like one uninterrupted flow which would go from one line to another. If this function is built into Lilypond for a single line, if we have multi-line markuplines, if we now have multi-line score inside it, then it should be minimum effort to make it function for more than one line. We are almost there, it is enough - in my humble opinion - to disable the function which instructs the longer score to start a new line. If you wish, I am offering sponsorhip for this function. Again, help is appreciated and just ask for reward if it is not a trivial task. Although I am not really rich man, I would try hard to meet your requirements. This is not quite true. For a single line, the stretchability works extremely well (see the appended example). Why should it not work for more than one line? With the best wishes and best hopes, Jiri Zurek %begin lilypond example \version "2.12.2" \markuplines { \justified-lines { 1st manuscript variant: \vcenter \score { << \new Voice = "cantus" { \clef "G_8" f g c'( d') e' } \new Lyrics \lyricsto "cantus" { A -- ve, ve -- rum } >> \layout { indent = 0.0\cm \context { \Staff \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0) fontSize = #-7 \override StaffSymbol #'staff-space = #(magstep -7) \override StaffSymbol #'thickness = #(magstep -7) } \context { \Lyrics \override LyricText #'font-size = #-4 \override VerticalAxisGroup #'minimum-Y-extent = #'(-0 . 0) } } } and so on; consider 2nd manuscript variant: \vcenter \score { << \new Voice = "cant" { \clef "G_8" f4 a4 c' (d') } \new Lyrics \lyricsto "cant" { A -- ve, -- ve. } >> \layout { indent = 0.0\cm \context { \Staff \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0) fontSize = #-7 \override StaffSymbol #'staff-space = #(magstep -7) \override StaffSymbol #'thickness = #(magstep -7) } \context { \Lyrics \override LyricText #'font-size = #-4 \override VerticalAxisGroup #'minimum-Y-extent = #'(-0 . 0) } } } and so on... no problem with short excerpts. They are perfectly inline, music and the text. } } %end lilypond example Komentar_s_notama_vice.pdf |
|
|
Re: Inline score inside markup - bugs in music alignment"Jiri Zurek (Prague)" <zurek@...> writes:
> David Kastrup wrote: >> >> I happen to be the author of a LaTeX style file that typesets >> footnotes, >> > This is EXCELLENT. Do you know that > http://www.mail-archive.com/bug-lilypond@.../msg13795.html I > offered sponsorship for someone who would built footnotes into the > Lilypond? THere was even a rich man who promissed to make a double > match for footnotes to be programmed. I would be most delighted if you > took up the challenge! Of course, complete markup and score (breakable > at any point) and freely mixable with the text should be native to > lilypond footnotes. Different problem space. LaTeX can already do footnotes. It just has a number of deficiencies that become particularly glaring once you juggle with multiple layers and when footnotes start breaking across pages. In that case, TeX basically disables all its mechanisms for choosing aesthetically pleasing page breaks. The Lilypond challenge is not doing footnotes well. It is doing them at all. >> Applying some of this to the context of scores, you would not want to >> have a _multi-line_ excerpt broken across lines. And not have one >> five-line excerpt end at the start of a line, have a few words of >> text, and the next excerpt start in the same line. And don't break a >> score excerpt if you don't save some space. And so forth and so on. >> > Why do you think I would not like that? Because I have run through literally years of "ok, formally this meets the specs, but it looks ugly. If somebody did that manually, he'd do this differently. Make this look better somehow or we won't be able to get this printed". You are in the phase of handing out the specs. Been there, done that, sweated through a lot of T-shirts. > I am aiming exactly at that. I have no doubts. At the current point of time, I think that you'll be better served by others. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@... http://lists.gnu.org/mailman/listinfo/lilypond-user |
|
|
Re: Inline score inside markup - bugs in music alignmentJiri Zurek (Prague) wrote:
> ...elision by Patrick ... I am so sorry > that I did not study computer science so that I would understand scheme > coding, but to my greatest misfortune it is above my capabiblities. I am > alone to be blamed for this, but this is the reason that I am looking for > someone to help. > Don't feel bad. I have a Masters in Computer Science and I don't understand Scheme at all in spite of having an AI class that used Scheme about a million years ago. Patrick _______________________________________________ lilypond-user mailing list lilypond-user@... http://lists.gnu.org/mailman/listinfo/lilypond-user |
|
|
Re: Inline score inside markup - bugs in music alignmentOn Fri, Oct 30, 2009 at 7:55 PM, Patrick Horgan <phorgan1@...> wrote:
> Jiri Zurek (Prague) wrote: >> >> I am so sorry >> that I did not study computer science so that I would understand scheme >> coding, but to my greatest misfortune it is above my capabiblities. > > Don't feel bad. I have a Masters in Computer Science and I don't understand > Scheme at all in spite of having an AI class that used Scheme about a > million years ago. <sarcasm> Yes, don't feel bad. Despite speaking, reading, and writing a language (English) for over 20 years, I can't understand a single sentence of Turkish. </sarcasm> Scheme is not hard to learn if you want to learn it. If you make no attempt to learn it, then you obviously won't understand it! We have contributers writing scheme who haven't taken a single CS class, let alone getting a degree in the subject. I have no problem with Jiri's initial request for help, but don't claim that scheme is hard to learn. Cheers, - Graham _______________________________________________ lilypond-user mailing list lilypond-user@... http://lists.gnu.org/mailman/listinfo/lilypond-user |
|
|
Re: Inline score inside markup - bugs in music alignment
Graham Percival wrote:
Now Graham, you know I never once claimed it was hard to learn.On Fri, Oct 30, 2009 at 7:55 PM, Patrick Horgan phorgan1@... wrote: Best regards, Patrick _______________________________________________ lilypond-user mailing list lilypond-user@... http://lists.gnu.org/mailman/listinfo/lilypond-user |
| Free embeddable forum powered by Nabble | Forum Help |