naming a glyph

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

naming a glyph

Freeman Gilmore

Where are the rules for naming a glyph located?    And where is the list of reserved words?

Thank you,

ƒg


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: naming a glyph

David Kastrup
Freeman Gilmore <[hidden email]> writes:

> ​
>
> Where are the rules for naming a glyph located?    And where is the
> list of *reserved
> words*?

The latter is in lily/lily-lexer.cc .  I have no idea whether there is a
place in the internals where you could see them listed.  At least I
don't remember one.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: naming a glyph

David Kastrup
David Kastrup <[hidden email]> writes:

> Freeman Gilmore <[hidden email]> writes:
>
>> ​
>>
>> Where are the rules for naming a glyph located?    And where is the
>> list of *reserved
>> words*?
>
> The latter is in lily/lily-lexer.cc .  I have no idea whether there is a
> place in the internals

I mean, a place in the documentation.

> where you could see them listed.  At least I don't remember one.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: naming a glyph

Torsten Hämmerle
In reply to this post by Freeman Gilmore
Freeman Gilmore wrote
> ​Where are the rules for naming a glyph located?


The naming conventions for glyph names can be found in mf/README:


mf/README wrote

> Glyph name rules

>
> Most glyph names have the form
> <group>
> .
> <name>
> , where
> <group>
>  is defined with the 'fet_begingroup' command, and
> <name>
>  is given with 'fet_beginchar' (within a 'fet_begingroup' block).
> Example: 'clefs.vaticana.fa'.
>
> Sometimes it would be sensible to use negative numbers in glyph names.
> However, the '-' character shouldn't be used in a glyph name.  Replace it
> with 'M'.  For example, write 'rests.M3mensural' instead of
> 'rests.-3mensural'.
>
> Glyphs that exist in both an 'up' and 'down' version should start the
> <name>
>  part with either 'u' or 'd', respectively.  Example: 'flags.d3',
> 'flags.u3'.  Glyphs that are neutral w.r.t. the direction, and where
> members of the glyph group exist that have 'up' and 'down' versions,
> should start with an 's'.  
> Example: 'noteheads.s0re'.


All the Emmentaler glyph names can be found in the  LilyPond Notation
Reference: Appendix A.8 - The Emmentaler font
<http://lilypond.org/doc/v2.19/Documentation/notation/the-emmentaler-font.html>  

You can generate a list of all the Emmentaler glyph names using the scheme
function ly:otf-glyph-list:

  #(pretty-print (ly:otf-glyph-list (ly:system-font-load "emmentaler-20")))


HTH,
Torsten





--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: naming a glyph

Freeman Gilmore

On Sun, May 20, 2018 at 5:01 AM, Torsten Hämmerle <[hidden email]> wrote:
Freeman Gilmore wrote
> ​Where are the rules for naming a glyph located?


The naming conventions for glyph names can be found in mf/README:


mf/README wrote

> Glyph name rules

>
> Most glyph names have the form
> <group>
> .
> <name>
> , where
> <group>
>  is defined with the 'fet_begingroup' command, and
> <name>
>  is given with 'fet_beginchar' (within a 'fet_begingroup' block).
> Example: 'clefs.vaticana.fa'.
>
> Sometimes it would be sensible to use negative numbers in glyph names.
> However, the '-' character shouldn't be used in a glyph name.  Replace it
> with 'M'.  For example, write 'rests.M3mensural' instead of
> 'rests.-3mensural'.
>
> Glyphs that exist in both an 'up' and 'down' version should start the
> <name>
>  part with either 'u' or 'd', respectively.  Example: 'flags.d3',
> 'flags.u3'.  Glyphs that are neutral w.r.t. the direction, and where
> members of the glyph group exist that have 'up' and 'down' versions,
> should start with an 's'. 
> Example: 'noteheads.s0re'.


All the Emmentaler glyph names can be found in the  LilyPond Notation
Reference: Appendix A.8 - The Emmentaler font
<http://lilypond.org/doc/v2.19/Documentation/notation/the-emmentaler-font.html

You can generate a list of all the Emmentaler glyph names using the scheme
function ly:otf-glyph-list:

  #(pretty-print (ly:otf-glyph-list (ly:system-font-load "emmentaler-20")))


