Knute Snortum <ksnor...@gmail.com> writes: > On Sat, Sep 11, 2021 at 12:03 PM Hans Aikema <hans.aik...@aikebah.net> wrote: >> >> Hi all, >> >> In a score I have two parts (Alto I and II) that’s for most of the score >> unisono. >> >> In order to be able to also generate rehearsal midis by voice (with >> the concerned voice highlighted by diminishing the volume of other >> voices) I would like to retain the full individual voices. >> This rules out >> … << { \voiceOne … } \new Voice { \voiceTwo … } >> \oneVoice ... >> pattern for temporal polyphonic music as it introduces the problem >> that the two voices displayed in the staff are now split in a way >> that would at least not allow me to create a rehearsal miditrack >> with voice that takes its polyphony notes from the \voiceTwo section >> highlighted. >> >> For easier readability of the unisono part however I would like >> (visually more condensed) the whole notes to join up like all the >> identically-headed-and-pitched stemmed notes do. >> >> So what I’m trying to achieve is the notation effects of >> << >> { \once\override NoteColumn.ignore-collision = ##t f'1 | >> \once\override NoteColumn.ignore-collision = ##t f'1~ | f'1 | f'2( >> g'4 a'4) } \\ { f'1 | f'1~ | f'4( e' d' c') | f'4( e' g' a') } >> >> >> >> % rather than the fully proper from notational perspective default rendering >> << >> { f'1 | f'1~ | f'1 | f'2( g'4 a'4) } \\ { f'1 | f'1~ | f'4( e' >> d' c') | f'4( e' g' a') } >> >> >> >> % or the completely broken >> << >> \override NoteColumn.ignore-collision = ##t >> { f'1 | f'1~ | f'1 | f'2( g'4 a'4) } \\ { f'1 | f'1~ | f'4( e' >> d' c') | f'4( e' g' a') } >> >> >> >> without having to sift through the score looking for the colliding >> whole notes in order to add a \once\override >> NoteColumn.ignore-collision = ##t to them >> >> Wondering if there would be a good solution that I’m somehow overlooking >> >> kind regards, >> Hans Aikema > > Well, I don't think you can avoid "sifting through the score", > otherwise how would LilyPond know when you want to ignore collisions? > But you can make it easier to do: > > %%% > \version "2.22.1" > > ignoreCollision = > #(define-music-function (bool) (boolean?) > #{ > \override NoteColumn.ignore-collision = #bool > #})
Well, that's just ignoreCollision = \override NoteColumn.ignore-collision = \etc (admittedly the explicit function has better typechecking). But when there is no expectation of actually using a variable expression here ever, it might make more sense to define two separate commands \ignoreCollision and \avoidCollision . -- David Kastrup