lilypond-user
[Top][All Lists]
Advanced

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

Re: Changing notes based on fingerings


From: Eric Knapp
Subject: Re: Changing notes based on fingerings
Date: Thu, 17 Jul 2008 09:16:22 -0500

Hello, Nicolas.

On Thu, Jul 17, 2008 at 8:12 AM, Nicolas Sceaux <address@hidden> wrote:
>
> Do you mean a FingeringEvent music expression, or a Fingering grob?
> Once you have grobs, it's too late for modifying music expressions.
> You can navigate down music expressions, but not up. But see below.

I think I would like the music expression. I didn't know that once I
had a grob it was too late.

> I'm not exactly sure what you're trying to do, but here is my guess.
>
> Based on an input like: a''2-2
> you want to produce something like: [fill in the blank]

I would like to start with: a''2-2
And produce: a''2 with customized NoteHeads and Stems based on the
"-2" fingering. I want to produce a note with a custom notehead and
suppress the fingering numbers.

The notation I'm trying to code indicates fingerings with notehead
shapes, not fingering numbers or letters. But, I would like users to
still be able to indicate fingerings with the normal lilypond notation
like "a-2".

> The process is the following:
>
>  1. \displayMusic a''2-2
> as you have done, to be able to recognize how to get the interesting
> elements
>
>  2. \displayMusic [fill in the blank]
> to see how to programmatically build the result
>
>  3. write a basic music function that transforms the input to the desired
> result.
>
> If what you're working on is complex, at first implement elementary
> transformations. Then, progresseivey merge them in single music function
> that does what you aim at.

I am using this approach with good results. I know the music
expression I want to create. I just need to be able to catch music
expressions so that I can get the fingering number that the user
entered. Then I can create the correct note based on the fingering.

With code like this:

  \override  Fingering #'stencil = #custom-fingerings  %<-- a function

I can intercept any music expression that has a fingering. But, I
receive the Fingering grob in the function. How do I intercept all
music expressions before they are grobs so that I can make them
myself? If this is documented then I'm just missing it and would love
to be enlightened.

>
> nicolas
>
>

Thanks, Nicolas, this is very helpful and educational.

-Eric




reply via email to

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