HTH,
Torsten

This is still confusing, I read mf/README several time before asked my question.   The above helps.  I do not know how to ask this because this is all new to me.   Say I was going to create the glyph “#” for the first time.   Using the naming convention I name it “accidentals.sharp” (if this is the complete name?).   BUT I would use the name (or one of it equals) “…is” to print “#...”?

Why two names?

What convention is used for the second name (not a part of mf/readme); this is the one I am more interested in?

Is “#” markup (not clear what this means)?

Thank you,

ƒg



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: naming a glyph

Torsten Hämmerle
Freeman Gilmore wrote
> ​Say I was going to create the glyph “#” for the first
> time.

What exactly do you mean by "create the glyph"?
The glyph is contained in the music font, and as most of the music glyphs,
it doesn't even have a fixed character code and even move around when new
glyphs are being added in later releases.
Therefore, they have to be accessed by their names.
The naming conventions just help to get them organized in a way.

By the way: even "ordinary" PostScript fonts do have glyph names that may
differ from what you actually type.
For example, "5" ist named "five" or "!" is named "exclam".



Freeman Gilmore wrote
> ​Using the naming convention I name it “accidentals.sharp” (if this
> is the complete name?).   BUT I would use the name (or one of it equals)
> “…is” to print “#...”? *

The point is that in everyday LilyPond usage, you do not need to know or
enter the glyph name at all.
And, by the way a sharp accidental is not a # (number sign).

LilyPond interprets your code and generates output from it. When you write
"fis", for instance, this will produce a notehead (the specific notehead
glyph depends on the duration) plus (eventually) a sharp accidental in front
of it. In the key of G major, however, it will not print a sharp accidental,
because it's contained in the key signature.
In addition to that, depending on the duration, the note will have a stem
(or not). This stem may have different lengths depending on the
circumstances. This stem may have different directions.
The stem may have a flag (different flag glyphs depending on the duration).
Or it may be beamed (depending on the neighbouring notes an the beat
structure and its position within the measure).

As you can see, a simple "fis" entry may produce many different glyphs.

This all happens without having to know a single glyph name.

Extreme example: in guitar tablature, a "fis" will be a fret number on a
string.



Freeman Gilmore wrote
> ​*Why two names?*

It's not two names, it's a code being interpreted for producing a complex
combination of glyphs and graphical elements. These single elements may be
glyphs of a font using internal glyph names.


There is, however, one notable exception: if needed, every single music
glyph can be accessed by its name in a markup text.

\markup \line { In older prints,
  a quarter rest \musicglyph "rests.2"
  often looks like \musicglyph "rests.2classical" }

<http://lilypond.1069038.n5.nabble.com/file/t3887/markup-musicglyph.png>




Freeman Gilmore wrote
> ​*What convention is used for the second name (not a part of mf/readme);
> this is the one I am more interested in?*

I guess by "second name" you mean the "...is" suffix.
But this is not a glyph name but part of a note name that will be converted
into one or more glyphs at certain positions.
By the way, LilyPond allows note names to be entered using several
languages.
But a Dutch or German fis will produce exactly the same glyphs as an English
fs or f-sharp or a French fad (fa dièse) --- all will produce the same
output.

So, depending on the input language used, one and the same note may have
different names.

Even more importantly, even within one language, all the different note
names (c, d, e, f, g, a, ...) will use the same glyphs (in different stave
positions, though) and depending on their duration, a "c" may have many
different noteheads (i.e. notehead glyphs), may have a stem or not, may one
of different flags (i.e. flag glyphs) or not, may be beamed, etc.

As you can see, a "fis" may look different depending on the surrounding
circumstances.

Generally, any markup language will interpret contents and syntax and
produce an output from it.
There is no simple 1:1 relationship between text code input and the actual
output.
In C major, the first fis in a bar will get a sharp accidental, but the next
one won't get an accidental.

This is important for several reasons.
Just imagine you'd have to code every single glyph used instead of entering
meaning and contents, i.e. music.
Then it'd be virtually impossible to transpose or play back the music.

