Re: scale notehead X and Y independently

2011-03-17 Thread Tim Sheasby
Thanks Robin. This does exactly what I need. I will use this to optically tweak 
note heads before trying to patch the fonts again. Lets me optically align the 
mi and do.

On 17 Mar 2011, at 2:06 AM, Robin Bannister wrote:

 Tim Sheasby wrote: 
 how do I apply it to a specific note in a \set shapeNoteStyles context 
Well, I'm not sure what you're aiming for, but try this: 
 miNarrow = #(lambda (grob)(if (eqv? (ly:grob-property grob 'style) 
 'miMirror)
 (ly:stencil-scale (ly:note-head::print grob) 0.5 1.5)
 (ly:note-head::print grob)))
  \relative c' {
   \override NoteHead #'stencil = #miNarrow
   \aikenHeads
   c e4
   c e4
 }
Cheers, Robin
 
 miNarrow.png

Tim Sheasby
t...@sheafpublishing.co.za


inline: Sheaf logo small.jpg

___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: scale notehead X and Y independently

2011-03-16 Thread Tim Sheasby
Sorry, it's taken me a while to get back to this. This works fine but how do I 
apply it to a specific note in a \set shapeNoteStyles context. Tried the 
following for example but not working.

---8-
miNarrow = {
\musicglyph #noteheads.s1mi
#(lambda (grob) (ly:stencil-scale
(ly:note-head::print grob) 0.95 1.05))
}

aikenHeads = {
\set shapeNoteStyles = #'#(do re miNarrow fa sol la ti)
}

\key c
\relative c' {
\aikenHeads
c e4
c e4
}
---8-

On 27 Feb 2011, at 12:53 AM, Robin Bannister wrote:

 Tim Sheasby wrote:
 Can a notehead be scaled by different factors in the x and y directions?
In the recent development versions (starting with 2.13.38) you can. The 
 following snippet uses an X-factor of 2:
wideNH = #(lambda (grob) (ly:stencil-scale (ly:note-head::print grob) 2 1))
 
 {
 b'4 g'4  \override NoteHead #'stencil = #wideNH
 b'4 g'4
 }
Cheers, Robin
 
 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 http://lists.gnu.org/mailman/listinfo/lilypond-user

Tim Sheasby
t...@sheafpublishing.co.za


inline: Sheaf logo small.jpg

___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: scale notehead X and Y independently

2011-03-16 Thread Carl Sorensen



On 3/16/11 12:32 PM, Tim Sheasby t...@sheafpublishing.co.za wrote:

 Sorry, it's taken me a while to get back to this. This works fine but how do I
 apply it to a specific note in a \set shapeNoteStyles context. Tried the
 following for example but not working.
 

You can't.  I think I already said that.  But I think that Robin didn't
understand what you were asking.

The shape note code works by going and getting a music glyph named

noteheads.s + durlog(notehead) + shape(notehead)

So you need to have a music glyph named noteheads.s1miNarrow in order to
work with the shape notes.

That's why I said you'd need to go work with the font.

Otherwise, you'll need to write a new notehead::print function that makes
the desired substitution.

HTH,

Carl
 


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: scale notehead X and Y independently

2011-03-16 Thread Robin Bannister
Tim Sheasby wrote: 
how do I apply it to a specific note in a \set shapeNoteStyles context 
  
  
Well, I'm not sure what you're aiming for, but try this: 
  
  
 miNarrow = #(lambda (grob) 
   (if (eqv? (ly:grob-property grob 'style) 'miMirror)

 (ly:stencil-scale (ly:note-head::print grob) 0.5 1.5)
 (ly:note-head::print grob)))
 
 \relative c' {

   \override NoteHead #'stencil = #miNarrow
   \aikenHeads
   c e4
   c e4
 }
  
  
Cheers, 
Robin


attachment: miNarrow.png___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: scale notehead X and Y independently

2011-02-26 Thread Nick Payne

On 26/02/11 22:03, Tim Sheasby wrote:

Can a notehead be scaled by different factors in the x and y directions?


There's a snippet showing how to generate noteheads with PostScript. You 
could adapt that to get any shape and scaling you like:


http://lsr.dsi.unimi.it/LSR/Item?id=516

Nick

___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: scale notehead X and Y independently

2011-02-26 Thread Robin Bannister

Tim Sheasby wrote:

Can a notehead be scaled by different factors in the x and y directions?
  
  
In the recent development versions (starting with 2.13.38) you can. 
The following snippet uses an X-factor of 2:
  
  
wideNH = #(lambda (grob) (ly:stencil-scale (ly:note-head::print grob) 2 1))


{
 b'4 g'4 
 \override NoteHead #'stencil = #wideNH

 b'4 g'4
}
  
  
Cheers, 
Robin


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: scale notehead X and Y independently

2011-02-26 Thread Bernardo Barros
2011/2/26 Robin Bannister r...@dataway.ch:
  b'4 g'4  \override NoteHead #'stencil = #wideNH

Nice! Thanks!

And what is the tweak to position the stem in the center of the
notehead (moving it horizontally to left or right, depending if it is
stemUp or stemDown)?

___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: scale notehead X and Y independently

2011-02-26 Thread Bernardo Barros
I mean:

{
\override Stem #'extra-offset = #'(0.4 . 0) 
b'4
\override Stem #'extra-offset = #'(-0.4 . 0)
g'4
}

But automatically

___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user