From SVG files to path stencils in LilyPond

195 views
Skip to first unread message

Paul Morris

unread,
Jan 12, 2014, 3:03:42 PM1/12/14
to musicn...@googlegroups.com
Hi Jan and John,
I think I have an idea.  If you can somehow generate SVG files for your clefs and/or note head shapes in your font files, then it looks like we could open those SVG files in a text editor and get at the actual path values used to draw them.  Then we could put those path values directly into LilyPond/Scheme code.  It turns out that SVG files use the same kinds of path commands that are used to draw a stencil in LilyPond (or rather the other way around, LilyPond's make-connected-path-stencil uses the same commands found in the SVG format).


I tried it on a simple SVG file (generated by LilyPond) and it looks like it should work.

Cheers,
-Paul


Paul Morris

unread,
Jan 12, 2014, 3:06:50 PM1/12/14
to musicn...@googlegroups.com
Maybe this will help?  -Paul

Jan Braunstein

unread,
Jan 12, 2014, 4:53:20 PM1/12/14
to musicn...@googlegroups.com
 Will do. Looking at it right now...

Jan 

Jan Braunstein

unread,
Jan 12, 2014, 7:51:52 PM1/12/14
to musicn...@googlegroups.com
Done :-)

Tried that with autotracer first but the the result is a bit chaotic (although it should work too).
Then I managed to convert the glyphs to Ai format (Ilustrator) and from that to svg which was a bit tricky. The code inside the files looks much more simple to me though.
Still no idea what to do with it now...  
The glyphs are attached in zip file.

Cheers,
Jan

Jan Braunstein

unread,
Jan 12, 2014, 8:06:10 PM1/12/14
to musicn...@googlegroups.com
Forgot to attach the file...
 
LN_SVG.zip

Paul Morris

unread,
Jan 13, 2014, 12:08:26 AM1/13/14
to musicn...@googlegroups.com
Looks good!  Now we're ready to descend even further down the rabbit hole... :-)

The next step is to open an SVG file in a text editor and look for this part:  (this is from the crotchet_white_natural.svg file)

<path d="M682.885,1105.094c68-60,194-69,281-23c90,48,108,136,38,198c-70,59-194,71-283,22
C627.885,1257.094,612.885,1164.094,682.885,1105.094L682.885,1105.094L682.885,1105.094z M735.885,1164.094c-8,81,43,141,115,144
c50,3,89-45,94-84c11-80-46-146-116-149c-27,0-48,12-63,27C752.885,1115.094,740.885,1128.094,735.885,1164.094L735.885,1164.094z"
/>

This is the path data that we want.  Let's make it a little more readable:

M 682.885, 1105.094
c 68-60,194-69,281-23
c 90,48,108,136,38,198
c -70,59-194,71-283,22
C 627.885,1257.094,612.885,1164.094,682.885,1105.094
L 682.885,1105.094
L 682.885,1105.094
z 
M 735.885,1164.094
c -8,81,43,141,115,144
c 50,3,89-45,94-84
c 11-80-46-146-116-149
c -27,0-48,12-63,27
C 752.885,1115.094,740.885,1128.094,735.885,1164.094
L 735.885,1164.094
z

Each of the letters starts a new path command, as documented here: www.w3.org/TR/SVG/paths.html
They correspond to the following in LilyPond code:

M = moveto
m = rmoveto
L = lineto
l = rlineto
C = curveto
c = rcurveto
z = closepath  

So the next step is to put this into LilyPond stencil code, following the snippet here (which supports paths expressed in relative values):

\version "2.18.0"

crotchetWhiteNatural =
\markup \stencil
#(ly:stencil-scale
  (ly:make-stencil
   `(path 8
      `( moveto 682.885  1105.094
         rcurveto 68  -60  194  -69  281  -23
         rcurveto 90  48  108  136  38  198
         rcurveto -70  59  -194  71  -283  22
         curveto 627.885  1257.094  612.885 1164.094  682.885  1105.094
         closepath
         moveto 735.885  1164.094
         rcurveto -8  81  43  141  115  144
         rcurveto 50  3  89  -45  94  -84
         rcurveto 11  -80  -46  -146  -116  -149
         rcurveto -27  0  -48  12  -63  27
         curveto 752.885  1115.094  740.885  1128.094  735.885  1164.094
         closepath) 
      'round 'round #t)
   (cons 0 100)
   (cons 0 100))
  0.005 0.005)

{ c'1^\crotchetWhiteNatural }

Voila!  There's the custom note head shape, floating up above the staff for now...  There's still more to do to get it in the right place, at the right size, etc.  But I think in the long run this is the best way to get these custom glyphs into LilyPond.  

And that's enough for one day!
-Paul
Message has been deleted
Message has been deleted
Message has been deleted

Jan Braunstein

unread,
Jan 13, 2014, 1:58:18 PM1/13/14
to musicn...@googlegroups.com


Paul, you are a wizard!
What a magic, I've got my notehead :-)

I am going to transcribe the other glyphs using your snippet. Now I have an idea how it works.
Just a few details: Is there any particular reason that you skipped L (lineto) coordinates?
The notehead was also horizontally flipped so I figured out that negative value in the last of the two numbers at the end (0.005 -0.005) fixes it.

Fantastic. It was a great idea to do it like this.

Cheers,
Jan

Paul Morris

unread,
Jan 13, 2014, 2:37:30 PM1/13/14
to musicn...@googlegroups.com
Hi Jan,  
I was pleasantly surprised that this works myself!  :-)

Before you transcribe all the glyphs...  It seems that the images are very large for what they need to be in LilyPond, so it would make sense to make them much smaller, maybe in illustrator, before saving them as SVGs.  The last two numbers in that snippet I sent (0.005 0.005) go with the ly:stencil-scale command at the top, so we're shrinking the image way down. (1 1) would be the unscaled size.  I tried moving the decimal point two spaces to the left on all of the coordinates (x100 smaller) and it was still not as small as it would need to be on the staff.  So I think it makes sense to scale them way down before converting to SVG.  

Hmmm... a square note head that's the size you want for the staff would be a 1x1 square, so that's the ballpark we're shooting for.  If you really wanted to do it precisely you could create a hollow square in illustrator and see what size it would need to be for the SVG path command to have coordinates like this:

moveto 0 0
lineto 0 1
lineto 1 1
lineto 1 0 
lineto 0 0

Then you could make your noteheads fit the height of that square in illustrator and they would come out just right.  On the other hand you can always fine-tune the size by scaling the stencil in LilyPond so getting it just right is not that crucial.

Another thing is that it would make sense to crop out all of the surrounding white space around the actual image before saving to SVG too.  This should make the positioning simpler since there will be no "padding" or margins to account for.

I skipped those L (lineto) coordinates because they didn't actually go anywhere, they were specifying a line going to the same point where the previous curve ended (682.885  1105.094)

I don't know why it was horizontally flipped... and I didn't know you could make that scaling value negative to flip it back.  Well done for figuring that out!  There are functions that are just for flipping stencils horizontally (or vertically) that we can use for this if we need to.

Anyway, glad it looks like this will work!

Cheers,
-Paul

Jan Braunstein

unread,
Jan 13, 2014, 3:40:29 PM1/13/14
to musicn...@googlegroups.com
Hi Paul, 
I
Hmmm... a square note head that's the size you want for the staff would be a 1x1 square, so that's the ballpark we're shooting for.  If you really wanted to do it precisely you could create a hollow square in illustrator and see what size it would need to be for the SVG path command to have coordinates like this:
 
 
moveto 0 0
lineto 0 1
lineto 1 1
lineto 1 0 
lineto 0 0
Are you sure about this? Because this is actually just a singles dot!

Just trying to figure out the right amount of scaling...
Can you find out the coordinates of a standard notehead in Lilypond somehow?

Cheers,
Jan 


 

Paul Morris

unread,
Jan 13, 2014, 4:03:32 PM1/13/14
to musicn...@googlegroups.com
Hi Jan,

I'm pretty sure.  Clearly we're moving between two very different scales.  In LilyPond the units are the distance between staff lines, so 1 = the distance between two lines on a standard staff (so a standard note head should be 1 unit tall), whereas it means something really different (MUCH smaller) in Illustrator.  

You could try zooming way in in Illustrator and see if it will zoom in enough, or maybe it would be better to go for a 100x100 square (really the height is all that matters), and then we can scale it down from there either by moving the decimal point two positions on all the numbers (a spreadsheet might come in handy for that) or by just using the ly:stencil-scale to shrink it down that way.  I guess the main thing is having it scaled to some multiple of 10 (like 100?) so that it's simple to scale it down to 1 unit tall.

Cheers,
-Paul

Jan Braunstein

unread,
Jan 13, 2014, 5:55:08 PM1/13/14
to musicn...@googlegroups.com
Ok. I get it.

Getting a little bit stuck here... Still trying to figure out how to make the coordinates to start at 0,0 in the exported svg file...
Zooming is not such a problem but I was thinking that perhaps I should not make it too small because then it would be problematic to edit the glyph in the external editor (such as Ilustrator) in case you want to do some tweaking with those glyphs in the future.
I go on searching...

Jan

Jan Braunstein

unread,
Jan 13, 2014, 6:00:41 PM1/13/14
to musicn...@googlegroups.com
I guess the solution is to convert (somehow) all the absolute paths to relative. 

Paul Morris

unread,
Jan 13, 2014, 6:24:23 PM1/13/14
to musicn...@googlegroups.com
On Monday, January 13, 2014 6:00:41 PM UTC-5, Jan Braunstein wrote:
I guess the solution is to convert (somehow) all the absolute paths to relative. 

