[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: accidentals for just intonation
From: |
Paul Morris |
Subject: |
Re: accidentals for just intonation |
Date: |
Tue, 1 Dec 2015 09:56:06 -0500 |
> On Dec 1, 2015, at 5:38 AM, Urs Liska <address@hidden> wrote:
>
> You have a rather small number of individual components (vertical,
> horizontal and diagonal elements) that can all represented by a
> postscript path. A function should be able to determine from the input
> ratio which of these elements have to be combined and then generate the
> appropriate path and eventually use that to replace Accidental.stencil.
Yep, sounds like a matter of creating path stencils for each component part, as
static unchanging building blocks, and then have a function that dynamically
combines these stencils to produce the accidental needed for a given note.
Combining stencils in different ways is simpler than producing a path on the
fly, so that will make things easier.
I have done this kind of thing by creating an SVG with Inkscape and then
opening the SVG file in a text editor where I can copy the path coordinates.
Then I can paste those coordinates into a LilyPond include file, in a procedure
that produces a path stencil. (With some tedious back and forth to get the
scaling right.) Then that stencil is available to use by LilyPond.
For Clairnote music notation I have code that replaces accidental signs with
custom accidentals[0] that might be helpful to look at. It combines a dot
stencil with a line stencil, so no paths are needed. However, I also use path
coordinates to create whole note glyphs, so there’s an example of that as well.
That code is available here:
http://clairnote.org/software/
[0] http://clairnote.org/accidental-signs/
> How these paths can be created is something I won't be of much help, but
> if you get to the point where you have very concrete necessities you'll
> surely be able to get help by others with more experience in that.
There are several ways to create a stencil from a path. Search the LSR for
“path” for two different ways in addition to the \path markup command. The
most recent development version of LilyPond (2.19.x) also has a
make-path-stencil function that combines the benefits of the two ways
documented on the LSR without their drawbacks, so I prefer to use that unless
I’m supporting LilyPond 2.18.
-Paul
- accidentals for just intonation, N. Andrew Walsh, 2015/12/01
- Re: accidentals for just intonation, Urs Liska, 2015/12/01
- Re: accidentals for just intonation, N. Andrew Walsh, 2015/12/01
- Re: accidentals for just intonation, Urs Liska, 2015/12/01
- Re: accidentals for just intonation,
Paul Morris <=
- Re: accidentals for just intonation, Urs Liska, 2015/12/03
- Message not available
- Message not available
- Re: accidentals for just intonation, N. Andrew Walsh, 2015/12/12
- converting svg glyph to path data for use in scheme (was: accidentals for just intonation), Paul Morris, 2015/12/12
- Re: converting svg glyph to path data for use in scheme (was: accidentals for just intonation), Johan Vromans, 2015/12/12
- Re: converting svg glyph to path data for use in scheme (was: accidentals for just intonation), N. Andrew Walsh, 2015/12/12
- Re: converting svg glyph to path data for use in scheme (was: accidentals for just intonation), mskala, 2015/12/13
- Re: converting svg glyph to path data for use in scheme (was: accidentals for just intonation), N. Andrew Walsh, 2015/12/13
- Re: converting svg glyph to path data for use in scheme (was: accidentals for just intonation), mskala, 2015/12/13
- Re: converting svg glyph to path data for use in scheme (was: accidentals for just intonation), N. Andrew Walsh, 2015/12/13
- Re: converting svg glyph to path data for use in scheme (was: accidentals for just intonation), Paul Morris, 2015/12/12