On Tue 25 Feb 2025 at 13:41:58 (+0100), Gianmaria Lari wrote: > The implicit instantiation of items is something almost always creating > problems for me. I agree that without it, the code would be very verbose > even for very simple situations but in the end, I have the impression that > it does more harm than good.
Presumably you don't write your scores without instantiating staves and voices, so we're only talking about examples, particularly MWEs, here. I don't see anything wrong with implicit instantiation UNLESS the problem involves the very same thing. Your MWEs here were a great lesson in how LP /instantiation/ behaves, but not so good for getting your notes printed the way you want them. I think it would be appropriate to add a warning to the list on: https://lilypond.org/tiny-examples.html that would complement the first two reproduced here: • Avoid using complicated notes, keys or time signatures, /unless/ the bug is about the behavior of those items. • Do not use \override or \set commands /unless/ the bug is about those specific commands. • Avoid implicit instantiation of staves and voices /whenever/ your example involves those very same contexts. > Is there any way to see how the implicit code is converted? I tried with > \displayLilyMusic but it was not that.... Above my paygrade. For example, anything /I/ would put between the { and << is likely to cause an instantiation event, ie, the Observer Effect. However, I would point out that, eg, writing a2 c' at the start, and d4 d' at the end, of your example gives you more information than a1 and d4 does, because stem direction is your main diagnostic. BTW, general advice is to always surround braces by whitespace. It's one of those things that doesn't usually matter, until it does. Cheers, David.