That could work, although I don't think it's a problem if the paths don't start at exactly 0 0.  Actually since they are curves then they probably won't/shouldn't start at 0 0. (Unless you're talking about the square as a frame or guide for the sizing.  I would think that would start at 0 0... but its height is the main thing)  

As long as you have cropped out all the extra white space so the edge of the image is right up against the edges of the note head, and the note head in illustrator is the same height as a rectangle in illustrator that becomes an SVG that has a height that's a multiple of 10 (100, 1000, ...) then that should work fine.

(There's a function I remembered that may help us that basically centers a stencil on itself, as far as I understand it.  It's called ly:stencil-aligned-to )

-Paul

Jan Braunstein

unread,
Jan 13, 2014, 6:39:27 PM1/13/14
to musicn...@googlegroups.com
Got it!


- does exactly that (besides other tweaking with svg), I think it can be very useful

This is another shot on black crotchet.
I would say it is a good one ;-)

What about the scaling? I thought I could still go to half of this size = make everything 5% of the original (now it is 10%). Would that be a good compromise?
 

\version "2.18"

crotchetBlackNatural =

\markup \stencil

#(ly:stencil-scale

(ly:make-stencil

`(path 8

`( moveto 0 0

rcurveto 7.1 -6.1 19.4 -6.9 28.2 -2.3

rcurveto 9.101 4.8 10.7 13.7 3.8 19.8

rcurveto -6.899 6.1 -19.6 7.1 -28.4 2.3

rcurveto -8.9 -4.8 -10.5 -13.7 -3.6 -19.8

rlineto 0 0

closepath)

'round 'round #t)

(cons 0 100)

(cons 0 100))

0.05 -0.05)

{ c'1^\crotchetBlackNatural }

\addlyrics { Cheers,_Jan }


Jan Braunstein

unread,
Jan 13, 2014, 6:51:09 PM1/13/14
to musicn...@googlegroups.com
You cannot really crop the the "white space" in svg file as long as it has absolute values for paths (at least to my understanding).
For instance, the black crotchet was placed differently when I used the same snippet as before with the whit crotchet. Both were default output from font.
I guess having the relative coordinates only could possibly save some problems.

Jan
Message has been deleted

Jan Braunstein

unread,
Jan 13, 2014, 7:48:34 PM1/13/14
to musicn...@googlegroups.com
Another shot on the note heads...
Scaled down to 1/20 now.

I figured out that I had to change to value for "path" way down (8 -> 0.2, resp. 0.1) since everything was too thick.
I don't know what else these values affect though...

Would any of these work?

\version "2.18"

crotchetBlackNatural = %scaled down to 10%

\markup \stencil

#(ly:stencil-scale

(ly:make-stencil

`(path 0.2

`( rmoveto 0 3

rcurveto 7.1 -6.1 19.4 -6.9 28.2 -2.3

rcurveto 9.101 4.8 10.7 13.7 3.8 19.8

rcurveto -6.899 6.1 -19.6 7.1 -28.4 2.3

rcurveto -8.9 -4.8 -10.5 -13.7 -3.6 -19.8

rlineto 0 0

closepath)

'round 'round #t)

(cons 0 100)

(cons 0 100))

0.1 -0.1)

 

crotchetWhiteNatural = %scaled down to 5%

\markup \stencil

#(ly:stencil-scale

(ly:make-stencil

`(path 0.1

`( rmoveto 0 0

rcurveto 3.4 -3 9.7 -3.45 14.05 -1.15

rcurveto 4.5 2.4 5.399 6.8 1.899 9.9

rcurveto -3.5 2.95 -9.7 3.55 -14.149 1.101

rcurveto -4.55 -2.25 -5.3 -6.9 -1.8 -9.851

rlineto 0 0

closepath

rmoveto 2.651 2.951

rcurveto -0.4 4.05 2.15 7.05 5.75 7.2

rcurveto 2.5 0.149 4.45 -2.25 4.7 -4.2

rcurveto 0.55 -4 -2.3 -7.3 -5.8 -7.45

rcurveto -1.35 0 -2.4 0.6 -3.15 1.35

rcurveto -0.651 0.649 -1.25 1.3 -1.5 3.1

rlineto 0 0

closepath)

'round 'round #t)

(cons 0 100)

(cons 0 100))

0.1 -0.1)

{ c'1^\crotchetBlackNatural c'^\crotchetWhiteNatural }

 

 

Cheers,

Jan

 

Paul Morris

unread,
Jan 13, 2014, 8:49:51 PM1/13/14
to musicn...@googlegroups.com
Looking good!  Nice find on that online SVG conversion tool.  It's just what we needed!  

It may make sense to convert all the paths to relative with (near to) 0 0 origin like you're doing and then convert them back to absolute values, which will then let us use the make-connected-path-stencil function which has the nice feature of calculating the stencil extents for you. (Using the other method that allows relative path coordinates requires that you manually specify these extents, which is hard when you're dealing with curves.)  On second thought though that function also requires that there be no closepath in the middle of the path it has to be continuous, so I think it's not a good idea to use make-connected-path-stencil after all.[1]

On the cropping, I was thinking of cropping the files in Illustrator before exporting as SVG.  But now that we can easily convert everything to relative paths, that should not be necessary.  

At this point I think we're basically there.  If you wanted you could keep fine-tuning until you got the sizing so that the noteheads would be the right height for the staff with only scaling by a factor of 10, but it's not strictly necessary to do so, the numbers would just be simpler that way and you'd have more "mathematical certainty that your notes were the right height.  But you can also just judge this by sight.  

Below I've given a sense of what they will look like on the staff by overriding the note head stencil with them.  They're still a little big at this level of scaling, but you can adjust this by changing the values for ly:stencil-scale.  

So if you're happy with how they're turning out, feel free to go ahead with the other noteheads at this point.

-Paul

[1] I'm actually working on some code to submit for inclusion in LilyPond that will overcome this and let you use relative values, discontinuous paths, and still have the extents calculated, but this will take some time.  But it would be possible to just add it to your local copy of LilyPond before it actually lands in the actual release, so that's an option too.

crotchetWhiteNatural = %scaled down to 5%
 #(ly:stencil-scale
   (ly:make-stencil
    `(path 0.1
       `( rmoveto 0 0
          rcurveto 3.4 -3 9.7 -3.45 14.05 -1.15
          rcurveto 4.5 2.4 5.399 6.8 1.899 9.9
          rcurveto -3.5 2.95 -9.7 3.55 -14.149 1.101
          rcurveto -4.55 -2.25 -5.3 -6.9 -1.8 -9.851
          rlineto 0 0
          closepath
          rmoveto 2.651 2.951
          rcurveto -0.4 4.05 2.15 7.05 5.75 7.2
          rcurveto 2.5 0.149 4.45 -2.25 4.7 -4.2
          rcurveto 0.55 -4 -2.3 -7.3 -5.8 -7.45
          rcurveto -1.35 0 -2.4 0.6 -3.15 1.35
          rcurveto -0.651 0.649 -1.25 1.3 -1.5 3.1
          rlineto 0 0
          closepath)
       'round 'round #t)
    (cons 0 18)
    (cons 0 10))
   .1 -.1)
 {
   \override NoteHead.stencil = \crotchetWhiteNatural
   e' f' g' a' b' c'' d'' e''
 }


John Keller

unread,
Jan 13, 2014, 9:14:08 PM1/13/14
to musicn...@googlegroups.com
I used Paul's interval file and changed  \Include "clairenote.ily" to "express-stave.ily" and then each instance of StaffClairenote -> StaffExpressStave.
 
It worked!
 
Here is the pdf of ES intervals.
 
I had managed to rotate noteheads to better positions and adjust some of the stem connections.
 
Still to be fixed:
 
legerlines under the E below stave. (and above C above stave)
 
more stem connection correction
 
scale the "small" noteheads ( nonsloping - wholetone scale FGABIJ) down slightly in both directions, so as to match horizontal width of "big" noteheads  (sloping - wholetone scale CDEKLH)
 
Paul, any help with which lines in the ily code do this?
 
I also tried getting the SVG (Scalable Vector Graphic) file from the glyph of my B clef.
 
The weird thing is that exporting this glyph to Illustrator doesnt give the picture, but the code! I copied this code via a pdf to a text file hoping it would be the SVG coordinates, then changed the txt extension to svg, but that didnt work.
 
I attach the text file. Does part of this look correct for a custom clef path in LP?
 
Cheers,
John K
--
You received this message because you are subscribed to the forum of the Music Notation Project (hosted by Google Groups).
To post to this group, send email to musicn...@googlegroups.com
To unsubscribe from this group, send email to musicnotatio...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/musicnotation?hl=en
---
You received this message because you are subscribed to the Google Groups "The Music Notation Project | Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to musicnotatio...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
intervals in ES.pdf
Bird_Clef.txt

Jan Braunstein

unread,
Jan 13, 2014, 9:56:39 PM1/13/14
to musicn...@googlegroups.com
Great. It feels like Lilypond party here :-)


On Tuesday, January 14, 2014 2:49:51 AM UTC+1, Paul Morris wrote:
Looking good!  Nice find on that online SVG conversion tool.  It's just what we needed!  

