Re: [frogs] Re: Numeric note heads for singers |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: Carl Sorensen <c_sorensen@xxxxxxx>
- Subject: Re: [frogs] Re: Numeric note heads for singers
- From: Neil Puttock <n.puttock@xxxxxxxxx>
- Date: Thu, 7 Jan 2010 20:53:14 +0000
- Cc: "pounderd@xxxxxxxxxxx" <pounderd@xxxxxxxxxxx>, Lilypond Frogs List <frogs@xxxxxxxxxxx>
- 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 :content-transfer-encoding; bh=ROmZNU5zzvcxr5OWbdlmiHtWdOJTB609w4/hoaE8NfM=; b=hUrUaBCHQCWsltJWyeMOBJqGOCAW6PpCm1hvDmiktpB0rzmNvSuSD/hlJxzTR72YtE c8/a89DaeHY2l42Zeya3JqPKG0dZMU+8ELUfT0EXIuOZsMy1KUav4rvWX/dWlqQWoMsr aaktjhxVlxaMDcJEbedM/1NKOpU8m2cBlrRR4=
- 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:content-transfer-encoding; b=MCSowgOXoiO5+ZdGEFaSzea7BCnt69lhgL4jE4WF0eF6Pb3MloXuk8+x6xNn75ynEr NVZqImuRaO27v4smzNXSBHpY+EVaXSc2/HT8SQnr26cOyJDmAWBxpo71sFC9etsrCX5R 5jpVK48hRmvsBvwhIab0dYaAbcSx33LccDXko=
2010/1/7 Carl Sorensen <c_sorensen@xxxxxxx>:
> On 1/6/10 12:30 PM, "pounderd@xxxxxxxxxxx" <pounderd@xxxxxxxxxxx> wrote:
>>>
>> UNIX-mode on:
>>
>> After unsuccessfully trying to find a way to access the tonic
>> information from the stencil callback, I've finally realised that the
>> contexts don't exist when the stencils are called. It therefore seems
>> that I'm going to need to modify the engraver to set the scale-degree
>> as an internal grob property.
>>
>> To do this I'm going to have to set-up a dual boot, re-read all the
>> git stuff and practice building and testing, so please shriek if I'm
>> going down the wrong route :)
>
> Actually, I think you've got it exactly nailed. I didn't foresee this
> difficulty when I said it would be an easy job...
I think this approach is wrong: since you need to specify the start
pitch (i.e., the note which will be labelled `1'), which could be in
any octave, knowing the tonic (from which a scale degree would be
computed) isn't very useful.
Depending on whether this feature is considered useful enough to be
part of LilyPond, I'd suggest one of the following alternatives:
-) Write a callback for 'note-names which would take a starting pitch,
comparing it with the current NoteHead's pitch to build the vector.
Since this would be evaluated each time a NoteHead needs printing, it
would be easy just to make a seven-element vector with the same
string. This is a crude hack, but suitable for an LSR snippet.
-) Add the start-pitch as an optional argument to
note-head::brew-ez-stencil, which would be used as above for
comparison with the current pitch. This is more elegant since it
doesn't abuse the 'note-names property.
In either case, a music function could be used to pass the pitch as
music (rather than having to use ly:make-pitch directly), then either
overriding 'note-names or adding the optarg to the stencil callback.
Regards,
Neil
---
----
Join the Frogs!