Hi,

2014-09-01 23:38 GMT+02:00 Keith OHara <[email protected]>:
> On Sat, 30 Aug 2014 04:41:15 -0700, Janek Warchoł <[email protected]>
> wrote:
>>
>> 2014-08-29 8:53 GMT+02:00 Keith OHara <[email protected]>:
>>
>>> But if someone uses these definitions with music that uses tags for
>>> some other purpose, the tagged music will be left out.
>>
>> Hmm.  That's a problem, but i don't see a good solution yet.
>
>
> Simon's suggestion to use the more-selective \removeWithTag is a good
> solution.
> Just in case anyone uses the \divisibleStaff with his own tags, and might
> not think to include 'together in \keepWithTag score \divisibleStaff ... , I
> added a function to clean up the divI/divII/together tags when we are done
> with them.  These two changes are attached.

Thanks!  I have merged your changes with "ensuring synchronization"
that you suggested.  Code attached; it's also now available in
OpenLilyLib: 
https://github.com/openlilylib/openlilylib/tree/master/notation-snippets/divisi

best (and sorry for long reply),
Janek
\version "2.16.2" % absolutely necessary!

\header {
  snippet-title = "Example snippet"
  snippet-author = "John Doe"
  snippet-source = "link to the mailing list archives or a website, if applicable"
  snippet-description = \markup {
    Briefly describe what the snippet does and how to use it.
  }
  % add comma-separated tags to make searching more effective:
  tags = ""
  % is this snippet ready?  See meta/status-values.md
  status = ""
}

%%%%%%%%%%%%%%%%%%%%%%%%%%
% here goes the snippet: %
%%%%%%%%%%%%%%%%%%%%%%%%%%

red = {
  % color the next note red
  \once \override NoteHead #'color = #red
  \once \override Stem #'color = #red
  \once \override Flag #'color = #red
}
\version "2.16.2"

\include "./definitions.ily"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This example shows how <snippet-name> can be used.
% The implementation of the snippet is in the file
% `definitions.ily`.
% Documentation (if any) should be in `README.md`.

\markup "Color a note red:"
{
  d' \red d'( d')
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to