|
|
Created:
5 years, 1 month ago by hanwenn Modified:
5 years ago CC:
lilypond-devel_gnu.org Visibility:
Public. |
Descriptioninput/regression/multi-measure-rest-reminder: a demo of user-defined grobs
Uses recently added features to build a text reminder at the top of the page of
the last multi measure rests count.
Patch Set 1 #
Total comments: 2
Patch Set 2 : nits #
Total comments: 2
MessagesTotal messages: 11
Thanks for providing a test. Not able to run it right now, maybe tomorrow. https://codereview.appspot.com/557380044/diff/563510046/input/regression/mult... File input/regression/multi-measure-rest-reminder.ly (right): https://codereview.appspot.com/557380044/diff/563510046/input/regression/mult... input/regression/multi-measure-rest-reminder.ly:10: \version "2.19.21" nit: probably 2.21.0 if it's using the newly added feature?
Sign in to reply to this message.
Are you a French forensics? (DNA is adn for us) https://codereview.appspot.com/557380044/diff/563510046/input/regression/mult... File input/regression/multi-measure-rest-reminder.ly (right): https://codereview.appspot.com/557380044/diff/563510046/input/regression/mult... input/regression/multi-measure-rest-reminder.ly:6: This is a demo of user-defined engravers, adn defining grobs using adn -> and
Sign in to reply to this message.
On 2020/02/10 21:28:53, hahnjo wrote: > Thanks for providing a test. Not able to run it right now, maybe tomorrow. Looks good to me (modulo the nits), see https://sourceforge.net/p/testlilyissues/issues/5747/ for how the output looks like.
Sign in to reply to this message.
nits
Sign in to reply to this message.
fixed nits.
Sign in to reply to this message.
Sorry being that late to the party. Though, I'm confused. Iiuc a new grob called MultiMeasureRestReminder should be created. Alas, if I try to insert \override Voice.MultiMeasureRestReminder.after-line-breaking = #'() I get: warning: not a grob name, `MultiMeasureRestReminder' What am I missing?
Sign in to reply to this message.
https://codereview.appspot.com/557380044/diff/569320045/input/regression/mult... File input/regression/multi-measure-rest-reminder.ly (right): https://codereview.appspot.com/557380044/diff/569320045/input/regression/mult... input/regression/multi-measure-rest-reminder.ly:26: #(set-object-property! 'MultiMeasureRestReminder 'translation-type? ly:grob-properties?) To make further overrides possible, add: #(set-object-property! 'MultiMeasureRestReminder 'is-grob? #t) Would solve the issue in my recent comment
Sign in to reply to this message.
https://codereview.appspot.com/557380044/diff/569320045/input/regression/mult... File input/regression/multi-measure-rest-reminder.ly (right): https://codereview.appspot.com/557380044/diff/569320045/input/regression/mult... input/regression/multi-measure-rest-reminder.ly:26: #(set-object-property! 'MultiMeasureRestReminder 'translation-type? ly:grob-properties?) On 2020/02/16 13:45:30, thomasmorley651 wrote: > To make further overrides possible, add: > #(set-object-property! 'MultiMeasureRestReminder 'is-grob? #t) > > Would solve the issue in my recent comment Feel free to send a change! I don't understand why we need is-grob? if the symbol is already marked with translation-type? == ly:grob-properties? David?
Sign in to reply to this message.
On 2020/02/17 10:01:29, hanwenn wrote: > https://codereview.appspot.com/557380044/diff/569320045/input/regression/mult... > File input/regression/multi-measure-rest-reminder.ly (right): > > https://codereview.appspot.com/557380044/diff/569320045/input/regression/mult... > input/regression/multi-measure-rest-reminder.ly:26: #(set-object-property! > 'MultiMeasureRestReminder 'translation-type? ly:grob-properties?) > On 2020/02/16 13:45:30, thomasmorley651 wrote: > > To make further overrides possible, add: > > #(set-object-property! 'MultiMeasureRestReminder 'is-grob? #t) > > > > Would solve the issue in my recent comment > > Feel free to send a change! > > I don't understand why we need is-grob? if the symbol is already marked with > translation-type? == ly:grob-properties? > > David? Comparatively unrelated things. At any rate, "the symbol is marked" is historical baggage and we should instead of using "object-properties" use an explicit weak hashtable for such things since that would make it possible to _reset_ the hashtable between user files and thus make sure that user-defined properties don't bleed from one file to the next. I just haven't got around to doing this change yet which will break all user-created grobs (and some other things implemented in the same manner) and provide a more official way of extension. At any rate, is-grob? is the way of checking that something is a grob name syntactically. translation-type?, in contrast, is the type of the context property storing the current grob definition. Historically, this was an alist I think, and mixing \set and \override on the same property consequently could cause fascinating crashes. Using the alist directly did not allow for reliably overriding and reverting nested context properties. People patched around that area for years, further obfuscating the logical impossibility of getting this done correctly and getting the errors to become more obscure and trigger in different circumstances. So at one point of time, I introduced the ly:grob-properties? data structure tracking nested overrides separately and "cooking" the resulting alist only on an as-needed base. That it is needed for nothing else is not inherently related to it being tied to a named grob.
Sign in to reply to this message.
On 2020/02/17 10:01:29, hanwenn wrote: > https://codereview.appspot.com/557380044/diff/569320045/input/regression/mult... > File input/regression/multi-measure-rest-reminder.ly (right): > > https://codereview.appspot.com/557380044/diff/569320045/input/regression/mult... > input/regression/multi-measure-rest-reminder.ly:26: #(set-object-property! > 'MultiMeasureRestReminder 'translation-type? ly:grob-properties?) > On 2020/02/16 13:45:30, thomasmorley651 wrote: > > To make further overrides possible, add: > > #(set-object-property! 'MultiMeasureRestReminder 'is-grob? #t) > > > > Would solve the issue in my recent comment > > Feel free to send a change! Done. https://sourceforge.net/p/testlilyissues/issues/5772/ https://codereview.appspot.com/547670044
Sign in to reply to this message.
commit e3be140a8141f0236cd489cd97e7fcf735653a0b Author: Han-Wen Nienhuys <hanwen@lilypond.org> Date: Mon Feb 10 22:10:35 2020 +0100 input/regression/multi-measure-rest-reminder: a demo of user-defined grobs
Sign in to reply to this message.
|