Coloring of key signature accidentals based on their pitch

2015-08-17 Thread Heikki Junes
Hi,

in Lilypond 2.19.25 notes and accidental before notes can be colored based
on their pitch:

\override NoteHead.color = #color-notehead
\override Accidental.color = #color-notehead 

Here is an example on NoteHeads:

http://www.lilypond.org/doc/v2.19/Documentation/snippets-big-page#pitches-coloring-notes-depending-on-their-pitch

What I am looking for is to be able to color the individual key signature
accidentals based on their pitch. 

Currently, key signature seems to be a single grob (?) so that only one
color can be assigned to it:

\override Staff.KeySignature #'color = #red

Would it be possible to split the key signature grob to parts in such a
manner that the individual accidentals could be colored, using a kind of
similar code:

\override Staff.KeySignature.color = #color-notehead

best regards,
Heikki Junes


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Coloring of key signature accidentals based on their pitch

2015-08-17 Thread David Kastrup
Heikki Junes  writes:

> Hi,
>
> in Lilypond 2.19.25 notes and accidental before notes can be colored based
> on their pitch:
>
> \override NoteHead.color = #color-notehead
> \override Accidental.color = #color-notehead 

Uh, no?

> Here is an example on NoteHeads:
>
> http://www.lilypond.org/doc/v2.19/Documentation/snippets-big-page#pitches-coloring-notes-depending-on-their-pitch

You are aware that this example defines color-notehead itself?  It is
not predefined in LilyPond.

> What I am looking for is to be able to color the individual key signature
> accidentals based on their pitch. 
>
> Currently, key signature seems to be a single grob (?) so that only one
> color can be assigned to it:
>
> \override Staff.KeySignature #'color = #red

Key signature is a single grob.  Your best bet probably is recoding the
print routine in lily/key-signature-interface.cc in Scheme (it appears
rather straightforward) and then add the desired color changes to it.
The alternative, namely calling the print routine and post-processing
the stencil is probably less robust against future changes in LilyPond.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Coloring of key signature accidentals based on their pitch

2015-08-17 Thread Heikki Junes
2015-08-17 15:34 GMT+03:00 David Kastrup :

> Heikki Junes  writes:
>
> > Hi,
> >
> > in Lilypond 2.19.25 notes and accidental before notes can be colored
> based
> > on their pitch:
> >
> > \override NoteHead.color = #color-notehead
> > \override Accidental.color = #color-notehead
>
> Uh, no?
>
> > Here is an example on NoteHeads:
> >
> >
> http://www.lilypond.org/doc/v2.19/Documentation/snippets-big-page#pitches-coloring-notes-depending-on-their-pitch
>
> You are aware that this example defines color-notehead itself?  It is
> not predefined in LilyPond.
>

Exactly. With this scheme code it is possible to have color-by-pitch.


> > What I am looking for is to be able to color the individual key signature
> > accidentals based on their pitch.
> >
> > Currently, key signature seems to be a single grob (?) so that only one
> > color can be assigned to it:
> >
> > \override Staff.KeySignature #'color = #red
>
> Key signature is a single grob.  Your best bet probably is recoding the
> print routine in lily/key-signature-interface.cc in Scheme (it appears
> rather straightforward) and then add the desired color changes to it.
> The alternative, namely calling the print routine and post-processing
> the stencil is probably less robust against future changes in LilyPond.


This recoding the print routine in scheme sound exactly the kind of
solution I was looking at.
Then that scheme code could be updated with a scheme script in the preamble
of a .ly file,
which would allow "\override Staff.KeySignature #'color =
#color-keysignature".

I would be very grateful, if somebody for whom this recoding is an easy job
could take a catch on this idea.

Best regards,
Heikki Junes
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


bug in german manual

2015-08-17 Thread BB

http://www.lilypond.org/doc/v2.19/Documentation/notation-big-page.de.html#retrograde

in Chapter


   1.2 Rhythmus

...


   Andere rhythmische Aufteilungen

Triolen und andere rhythmische Aufteilungen werden aus einem 
musikalischen Ausdruck erstellt, indem dessen Tondauern mit einem Bruch 
multipliziert werden.


   \timesBruch  musikalischer Ausdruck


Must read  \tuplet instead of \times
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: bug in german manual

2015-08-17 Thread Federico Bruni
German translation is not up-to-date, but just yesterday a person 
volunteered for working on it.

So hopefully this will be fixed.


Il giorno lun 17 ago 2015 alle 18:16, BB  
ha scritto:

http://www.lilypond.org/doc/v2.19/Documentation/notation-big-page.de.html#retrograde

in Chapter
1.2 Rhythmus

...
Andere rhythmische Aufteilungen

Triolen und andere rhythmische Aufteilungen werden aus einem 
musikalischen Ausdruck erstellt, indem dessen Tondauern mit einem 
Bruch multipliziert werden.



\times Bruch musikalischer Ausdruck


Must read  \tuplet instead of \times



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: bug in german manual

2015-08-17 Thread David Kastrup
Federico Bruni  writes:

>
> Il giorno lun 17 ago 2015 alle 18:16, BB 
> ha scritto:
>> http://www.lilypond.org/doc/v2.19/Documentation/notation-big-page.de.html#retrograde
>>
>> in Chapter
>> 1.2 Rhythmus
>>
>> ...
>> Andere rhythmische Aufteilungen
>>
>> Triolen und andere rhythmische Aufteilungen werden aus einem
>> musikalischen Ausdruck erstellt, indem dessen Tondauern mit einem
>> Bruch multipliziert werden.
>>
>>> \times Bruch musikalischer Ausdruck
>>
>> Must read  \tuplet instead of \times
>

> German translation is not up-to-date, but just yesterday a person
> volunteered for working on it.
> So hopefully this will be fixed.
>

I'm afraid the text is quite correct.  It's just not overly helpful as
the examples accompanying it have been automatically converted into
using \tuplet rather than \times.

Just changing \times to \tuplet would render the description wrong:
indeed this requires a retranslation of the new English text.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: bug in german manual

2015-08-17 Thread Blöchl Bernhard

Am 17.08.2015 20:20, schrieb David Kastrup:

Federico Bruni  writes:



Il giorno lun 17 ago 2015 alle 18:16, BB 
ha scritto:

http://www.lilypond.org/doc/v2.19/Documentation/notation-big-page.de.html#retrograde

in Chapter
1.2 Rhythmus

...
Andere rhythmische Aufteilungen

Triolen und andere rhythmische Aufteilungen werden aus einem
musikalischen Ausdruck erstellt, indem dessen Tondauern mit einem
Bruch multipliziert werden.


\times Bruch musikalischer Ausdruck


Must read  \tuplet instead of \times





German translation is not up-to-date, but just yesterday a person
volunteered for working on it.
So hopefully this will be fixed.



I'm afraid the text is quite correct.  It's just not overly helpful as
the examples accompanying it have been automatically converted into
using \tuplet rather than \times.

Just changing \times to \tuplet would render the description wrong:
indeed this requires a retranslation of the new English text.



I do not understand your mail and I am fundamentally confused!

Anyway, I hope you allow me to use
\tuplet fraction { music }
instead of
\times fraction { music }
for what the english and americans call
"tuplets" ?


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: bug in german manual

2015-08-17 Thread Urs Liska
Am 17.08.2015 um 20:50 schrieb Blöchl Bernhard:
> Am 17.08.2015 20:20, schrieb David Kastrup:
>> Federico Bruni  writes:
>>
>>>
>>> Il giorno lun 17 ago 2015 alle 18:16, BB 
>>> ha scritto:
 http://www.lilypond.org/doc/v2.19/Documentation/notation-big-page.de.html#retrograde


 in Chapter
 1.2 Rhythmus

 ...
 Andere rhythmische Aufteilungen

 Triolen und andere rhythmische Aufteilungen werden aus einem
 musikalischen Ausdruck erstellt, indem dessen Tondauern mit einem
 Bruch multipliziert werden.

> \times Bruch musikalischer Ausdruck

 Must read  \tuplet instead of \times
>>>
>>
>>> German translation is not up-to-date, but just yesterday a person
>>> volunteered for working on it.
>>> So hopefully this will be fixed.
>>>
>>
>> I'm afraid the text is quite correct.  It's just not overly helpful as
>> the examples accompanying it have been automatically converted into
>> using \tuplet rather than \times.
>>
>> Just changing \times to \tuplet would render the description wrong:
>> indeed this requires a retranslation of the new English text.
> 
> 
> I do not understand your mail and I am fundamentally confused!

The original post is right, the German translation has not been updated
and must be corrected.

> 
> Anyway, I hope you allow me to use
> \tuplet fraction { music }
> instead of
> \times fraction { music }
> for what the english and americans call
> "tuplets" ?
> 

There has been a change or rather an extension to the syntax in one of
the more recent versions so now you can write, say, a triplet with

\tuplet 3/2 { c4 c c }

which is closer to a "natural" understanding than the earlier

\times 2/3 { c4 c c }

Today both ways are "correct", but the \tuplet syntax is the recommended
way to express tuplets nowadays.

So while technically the current text in the manual is not "wrong" it is
outdated and especially doesn't match the following example.

HTH
Urs

> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


-- 
Urs Liska
www.openlilylib.org

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


guile-question: how to do (apply ly:stencil-combine-at-edge args)?

2015-08-17 Thread Thomas Morley
Hi all,

I want to "put together" an arbitrary number of stencils,
pseudo-code:
(apply
  some-put-together-procedure
  stil-list)

While using `ly:stencil-add', it's quite simple:

#(define (stils n)
  (map
(lambda (n)
  (make-connected-path-stencil
`((0 0) (,n 0) (,n ,n) (0 ,n) (0 0))
0.1
1
1
#f
#f))
 (iota n 1 1)))

\markup
  \stencil
  #(apply ly:stencil-add (stils 3))


But now I want to use `ly:stencil-combine-at-edge' with
axis: X
direction: RIGHT
padding: 0

As if I wrote:

\markup
  \stencil
  #(ly:stencil-combine-at-edge
 (car (stils 3))
 X
 RIGHT
 (ly:stencil-combine-at-edge
   (cadr (stils 3))
   X
   RIGHT
   (caddr (stils 3))
   0)
 0)


I wasn't able to find the correct syntax how to do:
(apply ly:stencil-combine-at-edge )

Any hints?


Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user