It may make sense to convert all the paths to relative with (near to) 0 0 origin like you're doing and then convert them back to absolute values, which will then let us use the make-connected-path-stencil function which has the nice feature of calculating the stencil extents for you. (Using the other method that allows relative path coordinates requires that you manually specify these extents, which is hard when you're dealing with curves.)  On second thought though that function also requires that there be no closepath in the middle of the path it has to be continuous, so I think it's not a good idea to use make-connected-path-stencil after all.[1]

My conclusion is that I should leave it relative then.
On the other hand... I am a bit confused now...


On the cropping, I was thinking of cropping the files in Illustrator before exporting as SVG.  But now that we can easily convert everything to relative paths, that should not be necessary.  

At this point I think we're basically there.  If you wanted you could keep fine-tuning until you got the sizing so that the noteheads would be the right height for the staff with only scaling by a factor of 10, but it's not strictly necessary to do so, the numbers would just be simpler that way and you'd have more "mathematical certainty that your notes were the right height.  But you can also just judge this by sight.

I can do that if you think it helps. Are we talking about the scaling factor represented by the two numbers at the end of the snippet (.1 - .1)? I assume that this is what you mean by factor of 10. So I should scale it down a bit more so the sizes of the new noteheads match the standard noteheads in Lilypond when using (.1 -1) scaling. Is that correct or am I still missing something?
 

Below I've given a sense of what they will look like on the staff by overriding the note head stencil with them.  They're still a little big at this level of scaling, but you can adjust this by changing the values for ly:stencil-scale.  

So if you're happy with how they're turning out, feel free to go ahead with the other noteheads at this point.

Looks good (just have to make them smaller). I just want to make sure I do it correctly before I will convert the rest.
Thanks!

Jan

Jan Braunstein

unread,
Jan 13, 2014, 10:11:30 PM1/13/14
to musicn...@googlegroups.com
Hi John,

Well done, it looks good!
So are you switching from Finale to LilyPond as well? :-)
It is amazing how easy it is to switch back and forth between TN and any type of AN using LilyPond.  

That text file does look like svg coordinates.
You can try to transcribe it to LilyPond code using that snippet that Paul wrote for me for transfering the glyphs for the Lyre Notation. Somewhere in this thread he described how it works.

Cheers,
Jan

Paul Morris

unread,
Jan 14, 2014, 12:12:41 AM1/14/14
to musicn...@googlegroups.com
On Monday, January 13, 2014 9:56:39 PM UTC-5, Jan Braunstein wrote:
Great. It feels like Lilypond party here :-)

It sure does!  :-)

 
My conclusion is that I should leave it relative then.

Yes, I think relative is best. 

 
On the cropping, I was thinking of cropping the files in Illustrator before exporting as SVG.  But now that we can easily convert everything to relative paths, that should not be necessary.  

At this point I think we're basically there.  If you wanted you could keep fine-tuning until you got the sizing so that the noteheads would be the right height for the staff with only scaling by a factor of 10, but it's not strictly necessary to do so, the numbers would just be simpler that way and you'd have more "mathematical certainty that your notes were the right height.  But you can also just judge this by sight.

I can do that if you think it helps. Are we talking about the scaling factor represented by the two numbers at the end of the snippet (.1 - .1)? I assume that this is what you mean by factor of 10.

Yes, that's it.
 
So I should scale it down a bit more so the sizes of the new noteheads match the standard noteheads in Lilypond when using (.1 -1) scaling. Is that correct or am I still missing something?

Yes, the idea would be to be sure that your notes are the exact height of 1 (the distance between two standard staff lines).  If you don't care too much if it's exact and want to just go by sight, then you don't need to worry about this.  

But if you want to try to get it exact, the problem is that the note heads are curved so there's no good way to read the note head's height from its path numbers.  So my idea was to create some spacer image in Illustrator, something with a clear height like a square, or it could be a line.  For example, you could draw a vertical line next to one of your note heads but with some space between them so that that line is exactly as tall as the note head.  Then in your SVG you would see a single lineto command that is that line.  Then you can resize the SVG by some amount based on that line to make the line's height some multiple of 10 (10, 100, 1000 etc..).  Ideally the line would end up being something like (lineto 0 100).  Then use that same amount of resizing for all your note head images, then you know they will all come out at the right height, some multiple of 10, once they arrive in LilyPond.

Hopefully that makes sense.  Again, you could do it if you want to be more precise about the sizing, or not bother with it if you just want to scale the note head size on the staff by sight.

Looks good (just have to make them smaller). I just want to make sure I do it correctly before I will convert the rest.
Thanks!

Either way will be fine, it just depends on how mathematically precise you want to be about it.

Cheers,
-Paul
 

Paul Morris

unread,
Jan 14, 2014, 12:15:26 AM1/14/14
to musicn...@googlegroups.com
Jan, Can you tell John how you got your font glyphs into illustrator files (and from there to SVG images)?  It sounds like something's weird there since he's seeing the code in illustrator rather than the images...

Thanks,
-Paul

Paul Morris

unread,
Jan 14, 2014, 12:27:27 AM1/14/14
to musicn...@googlegroups.com
Congrats John!  Glad it's working for you.  

I think the thing to do is start with the note heads since a lot depends on that.  For Express Stave's note heads it will take some time to create the code for you to work with to get the resizing and slanting right.

On the other hand, it might be better to start from your existing glyphs in your font and convert them to SVG images and then to path stencils in LilyPond.  The advantage of that is that you're more likely to get them to look just the way you want, and since you've already taken the time to design them graphically...  What do you think?

For the ledger lines try changing the following around line 918 from 1 to 2, that should do it I think.

    \override StaffSymbol.ledger-extra = 2


On the clef SVG thing, the text file does look like it has some path data in it, but lets see if Jan can help with how to get your font into Illustrator where you can see the glyphs there as you'd expect...


Cheers,
-Paul

John Keller

unread,
Jan 14, 2014, 2:04:39 AM1/14/14
to musicn...@googlegroups.com
Hi Paul,
 
Im quite keen to just use the TN noteheads now that I have got some properties right, just need to get the contraction of the smalls, and check the stem connections. When I get the x and y coordinates right for the downward stems, the upwards ones are not exact. There should be two sets of coordinates for stem connections, right? Line 80ish?
 
What you specify as "white" and "black" noteheads refers to the 6-6 coding, right? So I can change that to small and big.
 
Have you defined a bass, middle and treble register stave as well as one for the combined bass and treble?
 
The legerline change worked, thanks!
 
I tried the rotation function on the wholenotes, but couldnt get that to work. I just copied:
 
(if (not whole-note?)

;; express-stave-change

;; 6-6 slant pattern

(if (= 0 (modulo (+ semi cfill) 2))

(set! (ly:grob-property grob 'rotation) '(-30 0 0))

(set! (ly:grob-property grob 'rotation) '(10 0 0))

))

 

then deleted the "not". Nothing happened.

 

Then i just deleted the If part and the wholenotes rotated but not by the right amounts, it will have to be different than for the other noteheads.

 

Sorry to hassle you with all this! Im too impatient to try to work through all the tutorials. Prefer to just look at the code and get some insight. :)

 

Thanks again,

John K

----- Original Message -----
--

John Keller

unread,
Jan 14, 2014, 2:18:03 AM1/14/14
to musicn...@googlegroups.com
Hi Jan,
 
Yes Im biting the bullet! Im worried that Finale will not support my conversion method in the future. I have been successful using 2006 version, but more recent versions changed the percussion maps so you cannot simply specify each midi pitch as a notehead and staff position, you have to specify  88 percussion instruments!
 
I have a lot of piano music transnotated, some of it is in my Wiki.
 
I hope we can both find how to get custom clefs into LilyPond, and Paul advised it better to design the stencil within LP rather than using a custom font which people would have to install.
 
Im not ready to try fiddling with snippets yet because I couldnt get the text file which looked like SVG coordinates to actually show the image. I might have missed the bit about finding an SVG conversion tool online.
 
My Illustrator has never worked, it always just showed text, not an image.
 
John K
----- Original Message -----
Sent: Tuesday, January 14, 2014 2:11 PM
Subject: [MNP] Re: Intervals in Express Stave

--

Jan Braunstein

unread,
Jan 14, 2014, 8:59:30 AM1/14/14
to musicn...@googlegroups.com
Hi John,

Looks like we are all on the same track :-)


On Tuesday, January 14, 2014 8:18:03 AM UTC+1, John Keller wrote:
Hi Jan,
 
Yes Im biting the bullet! Im worried that Finale will not support my conversion method in the future. I have been successful using 2006 version, but more recent versions changed the percussion maps so you cannot simply specify each midi pitch as a notehead and staff position, you have to specify  88 percussion instruments!

Tell me about it... Well, in fact you can do it in more recent versions of Finale too. It's just completely different. I have been using 2010 version and also remapped everything and spent days creating custom templates, fonts etc. Then on 2012 version, none of those worked correctly anymore. So I am getting quite excited about LilyPond, although the different workflow is obviously something to get used to...

 
I have a lot of piano music transnotated, some of it is in my Wiki.
 
I hope we can both find how to get custom clefs into LilyPond, and Paul advised it better to design the stencil within LP rather than using a custom font which people would have to install.

We are almost there I guess!
 
 
Im not ready to try fiddling with snippets yet because I couldnt get the text file which looked like SVG coordinates to actually show the image. I might have missed the bit about finding an SVG conversion tool online.
 
My Illustrator has never worked, it always just showed text, not an image.
 
John K

