Re: How to deal with Time Signatures horizontal alignment?
Hi Valentin, On 8/30/07, Valentin Villenave <[EMAIL PROTECTED]> wrote: > > > Nah, it's already perfect! Not only will I use it (in all my scores, > starting right now) but I'll add it to the LSR as well. I'm glad you like it; I've found it quite useful myself, though at first it led me to a dead-end. I thought it could be adapted for overriding RehearsalMark #'text after a line break when break-visibility is set to all-visible, but it only seems to work for more trivial properties like #'color. Regards, Neil ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
2007/8/30, Neil Puttock <[EMAIL PROTECTED]>: > Hopefully it's got a second wind. ;) Great! I didn't expect that this problem was manageable... > Whilst searching for a solution to a rehearsal mark problem, I stumbled > upon this interesting function in output-lib.scm, which might help: > > It shifts rehearsal marks to the right at the beginning of a system. Awesome! You're my savior :) > You can use this for overriding the after-line-breaking property of > TimeSignature. Obviously, if you'd prefer a different offset, you can copy > this function and rename it. Nah, it's already perfect! Not only will I use it (in all my scores, starting right now) but I'll add it to the LSR as well. Thank you so much Neil; you've made at least one person happy today :) Regards, Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
Hi Valentin, On 8/29/07, Valentin Villenave <[EMAIL PROTECTED]> wrote: > > > OK, so just to sum up the situation: I now have TimeSignatures aligned > with barlines, which is fine for the topmost TimeSig, but not for the > "internals" ones between each StaffGroup (since, when occuring at the > beginning of a system, they collide with the left barline). > > It sort of works, so I guess this thread is now closed. Hopefully it's got a second wind. ;) Whilst searching for a solution to a rehearsal mark problem, I stumbled upon this interesting function in output-lib.scm, which might help: (define-public (shift-right-at-line-begin g) "Shift an item to the right, but only at the start of the line." (if (and (ly:item? g) (equal? (ly:item-break-dir g) RIGHT)) (ly:grob-translate-axis! g 3.5 X))) It shifts rehearsal marks to the right at the beginning of a system. You can use this for overriding the after-line-breaking property of TimeSignature. Obviously, if you'd prefer a different offset, you can copy this function and rename it. \context { \type "Engraver_group" \consists "Time_signature_engraver" \consists "Axis_group_engraver" \name "TimeSig" \override TimeSignature #'font-size = #3 \override TimeSignature #'break-align-symbol = ##f \override TimeSignature #'X-offset = #ly:self-alignment-interface::x-aligned-on-self \override TimeSignature #'self-alignment-X = #0 \override TimeSignature #'after-line-breaking = #shift-right-at-line-begin } Regards, Neil ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
2007/8/26, Valentin Villenave <[EMAIL PROTECTED]>: > This is the point; the time signatures should be aligned with the > barlines, *unless* they're at the beginning of the line (then they > have to be put after the clef). > > This is because in such orchestral scores, the time signature is > printed above the 1st flute staff, above the 1st Horn staff and above > the 1st Violins staff (in other words, above each main instrument > groups). Since there is no barline between those staves, the > TimeSignature can be aligned with the barlines, *but* since the first > barline of each system is always printed, then the TimeSignature has > to be moved after the Clef. OK, so just to sum up the situation: I now have TimeSignatures aligned with barlines, which is fine for the topmost TimeSig, but not for the "internals" ones between each StaffGroup (since, when occuring at the beginning of a system, they collide with the left barline). Not being able to move *only* those TimeSignatures, here's what I'll do to prevent such collisions: I'll simply kill them :) for the topmost TimeSig, I just specify \override TimeSignature #'break-visibility = #end-of-line-invisible and for the smallest ones inside the systems; \override TimeSignature #'break-visibility = ##(#f #t #f) It sort of works, so I guess this thread is now closed. Many thanks to you guys, particularly Kieren, Neil, Joe, and last but not least, Han-Wen "God" Nienhuys :) Cheers, Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
2007/8/26, Han-Wen Nienhuys <[EMAIL PROTECTED]>: > 2007/8/26, Valentin Villenave <[EMAIL PROTECTED]>: > > As a result, the first TimeSignature of each system is also aligned > > with the left barline (which puts it too far on the left, even before > > the Clef). > I thought that was desired. If you don't do the break-align-symbol > override, the time sig will be after the clef on the start of the > system. This is the point; the time signatures should be aligned with the barlines, *unless* they're at the beginning of the line (then they have to be put after the clef). This is because in such orchestral scores, the time signature is printed above the 1st flute staff, above the 1st Horn staff and above the 1st Violins staff (in other words, above each main instrument groups). Since there is no barline between those staves, the TimeSignature can be aligned with the barlines, *but* since the first barline of each system is always printed, then the TimeSignature has to be moved after the Clef. You can see such engraving rules in many contemporary orchestral scores (I have some examples here in France, but unfortunately I haven't a scanner). Thank you very much Cheers, Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
2007/8/26, Valentin Villenave <[EMAIL PROTECTED]>: > As a result, the first TimeSignature of each system is also aligned > with the left barline (which puts it too far on the left, even before > the Clef). For the very first TimeSignature, no big deal: one can > easily add an \once \override. But when the time signature often > changes, many systems can begin with a new TimeSignature, and it > becomes almost impossible to correct all of these manually. > I thought that was desired. If you don't do the break-align-symbol override, the time sig will be after the clef on the start of the system. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
2007/8/26, Valentin Villenave <[EMAIL PROTECTED]>: > x-aligned-on-self !!! This is awesome! Awesome, *but*... As a result, the first TimeSignature of each system is also aligned with the left barline (which puts it too far on the left, even before the Clef). For the very first TimeSignature, no big deal: one can easily add an \once \override. But when the time signature often changes, many systems can begin with a new TimeSignature, and it becomes almost impossible to correct all of these manually. So, is it possible to apply the x-aligned-on-self trick *only* to TimeSignatures which are not at the beginning of a line? (maybe a relatively simple Scheme function could do it automatically... but I don't have the skills yet) Regards, Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
2007/8/26, Han-Wen Nienhuys <[EMAIL PROTECTED]>: > > I think you are all thinking in too complicated directions. x-aligned-on-self !!! This is awesome! Han-Wen (if I may repeat myself), you're a God! I'm immediately adding it to the LSR. Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
Joe Neeman escreveu: > On Tuesday 21 August 2007 20:34, Valentin Villenave wrote: >> That being said, do you think it would be a good idea to make >> TimeSignature accept the break-alignable-interface? > > No, because TimeSignature already accepts an interface > (break-aligned-interface) that determines its horizontal position; it > wouldn't make sense for it to accept another one. The cleanest way of getting > this functionality into the lilypond core, in my opinion, would be to create > a whole new grob class. I think you are all thinking in too complicated directions. layout{ \context { \type "Engraver_group" \consists "Time_signature_engraver" \consists "Axis_group_engraver" \name "TimeSig" \override TimeSignature #'font-size = #3 \override TimeSignature #'break-align-symbol = ##f \override TimeSignature #'X-offset = #ly:self-alignment-interface::x-aligned-on-self \override TimeSignature #'self-alignment-X = #0 } \context { \Score \accepts TimeSig } \context { \Staff \remove "Time_signature_engraver" } } timeSignatures = { \time 2/4 s2 \time 3/4 s2. \time 4/4 s1 } \score { << \new TimeSig \timeSignatures \new Staff \relative { c'2 c2. c1 } \new Staff { a2 a2. a1} >> } -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
On Wednesday 22 August 2007 21:30, Valentin Villenave wrote: > 2007/8/22, Joe Neeman <[EMAIL PROTECTED]>: > > No, because TimeSignature already accepts an interface > > (break-aligned-interface) that determines its horizontal position; it > > wouldn't make sense for it to accept another one. The cleanest way of > > getting this functionality into the lilypond core, in my opinion, would > > be to create a whole new grob class. > > Thank you for your explanations; I'm not yet completely familiar with > all this stuff, but I'm getting closer. > > Is it silly to suggest that maybe the break-aligned-interface itself > could accept some reference symbols? The objects with break-aligned-interface can't accept reference symbols because they _are_ the reference symbols. > Besides, can you explain why, in > http://lilypond.org/doc/v2.11/Documentation/user/lilypond-internals-big-pag >e#break_002daligned_002dinterface the "user settable properties" mentions > the "old" > break-align-symbol (symbol) > syntax, and how it could (or couldn't) be used to align such grobs as > TimeSignatures, which depends on break-aligned-interface? Yes, this double use of break-align-symbol is a little confusing. In the break-aligned-interface, break-align-symbol is for naming the reference point. That is, a TimeSignature has break-align-symbol set to 'time-sig. Then, if a RehearsalMark has break-align-symbols set to '(time-sig), it will align itself on the TimeSignature. Cheers, Joe ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
2007/8/22, Joe Neeman <[EMAIL PROTECTED]>: > No, because TimeSignature already accepts an interface > (break-aligned-interface) that determines its horizontal position; it > wouldn't make sense for it to accept another one. The cleanest way of getting > this functionality into the lilypond core, in my opinion, would be to create > a whole new grob class. Thank you for your explanations; I'm not yet completely familiar with all this stuff, but I'm getting closer. Is it silly to suggest that maybe the break-aligned-interface itself could accept some reference symbols? Besides, can you explain why, in http://lilypond.org/doc/v2.11/Documentation/user/lilypond-internals-big-page#break_002daligned_002dinterface the "user settable properties" mentions the "old" break-align-symbol (symbol) syntax, and how it could (or couldn't) be used to align such grobs as TimeSignatures, which depends on break-aligned-interface? Or is this indication deprecated? Thank you very much for your time. This Break Alignment thing looks quite important in understanding how LilyPond works. Regards, Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
On Tuesday 21 August 2007 20:34, Valentin Villenave wrote: > That being said, do you think it would be a good idea to make > TimeSignature accept the break-alignable-interface? No, because TimeSignature already accepts an interface (break-aligned-interface) that determines its horizontal position; it wouldn't make sense for it to accept another one. The cleanest way of getting this functionality into the lilypond core, in my opinion, would be to create a whole new grob class. Joe ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
2007/8/21, Joe Neeman <[EMAIL PROTECTED]>: > Off the top of my head, I would suggest writing a scheme function where > something like > > \timeSig #'(3 . 4) > > will emit > > \time 3/4 > \mark "3/4" > > so that you are dealing with RehearsalMarks, which can then be aligned however > you want. Yes; I was thinking about tweaking the \time command itself, to print the results of ly:moment-main-denominator and ly:moment-main-numerator as Marks, but your workaround is much better. I'll work on it. That being said, do you think it would be a good idea to make TimeSignature accept the break-alignable-interface? Regards, Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
On Tuesday 21 August 2007 18:12, Valentin Villenave wrote: > Hello again, > > I'm trying to rewrite the LSR TimeSig snippet (and probably use it in > my own score): > > http://lsr.dsi.unimi.it/LSR/Item?id=272 > > The two modifications I want to add are: remove the > Time_signature_engraver instead of using #'transparent, AND get the > time signatures aligned with the barlines without having to use > empirical extra-offset. > > This time, I finally got the point about the updated > break-align-symbols syntax, so I'm using it. But... > > ...it doesn't work either :( > > So, what is wrong?? The problem is that 'break-align-symbols is a property in break-alignable-interface (this information can be found in the backend documentation, which is admittedly a little obscure). Therefore, setting 'break-align-symbols will only have an effect on grobs that use this interface (only RehearsalMark and BarNumber). This is because the mechanism for determining the horizontal position of a TimeSignature is completely different to the mechanism for determining the position of a RehearsalMark. Off the top of my head, I would suggest writing a scheme function where something like \timeSig #'(3 . 4) will emit \time 3/4 \mark "3/4" so that you are dealing with RehearsalMarks, which can then be aligned however you want. Joe ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
Hello again, I'm trying to rewrite the LSR TimeSig snippet (and probably use it in my own score): http://lsr.dsi.unimi.it/LSR/Item?id=272 The two modifications I want to add are: remove the Time_signature_engraver instead of using #'transparent, AND get the time signatures aligned with the barlines without having to use empirical extra-offset. This time, I finally got the point about the updated break-align-symbols syntax, so I'm using it. But... ...it doesn't work either :( So, what is wrong?? %%% Snippet %%% \layout{ \context { \type "Engraver_group" \consists "Time_signature_engraver" \consists "Axis_group_engraver" \name "TimeSig" \override TimeSignature #'font-size = #3 } \context { \Score \accepts TimeSig \override TimeSignature #'break-align-symbols = #'(staff-bar) } \context { \Staff \remove "Time_signature_engraver" } } timeSignatures = { \time 2/4 s2 \time 3/4 s2. \time 4/4 s1 } \score { << \new TimeSig \timeSignatures \new Staff \relative { c'2 c2. c1 } \new Staff { a2 a2. a1} >> } %%% Thank you all, Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
2007/8/10, Neil Puttock <[EMAIL PROTECTED]>: > Hi Valentin, Hi Neil, I'd never expect that so much people would read my mail :) > I've been messing around with RehearsalMark, and this seems to produce the > kind of output you're after: > Unfortunately it's pretty much useless, since it will only print out 4/4, > whatever the time signature. Perhaps someone with better knowledge of > LilyPond's internals can point to a solution for this? Not only does it print 4/4, but it also requires that you specify \mark \default whenever you change the time signature (maybe this could be solved with a simple Scheme function though). What would be really cool is if the Marks were automatically added whenever the time_fraction changes. I've been looking (more like staring for hours) at time-signature-engraver.cc, trying to understand how the grob is created, but this is waaay beyond my current knowledges. The only workaround I can imagine would be to use Scheme to override the \time command, and maybe print the results of ly:moment-main-denominator and ly:moment-main-numerator to get a "fake" time signature, but then again I haven't got -yet- the necessary skills to achieve this. > If it is possible, however, there's another problem if you're using frenched > staves - you'd have to move both the Mark_engraver and > Staff_collecting_engraver to the Staff context, which will conflict with > \RemoveEmptyStaffContext. Noted, thank you. Regards, Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
Hi Valentin, On 8/9/07, Valentin Villenave <[EMAIL PROTECTED]> wrote: > > > A solution would be to print the time signatures as Rehearsal Marks, > but I don't know how to do it nor if it's even possible. I've been messing around with RehearsalMark, and this seems to produce the kind of output you're after: \relative { \override Score.RehearsalMark #'break-align-symbol = #'left-edge \override Score.RehearsalMark #'stencil = #ly:time-signature::print \override Score.RehearsalMark #'font-size = #3 c'4 c c c \mark \default \time 3/2 c c c c c c \mark \default \time 5/8 c8 c c c c \time 2/4 c4 c } Unfortunately it's pretty much useless, since it will only print out 4/4, whatever the time signature. Perhaps someone with better knowledge of LilyPond's internals can point to a solution for this? If it is possible, however, there's another problem if you're using frenched staves - you'd have to move both the Mark_engraver and Staff_collecting_engraver to the Staff context, which will conflict with \RemoveEmptyStaffContext. Regards, Neil ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
2007/8/9, Kieren MacMillan <[EMAIL PROTECTED]>: > To solve *that* problem, simply change the line to > \override TimeSignature #'extra-offset = #'(-2 . 7) > and all the TS's will be over the bar line. Yes, this is what I figured :) But this is by no way an automatic alignment. So i'm back to my original question: what's wrong with: \override TimeSignature #'break-align-symbol = #'staff-bar ? > As for your other (main) problem... Search the list archives for > TimeSig staff threads -- there were lots of them a few months (and > years) ago, and there were lots of solutions (including some by me) > that address the issue (but are too complex to put here off the top > of my head). If I have a little more time in the near future, I'll > put together some sample workarounds for you -- no promises! =) This is great -- and a bit deceiving though: as far as I can see, nobody has solved yet the problem I'm experiencing. Oh, by the way, I've just found that you've asked another question I'm interested in: http://lists.gnu.org/archive/html/lilypond-user/2006-05/msg00272.html You see, I *can't* use a normal Staff-context TimeSignature as my staves are always changing, so the solution you came up with is not convenient in orchestral music. However, it's really cool to take old issues and look for new answers! Thank you, Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
Hi Valentin, This is unfortunately not what I need, because the staves are never the same in the score... Yeah, I've never been that lucky either... =) Besides, in your snippet the time signatures are not center-aligned with the barlines, so one have to manually correct the extra-offset Oh, you actually WANT them on the barline... to my eye, that doesn't look so good. To solve *that* problem, simply change the line to \override TimeSignature #'extra-offset = #'(-2 . 7) and all the TS's will be over the bar line. As for your other (main) problem... Search the list archives for TimeSig staff threads -- there were lots of them a few months (and years) ago, and there were lots of solutions (including some by me) that address the issue (but are too complex to put here off the top of my head). If I have a little more time in the near future, I'll put together some sample workarounds for you -- no promises! =) Best wishes, Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
2007/8/9, Kieren MacMillan <[EMAIL PROTECTED]>: > Hi Valentin, Hi Kieren, thank you for answering! > If the top Staff of the StaffGroup is always present (i.e., never > gets French-ed out), then you can simply use something like the > enclosed snippet. This is unfortunately not what I need, because the staves are never the same in the score... And in addition to that, I'd like to add a big TimeSig above the score, and a little one above the strings Staffgroup (which is variable too, since the violins are not alway playing) :( Besides, in your snippet the time signatures are not center-aligned with the barlines, so one have to manually correct the extra-offset (which is precisely what I'm trying to avoid)... > If your top Staff is variable, you'll need to work a little harder! =) I am; but here's where I could use some help :) Many thanks Kieren Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to deal with Time Signatures horizontal alignment?
Hi Valentin, If the top Staff of the StaffGroup is always present (i.e., never gets French-ed out), then you can simply use something like the enclosed snippet. If your top Staff is variable, you'll need to work a little harder! =) Hope this helps, Kieren. _ \version "2.10.25" timeSigMusic = \relative { \time 4/4 c'4 c c c \time 3/2 c c c c c c \time 5/8 c8 c c c c \time 2/4 c4 c } \layout { %% take away the TimeSignature (and space) for all Staff objects \context { \Staff \override TimeSignature #'stencil = ##f \override TimeSignature #'X-extent = #'(0 . 0) } } \score { \new StaffGroup << \new Staff \with { %% bring back (and adjust) TimeSignature for this Staff (only) \revert TimeSignature #'stencil \override TimeSignature #'font-size = #4 \override TimeSignature #'extra-offset = #'(0 . 7) } << \timeSigMusic >> \new Staff << \timeSigMusic >> \new Staff << \timeSigMusic >> \new Staff << \timeSigMusic >> >> } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
How to deal with Time Signatures horizontal alignment?
Hello everybody, In the following LSR snippet (which I added a few months ago), time signatures are printed above the staffgroup, which is really useful for large orchestral scores: http://lsr.dsi.unimi.it/LSR/Item?id=272 However, as you can see in this snippet, I had to add the following line: \override TimeSignature #'extra-offset = #'(-2.2 . 0.0 ) otherwise the time signatures were still printed on the right of the barlines, which was no longer convenient since they're printed out of the staves. I'm looking for a way to do this automatically without having to find the right offset by myself (in case, for example, I need several TimeSig contexts in a score, with different fontsizes). What I tried was to align the TimeSignature objects with the barlines as break-align symbols: \override TimeSignature #'break-align-symbol = #'staff-bar But it doesn't seem to be working; moreover, when I try to apply it to larger scores, it gives me the following error message: "No spacing entry between TimeSignature and time-signature" ( I can send a larger example that produces the message, if necessary) A solution would be to print the time signatures as Rehearsal Marks, but I don't know how to do it nor if it's even possible. But what isn't working here? Thanks, Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user