Accessing context properties (e.g. the current key) from a music function?

2015-04-30 Thread Leah Velleman
I'm looking to write a \transpose-like music function that will need to be able to "find out" what the current key is. (In case it matters: The reason I'm doing this is to make it possible to enter music using movable-do solfege. The idea is to have a function \movableDo that will transpose from C

Re: Accessing context properties (e.g. the current key) from a music function?

2015-04-30 Thread Leah Velleman
Hi Leah, > > On Thu, Apr 30, 2015 at 3:16 PM, Leah Velleman > wrote: > >> I'm looking to write a \transpose-like music function that will need to >> be able to "find out" what the current key is. >> >> (In case it matters: The reason I'm doing

Re: Accessing context properties (e.g. the current key) from a music function?

2015-04-30 Thread Leah Velleman
> > To do something like you want, you really would need access to context > properties > Ok — good to know I haven't missed some simple solution. It seems like there ought to be some way of smuggling information out of an \applyContext. But I guess there's a variable scope issue that keeps y

Re: Accessing context properties (e.g. the current key) from a music function?

2015-04-30 Thread Leah Velleman
Oh goodness, something heinous happened to the formatting there. Let me try that again. k = "ERROR" test = #(define-music-function (parser location music) (ly:music?) #{ \applyContext #(lambda (context) (set! k (ly:context-property context 'tonic)) (display k) )

Re: Suggest a condensed old style or transitional font for lyrics?

2015-05-01 Thread Leah Velleman
I use ITC Century Condensed for lyrics, which looks nice next to titles etc in the default New Century Schoolbook. Not at all Minion-y, and not free, but maybe still useful. On Thu, Apr 30, 2015 at 7:02 PM, Simon Albrecht wrote: > Am 30.04.2015 um 20:57 schrieb Urs Liska: > > > > Am 30.04.2015

Re: Accessing context properties (e.g. the current key) from a music function?

2015-05-05 Thread Leah Velleman
> > The problem arises because \applyContext is evaluated later than > \transpose. When music functions do their work, contexts have not been > created yet, > > The output shows that the original binding of k is in effect when > \transpose is called. > Aha! Thank you — that makes sense. _

Custom headers: testing for the first page of a piece (not of a bookpart or book)?

2015-05-07 Thread Leah Velleman
Dear all, I'm trying to set up custom book headers such that, if a piece runs over a page break, the header on the second and subsequent pages will say "PIECE (continued)". Lilypond has predefined procedures to check whether a page is the first page of a *book,* or the first page of a *bookpart.*

Volta font

2019-06-20 Thread Leah Velleman
Is it possible to change the font used for volta numbers? In the list archives I've seen options for customizing the volta *text*, some of which could be used with \text or \markup to change the font in addition. But I don't want to have to manually specify text and markup commands every time I ha

Re: Volta font

2019-06-20 Thread Leah Velleman
Beautiful -- thanks! On Thu, Jun 20, 2019 at 12:29 PM Thomas Morley wrote: > Am Do., 20. Juni 2019 um 18:21 Uhr schrieb Leah Velleman > : > > > > Is it possible to change the font used for volta numbers? > > > > In the list archives I've seen options for cu

Inserting alternative endings from a music function

2019-06-26 Thread Leah Velleman
I'm writing a music function to insert a specific pattern of alternative endings with partial measures. Lilypond gives an error suggesting the \alternative block is in the wrong place, even though writing it in the same place by hand gives no error. For instance, this works as you'd expect: \vers

Turning off or stripping out bar checks

2019-07-06 Thread Leah Velleman
Is there a way to turn off bar checks? Or to write a music function that strips out bar checks? Or does anyone have suggestions on where to start looking for such things? Here's the situation. Most of what I write (largely Sacred Harp fuguing tunes) triggers a known limitation around bar checks.

Detecting first and last pages of a score

2019-09-02 Thread Leah Velleman
In https://github.com/lilypond/lilypond/blob/master/ly/titling-init.ly there are predicates that detect if the current page is the first or last one of a *book*, or of a *bookpart*. But it's not clear to me how to generalize from there. How would I detect if the current page was the first or last p

Re: Detecting first and last pages of a score

2019-09-03 Thread Leah Velleman
9 at 8:30 PM Andrew Bernard wrote: > To do what? > > Andrew > On 3/9/19 7:48 am, Leah Velleman wrote: > > In https://github.com/lilypond/lilypond/blob/master/ly/titling-init.ly there > are predicates that detect if the current page is the first or last one of > a *book*, o

Re: Detecting first and last pages of a score

2019-09-06 Thread Leah Velleman
nard writes: > > >> On 3/9/19 7:48 am, Leah Velleman wrote: > >>> In > >>> https://github.com/lilypond/lilypond/blob/master/ly/titling-init.ly > there > >>> are predicates that detect if the current page is the first or last > >>> one of

Re: Detecting first and last pages of a score

2019-09-06 Thread Leah Velleman
This is a very interesting approach! It wouldn't have occurred to me to handle it like this — thank you for taking the time to spell it out and code it up. I'll give it a try! Thanks, LV On Fri, Sep 6, 2019 at 8:01 PM Thomas Morley wrote: > Am Sa., 7. Sept. 2019 um 01:42 Uhr schrieb Thomas Morl

Installing missing Guile modules in order to

2019-09-23 Thread Leah Velleman
Attempting to follow the instructions here for setting a breakpoint http://lilypond.org/doc/v2.19/Documentation/contributor/debugging-scheme-code gets me several errors: /Applications/LilyPond.app/Contents/Resources/share/lilypond/current/ly/guile-debugger.ly:39:2: error: GUILE signaled an err

Re: Installing missing Guile modules in order to

2019-09-23 Thread Leah Velleman
I'm afraid the information I see at https://github.com/lilypond/lilypond/blob/master/Documentation/usage/running.itely , or at http://partitura.org/wp-content/uploads/lilypond/html/Documentation/usage/command_002dline-usage.html#relocation-files which appears to be a compiled version, isn't enough