All the best,
Torsten




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: naming a glyph

Andrew Bernard
In reply to this post by Freeman Gilmore
Hi Freeman,

Let us know what you re trying to do. Why do you want to create a glyph?

Are you new to lilypond? If so, welcome to the Pond!

Andrew


On 20 May 2018 at 22:44, Freeman Gilmore <[hidden email]> wrote:

On Sun, May 20, 2018 at 5:01 AM, Torsten Hämmerle <[hidden email]> wrote:
Freeman Gilmore wrote
> ​Where are the rules for naming a glyph located?


The naming conventions for glyph names can be found in mf/README:


mf/README wrote

> Glyph name rules

>
> Most glyph names have the form
> <group>
> .
> <name>
> , where
> <group>
>  is defined with the 'fet_begingroup' command, and
> <name>
>  is given with 'fet_beginchar' (within a 'fet_begingroup' block).
> Example: 'clefs.vaticana.fa'.
>
> Sometimes it would be sensible to use negative numbers in glyph names.
> However, the '-' character shouldn't be used in a glyph name.  Replace it
> with 'M'.  For example, write 'rests.M3mensural' instead of
> 'rests.-3mensural'.
>
> Glyphs that exist in both an 'up' and 'down' version should start the
> <name>
>  part with either 'u' or 'd', respectively.  Example: 'flags.d3',
> 'flags.u3'.  Glyphs that are neutral w.r.t. the direction, and where
> members of the glyph group exist that have 'up' and 'down' versions,
> should start with an 's'. 
> Example: 'noteheads.s0re'.


All the Emmentaler glyph names can be found in the  LilyPond Notation
Reference: Appendix A.8 - The Emmentaler font
<http://lilypond.org/doc/v2.19/Documentation/notation/the-emmentaler-font.html

You can generate a list of all the Emmentaler glyph names using the scheme
function ly:otf-glyph-list:

  #(pretty-print (ly:otf-glyph-list (ly:system-font-load "emmentaler-20")))


HTH,
Torsten

This is still confusing, I read mf/README several time before asked my question.   The above helps.  I do not know how to ask this because this is all new to me.   Say I was going to create the glyph “#” for the first time.   Using the naming convention I name it “accidentals.sharp” (if this is the complete name?).   BUT I would use the name (or one of it equals) “…is” to print “#...”?

Why two names?

What convention is used for the second name (not a part of mf/readme); this is the one I am more interested in?

Is “#” markup (not clear what this means)?

Thank you,

ƒg



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: naming a glyph

Freeman Gilmore

On Sun, May 20, 2018 at 7:36 PM, Andrew Bernard <[hidden email]> wrote:
Hi Freeman,

Let us know what you re trying to do. Why do you want to create a glyph?

Are you new to lilypond? If so, welcome to the Pond!

Andrew

Andrew and others that have responded, thank you:

 

I will start over.   What I was trying to say is that the # (my example) is a new glyph to Lilypond; and it has the name “accidentals.sharp” and the code “is” (and others).   I am trying to understand this because I want to create some accidentals of my own.

 

I assume that the “#” is not ‘markup’.  I do not understand what ‘markup’ is; I do know that is has something to do with text.

 

Also, I know that some of the accident are created with markup. 

 

My original question was how is a glyph correctly named?  I have read mf/README several times I think I have that part.  

 

Then there is the code name, what is the correct way to name the code?   Why two names; why not just the code name?

 

For my use I would like to be able to use one or more glyphs with a note.    

 

I would like to start by using an unused accidental section of the SMuFL Unicode.

 

Thank you,

ƒg

 

 

 

 


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: naming a glyph

James Correa
Hi Freeman,

If I understand you correct this might help you:


All the best,

James
---
James Correa
Composer - guitarist - sound designer


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On May 20, 2018 11:39 PM, Freeman Gilmore <[hidden email]> wrote:



On Sun, May 20, 2018 at 7:36 PM, Andrew Bernard <[hidden email]> wrote:
Hi Freeman,

Let us know what you re trying to do. Why do you want to create a glyph?

Are you new to lilypond? If so, welcome to the Pond!

Andrew

Andrew and others that have responded, thank you:

 


