Re: [frogs] Re: Numeric note heads for singers |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: Neil Puttock <n.puttock@xxxxxxxxx>
- Subject: Re: [frogs] Re: Numeric note heads for singers
- From: Valentin Villenave <v.villenave@xxxxxxxxx>
- Date: Tue, 2 Mar 2010 17:27:02 +0100
- Cc: "pounderd@xxxxxxxxxxx" <pounderd@xxxxxxxxxxx>, Ian Hulin <ian@xxxxxxxxxxxx>, "lilypond-user@xxxxxxx" <lilypond-user@xxxxxxx>, "frogs@xxxxxxxxxxx" <frogs@xxxxxxxxxxx>, c_sorensen@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=X6dOgfgjwe5CAJP46wgHTrpHgTBc62iSZJxUm29DvX4=; b=EpC16pSNb0LVMKDxEcRiLRNpXWLS4XpEfEKCCQFXIGkaafI+V5d4wFGXqbS15LPCCA C/0wYw631ri9exfS8+OCIMZZmGSg73juV6Ct6wsqTCBmUkPqGep4wnPQvwVyn1r1TLYE i/d4ETC/g+L5tufYOArQ7jiiGDwUvWaiTIBjk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=i3poy2+/58EqPYYBlj0wg7kawNAhe9rmRabnXl2o8hhX39QczV0OMDwhN7p+hP/A/L 4FRefUTPBk8jS3GpRw25T/rHSyNi2VXnz4SHCruV9N4CnMgOKwz6YxPTp7AOub6+rW9w oTzV1HpQ++hJPzG88YppXpX6BvssZE3bGjgow=
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!