Re: [frogs] Re: Numeric note heads for singers

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


Guys,

where are we with regard to this feature (see below)? It would be nice
to have it somewhere, either as a snippet or... you name it ;)

Cheers,
Valentin

On Sun, Jan 10, 2010 at 11:57 PM, pounderd@xxxxxxxxxxx
<pounderd@xxxxxxxxxxx> wrote:
>  #(define ez-numbers-engraver (list
>  (cons 'acknowledgers
>   (list
>     (cons 'note-head-interface
>       (lambda (engraver grob source-engraver)
>         (let* (
>           (context (ly:translator-context engraver))
>           (tonic (ly:context-property context 'tonic))
>           (tonic-index (ly:pitch-notename tonic))
>           (grob-pitch (ly:event-property (event-cause grob) 'pitch))
>           (grob-index (ly:pitch-notename grob-pitch))
>           (delta (modulo (- grob-index tonic-index) 7))
>           (note-names
>             (map
>               (lambda (x)
>                 (list->string
>                   (list
>                     (integer->char
>                       (+ 1 delta (char->integer #\0))))))
>              '(0 1 2 3 4 5 6))))
>        (ly:grob-set-property! grob 'note-names (list->vector note-
> names)))))))))
>
>
> \layout {
>  \context {
>    \Voice
>    \consists \ez-numbers-engraver
>  }
> }
>
> \relative c' {
>  \easyHeadsOn
>  c d e f g a b c
>  \key a \major
>  a, b c d e f g a
>  \key b \dorian
>  b, c d e f g a b
> }

On Mon, Jan 11, 2010 at 12:42 AM, Neil Puttock <n.puttock@xxxxxxxxx> wrote:
> This is rather nifty, but it would be much simpler just to create the
> vector directly:
> (make-vector (number->string (1+ delta)))

---
----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/