[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Colored box behind a single note
From: |
Werner LEMBERG |
Subject: |
Re: Colored box behind a single note |
Date: |
Thu, 25 Jul 2019 17:46:21 +0200 (CEST) |
> 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 push the events onto a stack so that they can be
referenced later on (function `listen_note_grouping'),
(2) create a HorizontalBracket spanner for every \startGroup event and
link it as necessary (function `process_music'),
(3) set one boundary for every element of the HorizontalBracket stack
(function `acknowledge_note_column'),
(4) [my code addition] check whether there is a \stopGroup within a
bunch of \startGroup's (or a single \startGroup within a bunch of
\stopGroup's) and create a single-moment horizontal bracket for
this case (function `acknowledge_note_column'),
(5) pop an element off the HorizontalBracket stack for every
\stopGroup event (function `stop_translation_timestep').
For normal HorizontalBracket grobs, the second boundary is set at the
second moment, as usual.
Up to now it wasn't allowed to have \startGroup and \stopGroup events
at the same moment (this is not elegant, I know, but it's not my
codeĀ :-) Now it recognizes a single \startGroup/\stopGroup pair and
creates a single-moment horizontal bracket. Everything else is as
before.
Werner
- Re: Colored box behind a single note, (continued)
- Re: Colored box behind a single note, Urs Liska, 2019/07/21
- Re: Colored box behind a single note, Werner LEMBERG, 2019/07/25
- Re: Colored box behind a single note, David Kastrup, 2019/07/25
- Re: Colored box behind a single note, Werner LEMBERG, 2019/07/25
- Re: Colored box behind a single note, David Kastrup, 2019/07/25
- Re: Colored box behind a single note, Werner LEMBERG, 2019/07/25
- Re: Colored box behind a single note, David Kastrup, 2019/07/25
- Re: Colored box behind a single note, Malte Meyn, 2019/07/25
- Re: Colored box behind a single note, Werner LEMBERG, 2019/07/25
- Re: Colored box behind a single note,
Werner LEMBERG <=
- Re: Colored box behind a single note, Werner LEMBERG, 2019/07/25
Re: Colored box behind a single note, Aaron Hill, 2019/07/25