I will start over.   What I was trying to say is that the # (my example) is a new glyph to Lilypond; and it has the name “accidentals.sharp” and the code “is” (and others).   I am trying to understand this because I want to create some accidentals of my own.


 


I assume that the “#” is not ‘markup’.  I do not understand what ‘markup’ is; I do know that is has something to do with text.


 


Also, I know that some of the accident are created with markup. 


 


My original question was how is a glyph correctly named?  I have read mf/README several times I think I have that part.  


 


Then there is the code name, what is the correct way to name the code?   Why two names; why not just the code name?


 


For my use I would like to be able to use one or more glyphs with a note.    


 


I would like to start by using an unused accidental section of the SMuFL Unicode.


 


Thank you,

ƒg


 


 


 


 




_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: naming a glyph

Jacques Menu Muzhic
Can you supply a picture of what you’d like to obtain?

JM

Le 22 mai 2018 à 16:55, James.Correa <[hidden email]> a écrit :

Hi Freeman,

If I understand you correct this might help you:


All the best,

James
---
James Correa
Composer - guitarist - sound designer


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On May 20, 2018 11:39 PM, Freeman Gilmore <[hidden email]> wrote:



On Sun, May 20, 2018 at 7:36 PM, Andrew Bernard <[hidden email]> wrote:
Hi Freeman,

Let us know what you re trying to do. Why do you want to create a glyph?

Are you new to lilypond? If so, welcome to the Pond!

Andrew

Andrew and others that have responded, thank you:
 

I will start over.   What I was trying to say is that the # (my example) is a new glyph to Lilypond; and it has the name “accidentals.sharp” and the code “is” (and others).   I am trying to understand this because I want to create some accidentals of my own.

 

I assume that the “#” is not ‘markup’.  I do not understand what ‘markup’ is; I do know that is has something to do with text.

 

Also, I know that some of the accident are created with markup. 

 

My original question was how is a glyph correctly named?  I have read mf/README several times I think I have that part.  

 

Then there is the code name, what is the correct way to name the code?   Why two names; why not just the code name?

 

For my use I would like to be able to use one or more glyphs with a note.    

 

I would like to start by using an unused accidental section of the SMuFL Unicode.

 

Thank you,
ƒg

 

 

 

 


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: naming a glyph

Freeman Gilmore
In reply to this post by James Correa
James:

I have read this before.   I was thinking that if I place the ​accidentals in SMuFL local font file I could call them from there using the example form the article.    At this point I only have some ideas about the way the accidentals should look. I need to know how Lilypond handles microtonal fonts from SMuFL   I need to  use one or more accidentals per note.  Some of the accidentals in SMuFL are intended to be used this way; but I do not know if Lilypond will do this.  I need to try some things with this.    SMuFL give the specifications for designing fonts; which does not look that hard once I learn how to run the graphics program.

Thank you,
ƒg



On Tue, May 22, 2018 at 10:55 AM, James.Correa <[hidden email]> wrote:
Hi Freeman,

If I understand you correct this might help you:


All the best,

James
---
James Correa
Composer - guitarist - sound designer


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On May 20, 2018 11:39 PM, Freeman Gilmore <[hidden email]> wrote:



On Sun, May 20, 2018 at 7:36 PM, Andrew Bernard <[hidden email]> wrote:
Hi Freeman,

Let us know what you re trying to do. Why do you want to create a glyph?

Are you new to lilypond? If so, welcome to the Pond!

Andrew

Andrew and others that have responded, thank you:

 


I will start over.   What I was trying to say is that the # (my example) is a new glyph to Lilypond; and it has the name “accidentals.sharp” and the code “is” (and others).   I am trying to understand this because I want to create some accidentals of my own.


 


I assume that the “#” is not ‘markup’.  I do not understand what ‘markup’ is; I do know that is has something to do with text.


 


Also, I know that some of the accident are created with markup. 


 


My original question was how is a glyph correctly named?  I have read mf/README several times I think I have that part.  


 


Then there is the code name, what is the correct way to name the code?   Why two names; why not just the code name?


 


For my use I would like to be able to use one or more glyphs with a note.    


 


