Re: Colored box behind a single note

2019-07-28 Thread Werner LEMBERG
>> Ideally, I would like to write >> >> \genericSpan <...parameters ...> >> e\startGroup\endGroup >> >> but since `\genericSpan' uses a `HorizontalBracket' grob, this >> fails; it needs at least two notes. >> >> I wasn't able to find a suitable solution in the web; IMHO, it >> would be a quite

Re: Colored box behind a single note

2019-07-25 Thread Aaron Hill
On 2019-07-21 10:04 am, Werner LEMBERG wrote: Using http://lsr.di.unimi.it/LSR/Item?id=1000 I wonder how to get the effect for a single note. Ideally, I would like to write \genericSpan <...parameters ...> e\startGroup\endGroup but since `\genericSpan' uses a `HorizontalBracket' grob,

Re: Colored box behind a single note

2019-07-25 Thread Werner LEMBERG
Oops, some typos. Here a corrected algorithm version. Here's the algorithm. For a given moment, (1) count the number of \startGroup and \stopGroup events and push the events onto a stack so that they can be referenced later on (function `listen_note_grouping'), (2) create a

Re: Colored box behind a single note

2019-07-25 Thread Werner LEMBERG
> So how do you distinguish a nested bracket starting and ending at > the same musical moment to ending one bracket and starting the next > at the same musical moment? Here's the algorithm. For a given moment, (1) count the number of \startGroup and \stopGroup events for a given moment and

Re: Colored box behind a single note

2019-07-25 Thread Werner LEMBERG
> Slightly off-topic: Currently it’s not possible to end one bracket > and start the next at the same moment, that’s > https://sourceforge.net/p/testlilyissues/issues/5240/ where I > mentioned overlapping brackets. IIRC the brackets are started and > ended when the bracket count is increased or

Re: Colored box behind a single note

2019-07-25 Thread Malte Meyn
Am 25.07.19 um 15:26 schrieb David Kastrup: So how do you distinguish a nested bracket starting and ending at the same musical moment to ending one bracket and starting the next at the same musical moment? Good question. Slightly off-topic: Currently it’s not possible to end one bracket and

Re: Colored box behind a single note

2019-07-25 Thread David Kastrup
Werner LEMBERG writes: Seriously? C++ has loops, you don't need goto for that. >>> >>> What construction do you suggest as a replacement? >> >> A loop? > > Well, yes. However, everything seems quite inelegant and bloated to > me in comparison to this simple `goto' [and I don't think that

Re: Colored box behind a single note

2019-07-25 Thread Werner LEMBERG
>>> Seriously? C++ has loops, you don't need goto for that. >> >> What construction do you suggest as a replacement? > > A loop? Well, yes. However, everything seems quite inelegant and bloated to me in comparison to this simple `goto' [and I don't think that such a local `goto' is something

Re: Colored box behind a single note

2019-07-25 Thread David Kastrup
Werner LEMBERG writes: >>> Not sure whether the coding fits lilypond's C++ style, however. >> >> Seriously? C++ has loops, you don't need goto for that. > > What construction do you suggest as a replacement? A loop? >>> + // One single-moment bracket is allowed. Abbreviating a horizontal

Re: Colored box behind a single note

2019-07-25 Thread Werner LEMBERG
>> Not sure whether the coding fits lilypond's C++ style, however. > > Seriously? C++ has loops, you don't need goto for that. What construction do you suggest as a replacement? >> + // One single-moment bracket is allowed. Abbreviating a horizontal >> + // bracket's `START' span-direction

Re: Colored box behind a single note

2019-07-25 Thread David Kastrup
Werner LEMBERG writes: >> Using >> >> http://lsr.di.unimi.it/LSR/Item?id=1000 >> >> I wonder how to get the effect for a single note. Ideally, I would >> like to write >> >> \genericSpan <...parameters ...> >> e\startGroup\stopGroup > > With the attached patch (for git master) I get

Re: Colored box behind a single note

2019-07-24 Thread Werner LEMBERG
> Using > > http://lsr.di.unimi.it/LSR/Item?id=1000 > > I wonder how to get the effect for a single note. Ideally, I would > like to write > > \genericSpan <...parameters ...> > e\startGroup\stopGroup With the attached patch (for git master) I get exactly that :-) Not sure whether the

Re: Colored box behind a single note

2019-07-22 Thread Werner LEMBERG
> I'm not sure if that helps you with your case (probably not), but > you should at least know that this snippet has by now evolved into > this openLilyLib package: https://github.com/openlilylib/analysis/, > https://github.com/openlilylib/analysis/wiki/Frames Thanks for the info! Werner

Re: Colored box behind a single note

2019-07-21 Thread Urs Liska
Am 21.07.19 um 19:04 schrieb Werner LEMBERG: Using http://lsr.di.unimi.it/LSR/Item?id=1000 I wonder how to get the effect for a single note. Ideally, I would like to write \genericSpan <...parameters ...> e\startGroup\endGroup but since `\genericSpan' uses a `HorizontalBracket'

Colored box behind a single note

2019-07-21 Thread Werner LEMBERG
Using http://lsr.di.unimi.it/LSR/Item?id=1000 I wonder how to get the effect for a single note. Ideally, I would like to write \genericSpan <...parameters ...> e\startGroup\endGroup but since `\genericSpan' uses a `HorizontalBracket' grob, this fails; it needs at least two notes. I