lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nashville notation as chord symbols


From: David Nalesnik
Subject: Re: Nashville notation as chord symbols
Date: Wed, 17 Jun 2015 06:32:55 -0500

Hi Amelie,

On Wed, Jun 17, 2015 at 4:52 AM, Amelie Zapf <address@hidden> wrote:
Hi all,

> What's left now is to isolate this function and put it into the other
> code we already have.


Rather, you need to put your code into an engraver.  You then "consist" the engraver to a context.   You can't get at it within your function.  (You may be able to do something with \applyContext, but I didn't have any luck when I tinkered around with this.)
 
I just had a go at it and am running into problems left and right. If I
call (myrootpitch (ly:context-property somecontext 'tonic)) I need a
context as input. The usual context names (like Staff) don't work. The
original function got the context from the ly:translator-context
function. This one, however, requires a translator object as input. In
the documentation, I haven't found a proper explanation what exactly
constitutes a translator object.


The context is easily available to a Scheme engraver, either through ly:translator-context (as here) or as a parameter of the engraver definition:

#(define myEngraver
   (lambda (context)
     (make-engraver

[...]


Hope this helps.
David

reply via email to

[Prev in Thread] Current Thread [Next in Thread]