It took me a while until I figured it out with svg export...
Can't you save your glyph (clef) as .ai file in Fontlab? (Select the glyph -> export -> select EPS, *.ai, not metrics)
That is what I did and then I could open it in Ilustrator as a glyph. Then scale it down in Ilustrator and save as svg.
If you need to do some tweaking with the svg code, this is what will help: http://petercollingridge.appspot.com/svg_transforms
You can open svg file in a web browser (and select view the source to see the text) - it is likely that the browser will render the glyph. You can also just open it in something like Notepad.
Let me know how it works.

Cheers,
Jan

Jan Braunstein

unread,
Jan 14, 2014, 9:14:16 AM1/14/14
to musicn...@googlegroups.com
Paul, thanks for the hints. I think I can go get the glyphs ready now.
I will discuss it with John too and help him to get the svg. Perhaps he could get the coordinates from that text file as well.

Cheers,
Jan

John Keller

unread,
Jan 14, 2014, 9:43:37 AM1/14/14
to musicn...@googlegroups.com
I made the .ai file but something is wrong with my Illustrator - everything I open in it is just text. I attach it here, in case someone can help  ...
 
John K
 
----- Original Message -----
Bird clef.ai

Paul Morris

unread,
Jan 14, 2014, 10:16:53 AM1/14/14
to musicn...@googlegroups.com
Hi John,

Ok, I will need to find some time to sit down and write some code just for Express Stave.  Since it combines the 6-6 and 7-5 patterns there are four types of note heads (solid/hollow x slanted/flat), each of which will need their own settings to look right, and the code I've written is only set up to handle two types of note heads.  

And as you've discovered each of those four note head types will likely need their own stem attachment values as well.

And then if whole notes are to look different then that means there are 8 types of note heads, that may each need their own settings.  

So this gets rather complex and will take some time to do.  

I haven't defined a bass, middle, and treble register stave (for either Clairnote or Express Stave) I have just set up one staff that can take different clefs.  (For Phil's guitar piece I just extended the Clairnote staff up an octave, but that was just on-the-fly for that piece of music.)  

On the tutorials, they are for learning how to enter and edit music in LilyPond rather than learning how to modify it for alternative notation systems. So they may be useful to you yet.  ;-)

Cheers,
-Paul

Jan Braunstein

unread,
Jan 14, 2014, 10:18:52 AM1/14/14
to musicn...@googlegroups.com
Looks like it is indeed. Could it be just something in the settings? I think you can also use Inkscape to open .ai file.
Anyway, I saved it as .svg for you so you can now transcribe it to LilyPond.

Cheers,
Jan


On Tuesday, January 14, 2014 3:43:37 PM UTC+1, John Keller wrote:

Bird clef.svg

John Keller

unread,
Jan 14, 2014, 5:35:51 PM1/14/14
to musicn...@googlegroups.com
Hi Paul,
 
Thanks for all your work so far. Im quite keen to try to learn the programming for AN systems myself now, so where do I start? Is it all in the same LP website as learning to input music?
 
(How did you learn it?)
 
I have been going through the tutorials. It seems straight forward, but incomplete. Eg they dont have a table of functions and syntax ...
 
I couldnt find anywhere you can just search for what, say "r" or "grob" means (rest and graphic object). I gather "s" means an invisible rest, right?, and c' is middle C - but where does it tell you these things??
 
In going through your ily code I want to know the commands/functions etc. Where can I search for the meaning and syntax of these constructions?
 
John K
 
----- Original Message -----
--

John Keller

unread,
Jan 14, 2014, 8:16:13 PM1/14/14
to musicn...@googlegroups.com
Paul,
 
I have a suggestion. Instead of writing emails to the the group, which you do so much of to help all of us, from my point of view it would be very helpful and more direct if you could add in fairly full and explanatory comments to the ily files.
 
Probably wouldnt take any more of your time and would refer directly to each of the constructs rather than mentioning line number references in emails. You could do it bit by bit and I could annotate the ily files to ask questions about particular constructs. Sending the ily files back and forth like this would help us all more directly, dont you think?
 
To start with I will use ;; "JK Questions" at the start of a comment (question) so you can search for this.
 
I have attached the ES ily file with some easy questions to start.
 
I hope this sounds like an easier way to help me (and the others) without burdening you too much, and I will limit my questions to just a few each time.
 
Cheers, John
express-stave.ily

Philip Rhoades

unread,
Jan 14, 2014, 9:30:50 PM1/14/14
to musicn...@googlegroups.com
John,


On 2014-01-15 12:16, John Keller wrote:
> Paul,
>
> I have a suggestion. Instead of writing emails to the the group, which
> you do so much of to help all of us, from my point of view it would be
> very helpful and more direct if you could add in fairly full and
> explanatory comments to the ily files.
>
> Probably wouldnt take any more of your time and would refer directly
> to each of the constructs rather than mentioning line number
> references in emails. You could do it bit by bit and I could annotate
> the ily files to ask questions about particular constructs. Sending
> the ily files back and forth like this would help us all more
> directly, dont you think?
>
> To start with I will use ;; "JK Questions" at the start of a comment
> (question) so you can search for this.
>
> I have attached the ES ily file with some easy questions to start.
>
> I hope this sounds like an easier way to help me (and the others)
> without burdening you too much, and I will limit my questions to just
> a few each time.


Rather than sending files back and forth, which is very inefficient and
people quickly lose control of which is the most current etc, it might
be better to set up a GitHub account (or I could use mine account) and
host the file there and then everyone could see it, download it etc.
The whole history of changes would be visible and when someone asked a Q
it could go in the doc with the answer. For example, here is a test
file I have there:

https://github.com/philiprhoades/t1/blob/master/t1.txt

- can you see it OK?

Regards,

Phil.
> http://groups.google.com/group/musicnotation?hl=en [1]
> ---
> You received this message because you are subscribed to the Google
> Groups "The Music Notation Project | Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to musicnotatio...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out [2].
>
> --
> You received this message because you are subscribed to the forum of
> the Music Notation Project (hosted by Google Groups).
> To post to this group, send email to musicn...@googlegroups.com
> To unsubscribe from this group, send email to
> musicnotatio...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/musicnotation?hl=en [1]
> ---
> You received this message because you are subscribed to the Google
> Groups "The Music Notation Project | Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to musicnotatio...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out [2].
>
> --
> You received this message because you are subscribed to the forum of
> the Music Notation Project (hosted by Google Groups).
> To post to this group, send email to musicn...@googlegroups.com
> To unsubscribe from this group, send email to
> musicnotatio...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/musicnotation?hl=en [1]
> ---
> You received this message because you are subscribed to the Google
> Groups "The Music Notation Project | Forum" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to musicnotatio...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out [2].
>
>
> Links:
> ------
> [1] http://groups.google.com/group/musicnotation?hl=en
> [2] https://groups.google.com/groups/opt_out

--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: ph...@pricom.com.au

Paul Morris

unread,
Jan 14, 2014, 10:20:22 PM1/14/14
to musicn...@googlegroups.com
On Tuesday, January 14, 2014 5:35:51 PM UTC-5, John Keller wrote:

Thanks for all your work so far. Im quite keen to try to learn the programming for AN systems myself now, so where do I start? Is it all in the same LP website as learning to input music?
 
(How did you learn it?)

Hi John,  I picked it up slowly over a year or two.  I learned it from the LilyPond docs, looking at snippets in the LSR, and learning about scheme, mostly using the guile manual.  

The extending and internals manual are a good place to start:

And learning / borrowing from snippets that did things that I wanted to do:

These are all linked from the "manuals" page on the LilyPond site.  Then for Scheme, I have used the Guile manual:

(Guile is the engine that is used in LilyPond to run the scheme code.)

So feel free to dive into any or all of that if you want to.  
 

I have been going through the tutorials. It seems straight forward, but incomplete. Eg they dont have a table of functions and syntax ...
 
I couldnt find anywhere you can just search for what, say "r" or "grob" means (rest and graphic object). I gather "s" means an invisible rest, right?, and c' is middle C - but where does it tell you these things??

I use the index page of the notation manual a lot, or there's the glossary, or just a web search.  It's probably easier to search for "rest" and find "r" than the reverse direction, I think.
 
In going through your ily code I want to know the commands/functions etc. Where can I search for the meaning and syntax of these constructions?

If it's a LilyPond command it's probably in the Internals reference, and if it's scheme it will be in that guile manual.

Hope that helps,
-Paul

Paul Morris

unread,
Jan 14, 2014, 10:49:08 PM1/14/14
to musicn...@googlegroups.com
Ok, we can give it a try, but I think it would make sense for you to work through the LilyPond Scheme tutorial first, as it will answer a lot of things better than I could:

What if you just send emails with the code you have questions about, and then I can just add my comments via email.  That avoids having to pass files around. Cut and paste is easy, and you still get the comments right next to the code.  And most of the comments you won't want to keep in the ily file.  Like so:

% NOTE HEADS AND STEM ATTACHMENT

%

