[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [frogs] Re: Numeric note heads for singers
From: |
Valentin Villenave |
Subject: |
Re: [frogs] Re: Numeric note heads for singers |
Date: |
Tue, 2 Mar 2010 17:27:02 +0100 |
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, address@hidden
<address@hidden> 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 <address@hidden> wrote:
> This is rather nifty, but it would be much simpler just to create the
> vector directly:
> (make-vector (number->string (1+ delta)))
- Re: [frogs] Re: Numeric note heads for singers,
Valentin Villenave <=