I would like to start by using an unused accidental section of the SMuFL Unicode.


 


Thank you,

ƒg


 


 


 


 





_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: naming a glyph

Freeman Gilmore
In reply to this post by Jacques Menu Muzhic
​Jacques:

The ez way is to picture a peace of music with accidentals then replace them with microtonal accidentals, but of a different design than what is out there.   I have several ideas for the design of each glyph, I know what I want them to abdicate, and I want them to be more intuitive (no memorizing). 

Thank you,
ƒg    

On Tue, May 22, 2018 at 12:43 PM, Jacques Menu Muzhic <[hidden email]> wrote:
Can you supply a picture of what you’d like to obtain?

JM

Le 22 mai 2018 à 16:55, James.Correa <[hidden email]> a écrit :

Hi Freeman,

If I understand you correct this might help you:


All the best,

James
---
James Correa
Composer - guitarist - sound designer


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On May 20, 2018 11:39 PM, Freeman Gilmore <[hidden email]> wrote:



On Sun, May 20, 2018 at 7:36 PM, Andrew Bernard <[hidden email]> wrote:
Hi Freeman,

Let us know what you re trying to do. Why do you want to create a glyph?

Are you new to lilypond? If so, welcome to the Pond!

Andrew

Andrew and others that have responded, thank you:
 

I will start over.   What I was trying to say is that the # (my example) is a new glyph to Lilypond; and it has the name “accidentals.sharp” and the code “is” (and others).   I am trying to understand this because I want to create some accidentals of my own.

 

I assume that the “#” is not ‘markup’.  I do not understand what ‘markup’ is; I do know that is has something to do with text.

 

Also, I know that some of the accident are created with markup. 

 

My original question was how is a glyph correctly named?  I have read mf/README several times I think I have that part.  

 

Then there is the code name, what is the correct way to name the code?   Why two names; why not just the code name?

 

For my use I would like to be able to use one or more glyphs with a note.    

 

I would like to start by using an unused accidental section of the SMuFL Unicode.

 

Thank you,
ƒg

 

 

 

 


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: naming a glyph

Aaron Hill
On 2018-05-23 13:25, Freeman Gilmore wrote:

> The ez way is to picture a peace of music with accidentals then replace
> them with microtonal accidentals, but of a different design than what
> is
> out there.   I have several ideas for the design of each glyph, I know
> what
> I want them to abdicate, and I want them to be more intuitive (no
> memorizing).
>
> Thank you,
> ƒg

Hi Freeman,

Now that you have mentioned microtonality more clearly--I admit I was
confused by your original request, thinking only that you wanted to
change the look of an existing accidental--would the following
information be of any use to you?

http://x31eq.com/lilypond/

In particular, the section on accidentals mentions that you can define
your own alist of symbols that correspond to fractions of wholetones.  
You should be able to use `ly:make-pitch` to define the microtones as
you need them.  It should even be possible to follow the example in
`define-note-names.scm` to define your own language so you can more
easily specify the accidentals.  Then you could theoretically use these
new notes in a normal fashion:

%%%%
   \version "2.19.81"

   \layout {
     \context {
       \Score
       \override Accidental #'glyph-name-alist =
         #'((2/3 . "accidentals.natural.arrowup")
            (-3/5 . "accidentals.mirroredflat.backslash"))
     }
   }

   #(set! language-pitch-names
     `((custom . (
       (xu . ,(ly:make-pitch 0 3 2/3))
       (xd . ,(ly:make-pitch 0 3 -3/5))
       (yu . ,(ly:make-pitch 0 5 2/3))
       (yd . ,(ly:make-pitch 0 5 -3/5))
       (zu . ,(ly:make-pitch 0 7 2/3))
       (zd . ,(ly:make-pitch 0 7 -3/5))
     ))))

   \language "custom"
   { xu4 xd8( zu yd) zd~ zd2 }
%%%%

You would of course still need to add your custom glyphs for accidentals
in the font.  In the example above, I just borrowed two of the
accidentals and mapped them to the two-thirds up and three-fifths down
pitches.  But ultimately that is where the binding between pitch and
glyph happen.

-- Aaron Hill

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user