#(define (customNoteHeads cfill xmod ymod)

   (lambda (grob)

     (let* ((fsz  (ly:grob-property grob 'font-size 0.0))

            (mult (magstep fsz))


            (ptch (ly:event-property (event-cause grob) 'pitch))

            (semi (ly:pitch-semitones ptch))



;; JK Questions:


;; 1. Can you explain this custom notehead construction above? 

;; PM: I'm defining a function in scheme called "customNoteHeads that takes three arguments: 

;; cfill is a boolean, either 0 or 1, indicating if the note c is to be filled or hollow

;; xmod ymod are values that are used to scale the note head stencil in the x and y axis directions;

;; when the function is called (by the staff definition code below) certain values are passed to it for these three arguments


;; grob is a reference to the note head grob, which contains properties we will need and settings we may want to change

;; lambda begins a generic, unnamed function that takes grob as an argument, (as best I understand it)

;; let* defines a series of variables in order and then does some operation with them and returns a value and/or sets properties

;; fsz is a variable that stores the current fontsize, retrieving it from the grob's 'fontsize property

;; mult is the amount you want to multiply things by for them to match the current fontsize, 

;; magstep does some transformation on fontsize that's necessary (I don't remember what or why...)

;; ptch stores the pitch of the note, retrieving it from the event property of the event that caused the grob

;; semi is the pitch in semitones


;; 2. What does the sharp or hash sign  # mean?

;; PM: that signals a shift from LilyPond code to scheme code


;; 3. And why does ;; indicate comments here and not the %{ construct I read about?

;; PM:  in LilyPond code % or %{ %} are for comments, in Scheme code it's ;; and  #!  !#


;; Thanks Paul!


Hope that helps!  There's a lot to cover and learn, so it will take awhile.  You will basically be learning computer programming in scheme.

Cheers,
-Paul


Philip Rhoades

unread,
Jan 14, 2014, 11:14:17 PM1/14/14
to musicn...@googlegroups.com
Paul,


On 2014-01-15 14:49, Paul Morris wrote:
> Ok, we can give it a try, but I think it would make sense for you to
> work through the LilyPond Scheme tutorial first, as it will answer a
> lot of things better than I could:
> http://lilypond.org/doc/v2.18/Documentation/extending/scheme-tutorial


I should probably have look at that too I guess . .


> What if you just send emails with the code you have questions about,
> and then I can just add my comments via email. That avoids having to
> pass files around. Cut and paste is easy, and you still get the
> comments right next to the code. And most of the comments you won't
> want to keep in the ily file.


You don't want to do the GitHub thing I suggested? It would be good to
have it centralise somewhere. Although if you are not keeping all the
comments in the .ily file then we would need a separate reference doc
with a reference in the .ily doc pointing to the Q & A in the ref doc.
I would be happy to maintain that setup if that helps with your time? -
also doing that would be good for my own LilyPond / Scheme education as
other people ask questions.

Anyway, however you want to do it of course.

Regards,

Phil.
> --
> You received this message because you are subscribed to the forum of
> the Music Notation Project (hosted by Google Groups).
> To post to this group, send email to musicn...@googlegroups.com
> To unsubscribe from this group, send email to
> musicnotatio...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/musicnotation?hl=en [1]
> ---
> You received this message because you are subscribed to the Google
> Groups "The Music Notation Project | Forum" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to musicnotatio...@googlegroups.com.

Paul Morris

unread,
Jan 15, 2014, 12:29:53 AM1/15/14
to musicn...@googlegroups.com
On Tuesday, January 14, 2014 10:16:53 AM UTC-5, Paul Morris wrote:

Ok, I will need to find some time to sit down and write some code just for Express Stave.  Since it combines the 6-6 and 7-5 patterns there are four types of note heads (solid/hollow x slanted/flat), each of which will need their own settings to look right, and the code I've written is only set up to handle two types of note heads.  

Hi John, I found some time tonight to work on the note head code for Express Stave.  I think the attached .ily file should have all the necessary knobs and switches to let you adjust things until they look right.  Below is the part of the code you'll want to focus on.  In it you can change the numbers to change the rotation values and the scaling values on both X axis and Y axis for:

1. flat whole notes
2. flat non-whole notes
3. slanted whole notes
4. slanted non-whole notes

...and also the stem attachment values for 2 and 4 separately.  I think that should cover it?  Let me know if you have any questions.

Cheers,
-Paul

;; 6-6 slanted/flat and note size/shape settings (rotation and scaling)
;; and stem attachment settings
(if (= 1 (modulo semi 2))

    ;; flat notes f g a b c# d#
    (cond

     ;; flat whole notes
     (whole-note?
      (set! (ly:grob-property grob 'rotation) '(0 0 0))
      (set! (ly:grob-property grob 'stencil)
            (ly:stencil-scale (ly:grob-property grob 'stencil)
              1.0      ;; scale on x axis
              0.8 ))) ;; scale on y axis

     ;; flat non-whole notes
     (else
      (set! (ly:grob-property grob 'rotation) '(-15 0 0))
      (set! (ly:grob-property grob 'stencil)
            (ly:stencil-scale (ly:grob-property grob 'stencil)
              1.0       ;; scale on x axis
              0.8 )) ;; scale on y axis
      (set! (ly:grob-property grob 'stem-attachment)
            (cons 1.15  0))))

    ;; slanted notes c d e f# g# a#
    (cond

     ;; slanted whole notes
     (whole-note?
      (set! (ly:grob-property grob 'rotation) '(30 0 0))
      (set! (ly:grob-property grob 'stencil)
            (ly:stencil-scale (ly:grob-property grob 'stencil)
              0.9      ;; scale on x axis
              1.0 ))) ;; scale on y axis

     ;; slanted non-whole notes
     (else
      (set! (ly:grob-property grob 'rotation) '(10 0 0))
      (set! (ly:grob-property grob 'stencil)
            (ly:stencil-scale (ly:grob-property grob 'stencil)
              1.0        ;; scale on x axis
              1.0 )) ;; scale on y axis
      (set! (ly:grob-property grob 'stem-attachment)
            (cons 1.0 0.3)))))

express-stave.ily

Paul Morris

unread,
Jan 15, 2014, 1:22:46 AM1/15/14
to musicn...@googlegroups.com
So I sent my last message too soon... attached is another revision that's clearer, easier to understand, mostly thanks to less nesting of conditional if statements and better use of variables / variable names.  See code below for where to make adjustments.  

Cheers,
Paul

;; 6-6 slanted/flat and note size/shape settings (rotation and scaling)
;; and stem attachment settings
(cond
  ;; slanted whole notes
 ((and slanted-note? whole-note?)
   (set! (ly:grob-property grob 'rotation) '(30 0 0))
   (set! (ly:grob-property grob 'stencil)
         (ly:stencil-scale (ly:grob-property grob 'stencil)
           0.9      ;; scale on x axis
           1.0 ))) ;; scale on y axis

  ;; flat whole notes
 ((and (not slanted-note?) whole-note?)
   (set! (ly:grob-property grob 'rotation) '(0 0 0))
   (set! (ly:grob-property grob 'stencil)
         (ly:stencil-scale (ly:grob-property grob 'stencil)
           1.0      ;; scale on x axis
           0.8 ))) ;; scale on y axis

  ;; slanted non-whole notes
 ((and slanted-note? (not whole-note?))
  (set! (ly:grob-property grob 'rotation) '(10 0 0))
  (set! (ly:grob-property grob 'stencil)
        (ly:stencil-scale (ly:grob-property grob 'stencil)
          1.0        ;; scale on x axis
          1.0 )) ;; scale on y axis
  (set! (ly:grob-property grob 'stem-attachment)
        (cons 1.0 0.3)))

  ;; flat non-whole notes
 ((and (not slanted-note?) (not whole-note?))
express-stave.ily

Paul Morris

unread,
Jan 15, 2014, 1:29:47 AM1/15/14
to musicn...@googlegroups.com
On Jan 14, 2014, at 11:14 PM, Philip Rhoades <ph...@pricom.com.au> wrote:
>
> You don't want to do the GitHub thing I suggested? It would be good to have it centralise somewhere. Although if you are not keeping all the comments in the .ily file then we would need a separate reference doc with a reference in the .ily doc pointing to the Q & A in the ref doc. I would be happy to maintain that setup if that helps with your time? - also doing that would be good for my own LilyPond / Scheme education as other people ask questions.

Hi Phil, Let me think about it... Maybe it would make sense to have a github (or bitbucket?) repo for the MNP, and I would like to get more familiar with using git at some point.

That said, I think email is still probably a better medium for asking and answering questions about the code rather than doing it in files. Lets see if that works for John and go from there.

Goodnight from North America,
-Paul

Philip Rhoades

unread,
Jan 15, 2014, 1:48:10 AM1/15/14
to musicn...@googlegroups.com
Paul,
No worries.


> Goodnight from North America,


You are up late again . .

Regards,

Phil.

John Keller

unread,
Jan 15, 2014, 7:57:58 AM1/15/14
to musicn...@googlegroups.com
Paul,
 
Thanks for this, I suspect you set me a little test!
 
I had to change the Boolian values for both the 7/5 black and white coding and the 6/6 notehead rotation to get the right conditions.
 
I have tweaked the rotations and scaling values.
 
I havent found the stem connections this time but they are not too bad.
 
It looks as though a lot of the code is for ClaireNote and not relevant to Express Stave. I wonder if I can just delete these sections?
 
One question: Can the oval noteheads be scaled diagonally, so that the sloping notes are a little slimmer so as to not look weightier than the flat small notes (without altering their height and width)?
 
thanks again for all your help!
 
John K
 ----- Original Message -----
--
express-stave2.ily
example-express-stave.ly
example-express-stave.pdf

Paul Morris

unread,
Jan 15, 2014, 11:39:42 AM1/15/14
to musicn...@googlegroups.com
Hi John,


On Wednesday, January 15, 2014 7:57:58 AM UTC-5, John Keller wrote:
 
Thanks for this, I suspect you set me a little test!
 
I had to change the Boolian values for both the 7/5 black and white coding and the 6/6 notehead rotation to get the right conditions.

Well, I didn't intend to, but I'm glad you figured out what needed to be done!
 

I havent found the stem connections this time but they are not too bad.

 ;; slanted non-whole notes
((and slanted-note? (not whole-note?))
 (set! (ly:grob-property grob 'rotation) '(10 0 0))
 (set! (ly:grob-property grob 'stencil)
       (ly:stencil-scale (ly:grob-property grob 'stencil)
         1.0        ;; scale on x axis
         1.03 )) ;; scale on y axis
 (set! (ly:grob-property grob 'stem-attachment)   
       (cons 1.0 0.3)))                                        ;; <-- HERE THEY ARE, if you want to adjust them, 


The first number is for horizontal / x axis, 2nd is for vertical / y axis.

 
It looks as though a lot of the code is for ClaireNote and not relevant to Express Stave. I wonder if I can just delete these sections?

Yes, the majority of it is probably not relevant for Express Stave.  You can delete from line 197 ( % ACCIDENTALS )  to 523 (just before % CHORDS AUTO) that is the code for accidentals and key signatures in Clairnote.

From there down to line 825 (right before % CLEFS) might be relevant, depending on whether you want notes 2 semitones apart to be on the same side of the stem or opposite sides of the stem.  You could try commenting it out, and see what the results are for those smaller harmonic intervals.  I think without that code only notes 1 semitone apart will be on opposite sides of the stem, notes 2 semitones apart will be on the same side of the stem (which may result in notes overlapping, depending on your note shapes).  

 
One question: Can the oval noteheads be scaled diagonally, so that the sloping notes are a little slimmer so as to not look weightier than the flat small notes (without altering their height and width)?

There's no way to do diagonal scaling that I know of.  Here's the way you'd have to do it: first rotate them to either vertical or horizontal orientation, then scale them to the desired thickness, then rotate them back to the slant you want.  The code would look like this, with the rotation and scaling values set to get what you want:

;; slanted non-whole notes
((and slanted-note? (not whole-note?))
 ;; rotate to horizontal or vertical
 (set! (ly:grob-property grob 'rotation) '(10 0 0))
 ;; scale stencil to get desired shape
 (set! (ly:grob-property grob 'stencil)
       (ly:stencil-scale (ly:grob-property grob 'stencil)
         1.0        ;; scale on x axis
         1.03 )) ;; scale on y axis
 ;; rotate to desired slantedness
 (set! (ly:grob-property grob 'rotation) '(10 0 0))
 ;; do any additional scaling now that shape and slant are correct 
 ;; (this may not be needed)
 (set! (ly:grob-property grob 'stencil)
       (ly:stencil-scale (ly:grob-property grob 'stencil)
         1.0        ;; scale on x axis
         1.03 )) ;; scale on y axis
 ;; set the stem attachment coordinates
 (set! (ly:grob-property grob 'stem-attachment)
       (cons 1.0 0.3)))

 
 thanks again for all your help!

You're welcome, I'm glad it's working for you.

-Paul

John Keller

unread,
Jan 15, 2014, 3:22:19 PM1/15/14
to musicn...@googlegroups.com
Thanks again Paul, one more question before I set out to do the next editing:
 
- is separate upstem and downstem adjustment possible (4 coordinales) like in Finale?
 
John
----- Original Message -----
Sent: Thursday, January 16, 2014 3:39 AM
Subject: Re: [MNP] Re: Intervals in Express Stave

--

Paul Morris

unread,
Jan 15, 2014, 3:49:33 PM1/15/14
to musicn...@googlegroups.com
On Jan 15, 2014, at 3:22 PM, John Keller <jko...@bigpond.net.au> wrote:

> Thanks again Paul, one more question before I set out to do the next editing:
>
> - is separate upstem and downstem adjustment possible (4 coordinales) like in Finale?

Good question, and another wrinkle to unravel... I don't think so, and...no:

stem-attachment (pair of numbers):
ly:note-head::calc-stem-attachment
An (x . y) pair where the stem attaches to the notehead.

(From: http://lilypond.org/doc/v2.18/Documentation/internals/notehead )

There's only a single pair of x and y values that is set by a callback function (ly:note-head::calc-stem-attachment) that doesn't know about your custom note head shapes.

So that means I'll need to add some code to detect whether the stem is up or down for a given note, and then set the stem attachment one way or another depending on the stem direction. (I now remember doing this for TwinNote.)

And separate values for slanted notes and flat notes will be needed, so four different possible combinations.

So it doesn't make sense to work on stem attachments yet until I have a chance to work on this.

-Paul

Paul Morris

unread,
Jan 15, 2014, 4:39:55 PM1/15/14
to musicn...@googlegroups.com
Hi John,

Ok, see attached which now has code for changing all the stem attachment values, around line 159. You'll need to adjust the values to fit once you have your note head shapes finalized.

;; STEM ATTACHMENTS
(set! (ly:grob-property grob 'stem-attachment)
(cond
;; slanted note, stem up
((and slanted-note? stem-up?)
(cons 1.0 0.3))

;; slanted note, stem down
((and slanted-note? (not stem-up?))
(cons 1.0 0.3))

;; flat note, stem up
((and (not slanted-note?) stem-up?)
(cons 1.15 0))

;; flat note, stem down
((and (not slanted-note?) (not stem-up?))
(cons 1.15 0))))

I changed the line positions to -6 0 6 so that the stem would change direction at the middle line of the staff (it always changes direction at staff line position 0).

This then required adjusting the middle C position in the clef settings for each of the 3 different clefs. I've left the position of the clefs themselves alone since that will change with your custom clefs. Feel free to change them in the meantime here around line 612:

% set (or reset) clef settings for clairnote
#(define (set-clairnote-clefs)
(let* ((treble-pos -5)
(treble-c -9)
(bass-pos 5)
(bass-c -1)
(alto-pos 0)
(alto-c -2))
(set-clefs
treble-pos treble-c
bass-pos bass-c
alto-pos alto-c)))

treble-pos, bass-pos, and alto-pos will just change the vertical position of the clef symbol on the staff. The notes are unaffected.

I also deleted all the key signature and accidental code that you don't need.

I updated the 6-6 rotation and resizing code as discussed in a previous message, so you have what you need to fully shape the slanted note heads, for both whole notes and non-whole notes.

I think that covers it!
-Paul

express-stave3.ly

John Keller

unread,
Jan 15, 2014, 5:14:41 PM1/15/14
to musicn...@googlegroups.com
Wow! You are such a whiz at this!

Thanks again,
John

----- Original Message -----
From: "Paul Morris" <pa...@paulwmorris.com>
To: <musicn...@googlegroups.com>
--------------------------------------------------------------------------------
> --
> You received this message because you are subscribed to the forum of the
> Music Notation Project (hosted by Google Groups).
> To post to this group, send email to musicn...@googlegroups.com
> To unsubscribe from this group, send email to
> musicnotatio...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/musicnotation?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "The Music Notation Project | Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to musicnotatio...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.




--------------------------------------------------------------------------------

John Keller

unread,
Jan 15, 2014, 5:22:19 PM1/15/14
to musicn...@googlegroups.com
Did you reverse the 7-5 coding again?

And does it matter that this is an .ly file, not an .ily file?

John Keller

unread,
Jan 15, 2014, 5:33:33 PM1/15/14
to musicn...@googlegroups.com
Its not the reverse 7-5, but you have changed the pitches so that C is under
the bottom line instead of the middle line!

Paul Morris

unread,
Jan 15, 2014, 6:50:34 PM1/15/14
to musicn...@googlegroups.com
On Jan 15, 2014, at 5:33 PM, John Keller <jko...@bigpond.net.au> wrote:

> Its not the reverse 7-5, but you have changed the pitches so that C is under the bottom line instead of the middle line!

Oops, sorry! I think I got the treble and alto clefs right but got in a hurry and goofed on the bass clef, but double check the other clefs to make sure. To fix this, adjust the number here for bass-c (and if needed treble-c or alto-c) around line 612:

% set (or reset) clef settings for clairnote
#(define (set-clairnote-clefs)
(let* ((treble-pos -5)
(treble-c -9)
(bass-pos 5)
(bass-c 5)
(alto-pos 0)
(alto-c -2))
(set-clefs
treble-pos treble-c
bass-pos bass-c
alto-pos alto-c)))

I think 5 is the number you want for bass-c. That should put middle c (c' in LilyPond code) in the right place on the bass clef staff.

(You probably want to do a find and replace to change "set-clairnote-clefs" to "set-custom-clefs" too.)

I just forgot to save it as .ily instead of .ly. It doesn't matter as far as LilyPond is concerned, that just helps you tell the difference between a file that's supposed to be included and a file that's not (i.e. contains music).

Cheers,
-Paul

John Keller

unread,
Jan 15, 2014, 8:37:59 PM1/15/14
to musicn...@googlegroups.com
Ok middle C positions fixed.

I was working on the note shapes with your double rotation method and then
stems. It seems i need to move some noteheads sideways slightly as well to
align them.

I looked in the references and tried X-offset and grob property 'position,
but couldnt get anything to work. Sorry Paul, I need help again!

Paul Morris

unread,
Jan 16, 2014, 1:58:01 AM1/16/14
to musicn...@googlegroups.com
Hi John,

On Jan 15, 2014, at 8:37 PM, John Keller <jko...@bigpond.net.au> wrote:
>
> I was working on the note shapes with your double rotation method and then stems. It seems i need to move some noteheads sideways slightly as well to align them.
>
> I looked in the references and tried X-offset and grob property 'position, but couldnt get anything to work. Sorry Paul, I need help again!

Ok, I think this might work... It just moves the stencil:

Function: ly:stencil-translate stil offset
Return a stil, but translated by offset (a pair of numbers).

From:
http://lilypond.org/doc/v2.18/Documentation/internals/scheme-functions

I can see about adding this maybe tomorrow...

-Paul

John Keller

unread,
Jan 16, 2014, 2:45:45 PM1/16/14
to musicn...@googlegroups.com
I tried to add this function (ly:stencil-translate stil offset) to the
slanted wholenote, keeping the same syntax as the ly:stencil-scale. I tried
the "pair of numbers" both with and without brackets. Nothing worked.

And when I commented the additions out, the whole file went pink as though
it was all in error! On the next try just the (cond on line 107 went pink
and gave an error message. I dont understand why adding stuff but then
commenting it out would change the file to give an error.

John K
express-stave4.ly

Paul Morris

unread,
Jan 16, 2014, 3:38:24 PM1/16/14
to musicn...@googlegroups.com
Hi John,


On Thursday, January 16, 2014 2:45:45 PM UTC-5, John Keller wrote:
I tried to add this function (ly:stencil-translate stil offset) to the
slanted wholenote, keeping the same syntax as the ly:stencil-scale. I tried
the "pair of numbers" both with and without brackets. Nothing worked. 

And when I commented the additions out, the whole file went pink as though
it was all in error! On the next try just the (cond  on line 107 went pink
and gave an error message. I dont understand why adding stuff but then
commenting it out would change the file to give an error.

Looks like you almost had it.  You have to make sure the parentheses are in the right place.  Often when the whole file goes pink like that I usually have misplaced a parenthesis which throws everything else off.  So you put the new code after the closing parentheses that matched the one that opened up here: 

  ((and slanted-note? whole-note?)


when it needed to go before it so that it would be executed along with the other code that falls under this conditional.  When the cursor is next to a parenthesis, Frescobaldi will highlight the other one that it corresponds to which makes it easier to check them.  Also it looks like when you commented out the new code you left out a ;; before the 0.95:

;;   (set! (ly:grob-property grob 'stencil)
 ;;        (ly:stencil-translate (ly:grob-property grob 'stencil)
           0.95      ;; move on x axis
   ;;        1.2 )))   ;; move on y axis

Oh, and it looks like this function (unlike ly:stencil-scale) wants a "pair" of numbers which is a technical term for a type of data container in Scheme.  So you need to put the numbers in a "cons" procedure (named for construct, which constructs a pair) like so: 

(cons X Y)

The following is working for me, a revision of this part of the code from the file you attached.

;; WHOLENOTES
;; slanted whole notes
((and slanted-note? whole-note?)
 ;; rotate to horizontal or vertical
 ;;  (set! (ly:grob-property grob 'rotation) '(10 0 0))
 ;; scale stencil
 (set! (ly:grob-property grob 'stencil)
       (ly:stencil-scale (ly:grob-property grob 'stencil)
         1        ;; scale on x axis
         0.7 )) ;; scale on y axis
 ;; rotate to desired slantedness
 (set! (ly:grob-property grob 'rotation) '(32 0 0))
 ;; do any additional scaling now that slant is correct
 (set! (ly:grob-property grob 'stencil)
       (ly:stencil-scale (ly:grob-property grob 'stencil)
         0.95      ;; scale on x axis
         1.2 ))
 (set! (ly:grob-property grob 'stencil)
       (ly:stencil-translate (ly:grob-property grob 'stencil)
         (cons
          0.95      ;; move on x axis
          1.2 ))))   ;; move on y axis

One other tip is that you can do Frescobaldi > Tools menu > Format and it will automatically indent and format the code for you in typical LilyPond / Scheme style.  Much easier than doing it by hand.

I'll leave it to you to do the code for any of the other notes that need moving!  Let me know if you run into trouble.

Cheers,
-Paul

Paul Morris

unread,
Jan 16, 2014, 3:42:19 PM1/16/14
to musicn...@googlegroups.com

John Keller

unread,
Jan 16, 2014, 8:00:09 PM1/16/14
to musicn...@googlegroups.com
Hi Paul,
 
Unfortunately this translate function does not move the slanted notehead independently but drags other noteheads on the same stem with it. See the wholenotes in the ES example.
 
I might be able to align the noteheads without this function by changing the order and amounts of the scaling and rotations functions. More fiddling required.
 
John
----- Original Message -----
Sent: Friday, January 17, 2014 7:38 AM
Subject: Re: [MNP] Intervals in Express Stave

--
express-stave4.ly
example-express-stave.pdf
example-express-stave.ly

Paul Morris

unread,
Jan 16, 2014, 8:23:01 PM1/16/14
to musicn...@googlegroups.com
Hi John,

Ok, sorry it didn't do what you needed.  Hopefully you can figure out something that works.  Maybe try adjusting the stem attachment?

-Paul


<express-stave4.ly><example-express-stave.pdf><example-express-stave.ly>

John Keller

unread,
Jan 16, 2014, 8:46:24 PM1/16/14
to musicn...@googlegroups.com
I got stem attachments right for individual noteheads, but for chords it seems the attachments dont work except the note at the end of the stem. I think the notehead alignment in chords must supercede the stem attachments. But Ill keep on fiddling with it.

Paul Morris

unread,
Jan 17, 2014, 10:44:24 AM1/17/14
to musicn...@googlegroups.com
On Jan 16, 2014, at 8:46 PM, John Keller <jko...@bigpond.net.au> wrote:

I got stem attachments right for individual noteheads, but for chords it seems the attachments dont work except the note at the end of the stem. I think the notehead alignment in chords must supercede the stem attachments. But Ill keep on fiddling with it.

Hmmm... I think it would be best to only adjust the stem attachment to change the lengths of the stems vertically (i.e. always use 1 for the x-axis stem attachment values).  Then use ly:stencil-translate, if needed, to move the note head stencil horizontally to meet up with the stems.

Hopefully that will result in the same horizontal placement of notes relative to the stem regardless of whether the note is a single note or part of a chord.

Also we may need to do separate stem attachments for whole notes and for non-whole notes.  I don't know, but if the whole notes are affected by stem attachment values that are intended for notes with stems that have narrower note head shapes...  then that's not going to work.  Fortunately that's easy to do:

;; STEM ATTACHMENTS
(if (not whole-note?) ;; only change them for non-whole-notes
    (set! (ly:grob-property grob 'stem-attachment)
          (cond
           ;; slanted note, stem up
           ((and slanted-note? stem-up?)
            (cons 1.0 0.3))

           ;; slanted note, stem down
           ((and slanted-note? (not stem-up?))
            (cons 0.9 0.7))

           ;; flat note, stem up
           ((and (not slanted-note?) stem-up?)
            (cons 1.15 0))

           ;; flat note, stem down
           ((and (not slanted-note?) (not stem-up?))
            (cons 1.1 -0.1)))))

Let me know how all that works.

Cheers,
-Paul

Jan Braunstein

unread,
Jan 17, 2014, 6:50:10 PM1/17/14
to musicn...@googlegroups.com
Hi Paul and John,

Good to see it all getting in shape!
Speaking of shapes, I finally had some time to get back into it and managed to transfer the glyphs for Chormatic Lyre Notation to LilyPond.
Now I would really appreciate some guidance... Paul, would you look at it, please? The clefs are there too.

Since the basic conversion of SVG files to Lilypond is done, I thought it would be better to move it back to "Chromatic Lyre with LilyPond" thread  https://groups.google.com/forum/#!topic/musicnotation/mqDedz_GPjA so it does not get too mixed up here.
So I posted the new include file that also contains the glyphs there.

Cheers,
Jan



John Keller

unread,
Jan 18, 2014, 4:51:13 AM1/18/14
to musicn...@googlegroups.com
By experimenting, I have found:
 
1 The  ly:stencil-translate  function does not move the noteheads relative to the stem, but moves the note at the end of the stem, together with the stem, and all other notes connected to the stem. So that if I use this function on a slanted note, then every stem that has this slanted note at its end gets moved, while stems with flat noteheads at the end don't get moved, resulting in uneven spacing of the stems but noteheads on each stem remaining misaligned.
 
2  When you rotate, then scale in the x and y directions, it is the same as if you scaled first then rotated. In other words the x and y axes rotate with the object. So if you scaled by  (x, y) = (2, 1), then rotated by 90 degrees,  then scaled by (0.5, 1), you just get back to the original shape.
 
3 Noteheads that are scaled to various widths, align at their left sides for down stems and at their right sides for upstems. Even wholenotes in a chord align like this as if  they did have a stem. But the problem is that if you then ROTATE the wider notehead to try to bring its horizontal width back to the standard, it rotates on its center point, which stays at the same distance from the stem. So it comes away from the stem and no longer aligns.
 
4 Stem attachment does not seem to affect this, except for notes at the end of stems. All not-rotated noteheads will align, but the rotated ones will not.
 
John K
 
 ----- Original Message -----
Sent: Saturday, January 18, 2014 2:44 AM
Subject: Re: [MNP] Intervals in Express Stave

--

John Keller

unread,
Jan 18, 2014, 11:00:35 AM1/18/14
to musicn...@googlegroups.com
Almost solved the notehead alignment problems!
 
- by using a scaling, a rotation and a translation in the y direction only.
 
And separating all the various condition cases, stem up or down, notehead sloping or flat.
 
The trick seems to be to find the geometric point on an elipse to rotate it around, so that the stem remains just touching, and then compensate for the vertical shift by a y axis translation. 
 
Just some fine tuning to do.
 
Cheers,
John

Paul Morris

unread,
Jan 18, 2014, 11:43:40 AM1/18/14
to musicn...@googlegroups.com
Hi John,
Thanks for testing and figuring this stuff out. More below...

On Jan 18, 2014, at 4:51 AM, John Keller <jko...@bigpond.net.au> wrote:

> 1 The ly:stencil-translate function does not move the noteheads relative to the stem, but moves the note at the end of the stem, together with the stem, and all other notes connected to the stem. So that if I use this function on a slanted note, then every stem that has this slanted note at its end gets moved, while stems with flat noteheads at the end don't get moved, resulting in uneven spacing of the stems but noteheads on each stem remaining misaligned.

Ah, that makes sense because I'm remembering that in LilyPond the stem is attached to the note rather than the note being attached to the stem. That is... the stem is a child of the note, so if you move the note the stem goes with it, in this case because the stem gets attached after the note stencil has been moved.


> 2 When you rotate, then scale in the x and y directions, it is the same as if you scaled first then rotated. In other words the x and y axes rotate with the object. So if you scaled by (x, y) = (2, 1), then rotated by 90 degrees, then scaled by (0.5, 1), you just get back to the original shape.

Interesting... I didn't realize this. This makes sense because so far we've been using the rotation property of the grob to do the rotating, so it seems this rotates the whole grob and not just the stencil. There's another way to do the rotation which just rotates the stencil (the stencil is itself a property of the grob) using:

Function: ly:stencil-rotate stil angle x y
Return a stencil stil rotated angle degrees around the relative offset (x, y). E.g., an offset of (-1, 1) will rotate the stencil around the left upper corner.
(from: http://lilypond.org/doc/v2.18/Documentation/internals/scheme-functions)

(This is the function Joe is using to rotate his triangle note heads.) So if you use this to do the rotation of the stencil it shouldn't change the orientation of the x and y axes and you can then scale it into the shape you want, and then rotate it back. Seems like you should use the same method of rotation for both rotations?

Anyway, that's the next thing I would try.

(I seem to recall that the rotation grob property worked better for me for rotating the Clairnote note heads, but I can't remember why.)


> 3 Noteheads that are scaled to various widths, align at their left sides for down stems and at their right sides for upstems. Even wholenotes in a chord align like this as if they did have a stem. But the problem is that if you then ROTATE the wider notehead to try to bring its horizontal width back to the standard, it rotates on its center point, which stays at the same distance from the stem. So it comes away from the stem and no longer aligns.

Hmmm... this is tricky... it may involve the stencil extents which may not be changed by changing the rotation property of the grob? Maybe this will be different when using ly:stencil-rotate?


> 4 Stem attachment does not seem to affect this, except for notes at the end of stems. All not-rotated noteheads will align, but the rotated ones will not.

Ok, sounds like the stem is just attached to the lowest/highest noteheads, and then the other notes are stacked/aligned to that note head without taking their individual stem attachment properties into consideration.

I'd say try and see if using the other rotation method makes a difference. Let me know if you need help with the code for that. At this point we're far out into the weeds. I had a feeling that getting this just right would not be easy!

Cheers,
-Paul

Paul Morris

unread,
Jan 18, 2014, 1:54:05 PM1/18/14
to musicn...@googlegroups.com
That's good news, and a clever solution on changing the point of rotation...  Good luck!  -Paul

John Keller

unread,
Jan 18, 2014, 11:51:34 PM1/18/14
to musicn...@googlegroups.com
Paul, you wrote:
"There's another way to do the rotation which just rotates the stencil (the
stencil is itself a property of the grob) using:
Function: ly:stencil-rotate stil angle x y"

I tried this and yes, it works in that scaling done afterwards is in the
proper x and y directions. However, I cannot find any axis points for this
rotation function that moves the object horizontally, eg if i rotate +45
(anticlockwise) about lower left corner (-1 -1), I would expect the notehead
to move left as well as up. It moves up but not left!

I dont really understand what is the difference between the grob and the
stencil anyway. And I thought that "stil" just means stencil, but maybe it
means something different?

John K

----- Original Message -----
From: "Paul Morris" <pa...@paulwmorris.com>
To: <musicn...@googlegroups.com>
Sent: Sunday, January 19, 2014 3:43 AM
Subject: Re: [MNP] Intervals in Express Stave


John Keller

unread,
Jan 19, 2014, 12:11:46 AM1/19/14
to musicn...@googlegroups.com
What I mean is, this rotation method does not move a notehead horizontally
relative to other noteheads in the stack (just like the translate function).

JK

Paul Morris

unread,
Jan 19, 2014, 10:30:27 AM1/19/14
to musicn...@googlegroups.com
On Jan 18, 2014, at 11:51 PM, John Keller <jko...@bigpond.net.au> wrote:

> Paul, you wrote:
> "There's another way to do the rotation which just rotates the stencil (the stencil is itself a property of the grob) using:
> Function: ly:stencil-rotate stil angle x y"
>
> I tried this and yes, it works in that scaling done afterwards is in the proper x and y directions.

Ok, that's good. That's the problem I thought it would solve.


> However, I cannot find any axis points for this rotation function that moves the object horizontally, eg if i rotate +45 (anticlockwise) about lower left corner (-1 -1), I would expect the notehead to move left as well as up. It moves up but not left!

Hmmm... ok, not sure why that is.

> I dont really understand what is the difference between the grob and the stencil anyway. And I thought that "stil" just means stencil, but maybe it means something different?

You're right, "stil" here just refers to a stencil, it just sayst that the first argument that the ly:stencil-rotate function takes is a stencil.

The stencil is just the graphical part of a grob, one of its properties. The grob has other properties as well. For note heads the grob has a duration (well a duration log), a stem-attachment property, a stencil, etc. For example:
http://lilypond.org/doc/v2.18/Documentation/internals/notehead

As an illustration, if Jane was a grob her appearance would be her stencil, but she would also have other properties like her age, her height, her nationality, the languages she speaks, etc.

So when we're rotating the stencil we're just changing the appearance of the note head, whereas when we're changing the rotation property of the grob, we're changing a grob property and that may affect other grob properties, whereas rotating the stencil shouldn't affect other grob properties.

(It seems like moving the stencil with ly:stencil-translate doesn't affect its position because when the note head is drawn, LilyPond takes the stencil, wherever it is on the coordinate plane, and places it where it thinks it goes for that grob...)


> What I mean is, this rotation method does not move a notehead horizontally relative to other noteheads in the stack (just like the translate function).

Maybe use ly:stencil-rotate for the first rotation, to allow resizing the note head to get the shape you want, and then use the other rotation method to rotate it back into place so that it lines up vertically in chords?

That's what I'd try next... one's perseverance must be strong to navigate these waters!

-Paul

John Keller

unread,
Jan 20, 2014, 12:30:38 AM1/20/14
to musicn...@googlegroups.com
How do I define a clef called "bird"?

I copied the snippet for custom clefs but I dont get which terms are scheme
functions and which are terms just defined by the user. Eg is
"customClefStencilOne" a predefined function, or is it a name that is being
defined, or maybe part function and part definition?

I tried substituting "bird" for "customClefStencilOne" but that didnt work.

John Keller

unread,
Jan 20, 2014, 8:30:22 AM1/20/14
to musicn...@googlegroups.com
I have figured out the answer to this, All these terms are user-defined
names.

Now I need to automate the scaling down of the Bird clef coordinates from in
the 1000s to the tens. Is there a way to do this?

John

Paul Morris

unread,
Jan 20, 2014, 8:45:21 AM1/20/14
to musicn...@googlegroups.com
On Jan 20, 2014, at 8:30 AM, John Keller <jko...@bigpond.net.au> wrote:

> I have figured out the answer to this, All these terms are user-defined names.

The code highlighting in Frescobaldi should help with making these determinations in the future. Which custom clef snippet are you referring to?


> Now I need to automate the scaling down of the Bird clef coordinates from in the 1000s to the tens. Is there a way to do this?

Maybe try this which Jan found and I believe used:
http://petercollingridge.appspot.com/svg_transforms

If that doesn't work there's also manually moving the decimal point on all the numbers...

-Paul

John Keller

unread,
Jan 21, 2014, 2:50:39 PM1/21/14
to musicn...@googlegroups.com
My progress so far:

I got the bird clef to appear at the right size and position, so Im ready to
incorporate this code into the ES ily file. I copied in the code but
obviously need some way to get it to be activated.

What I would like is a default setting of Bird overriding treble and Frog
overriding bass, but options of also using Kids (middle) or Grand (combined
staff of 3 octaves). So that to transnotate a music file, I would just add
the Include ES statement, but could also edit in \clef Kids etc.

And of course, sometimes we might want to show both ES and TN for
comparison.

John K

----- Original Message -----
From: "Paul Morris" <pa...@paulwmorris.com>
To: <musicn...@googlegroups.com>
Sent: Tuesday, January 21, 2014 12:45 AM
Subject: Re: [MNP] Intervals in Express Stave


Bird Clef.ly
express-stave4.ly

Paul Morris

unread,
Jan 21, 2014, 10:32:53 PM1/21/14
to musicn...@googlegroups.com
Hi John,

See the other thread I just started on Clefs since both you and Jan are working on these now.

The combined 3 octave staff will require creating a separate 3 octave staff definition, so lets hold off on that for now...

-Paul
> <Bird Clef.ly><express-stave4.ly>

Reply all
Reply to author
Forward
0 new messages