Re: centering text on a measure

2011-09-03 Thread David Nalesnik
On Thu, Sep 1, 2011 at 3:09 AM, Trevor Daniels t.dani...@treda.co.ukwrote:

Perhaps you could turn this idea into a music function:

 \relative c'' {
  a4 a a a |
  
   { a4 a a a | }
   {
 \once \override MultiMeasureRest #'transparent = ##t
  R1_XIII |
   }
  
  a4 a a a |
 }


Thank you, Trevor.  This technique both centers the text item and takes it
into account for spacing purposes.  I'm not sure how to make it work for the
partial measure I put at the end of my example, though.  Also, it centers
the text in the usable measure space -- after a time signature change, for
example.  This is certainly a good thing!  However, I'd like to be able to
center the text on the measure regardless of what's in it (or, by extension,
center it between items of my choosing).  I'm hoping that there's a way to
do this without relying on 'extra-offset, so that other grobs will move up
to avoid collisions.  Is this possible?

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


Re: centering text on a measure

2011-09-03 Thread David Nalesnik
Hi Harm,

On Thu, Sep 1, 2011 at 2:30 PM, harm6 thomasmorle...@googlemail.com wrote:


 Hi David,

 don't know anything about the error:

 ERROR: In procedure ly:grob-object:
 ERROR: Wrong type argument in position 1 (expecting Grob): ()

 This error-warning must be an error! :)


My only guess is that the property I'm calling on to locate everything on a
line isn't set until a later stage in the layout process, after X-offsets
have been considered.


 How about:

 \version 2.14.2

 #(define (bounding-coords grob-coord bar-coords end-coord)
   (if (null? (cdr bar-coords))
   (cons (car bar-coords) end-coord)
   (if (and ( (car bar-coords) grob-coord)
( (cadr bar-coords) grob-coord))
   (cons (car bar-coords)(cadr bar-coords))
   (bounding-coords grob-coord (cdr bar-coords) end-coord

 #(define (center-on-measure grob)
   (let* ((sys (ly:grob-system grob))
  (array (ly:grob-object sys 'all-elements))
  (grob-coord (interval-center (ly:grob-extent grob sys X)))
  (grob-name (lambda (x) (assq-ref (ly:grob-property x 'meta)
 'name)))
  (bars (filter (lambda (x) (eq? 'NonMusicalPaperColumn (grob-name
 x)))
  (ly:grob-array-list array)))
  (bar-coords (sort (map (lambda (x) (interval-center
 (ly:grob-extent x sys X))) bars) ))
  (bounds (bounding-coords grob-coord bar-coords (cdr
 (ly:grob-extent sys sys X)

  (ly:grob-translate-axis! grob (- (- grob-coord (/ (+ (car bounds) (cdr
 bounds)) 2))) X)
 ))

 {
  \override TextScript #'after-line-breaking = #center-on-measure
   \repeat unfold 10 { s1_|^| }
  s2_|^|
 }


I like this variation, because after using it I can still tweak the position
of the text with an override of 'extra-offset.  For reasons I don't
understand, though, overrides of 'Y-offset have no effect after your
function is called (they do in the version I posted). (Overrides of 'padding
work in either case.)

Thank you for your ideas!
David


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


Re: MacOSX Lion

2011-09-03 Thread Andrea La Rose

Any suggestions for people who a) don't really know how to use terminal and
b) can't get JEdit to work properly either? 


flup2 wrote:
 
 Hello,
 
 As mentionned here ( 
 http://old.nabble.com/Error-opening-2.14.2-td32140373.html
 http://old.nabble.com/Error-opening-2.14.2-td32140373.html  ) it is
 related to the included editor. For now, Lilypond works if you use :
 - terminal command
 - another text editor (JEdit with Lilypondtool, for instance)
 
 Philippe
 

-- 
View this message in context: 
http://old.nabble.com/MacOSX-Lion-tp32145670p3239.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.


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


Re: MacOSX Lion

2011-09-03 Thread flup2

Hello,

Is seems that the last beta release (2.15.9) fixes the problem. You can down
download it from http://lilypond.org/development.html

Philippe
-- 
View this message in context: 
http://old.nabble.com/MacOSX-Lion-tp32145670p32392269.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.


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


Re: MacOSX Lion

2011-09-03 Thread Andrea La Rose

I did read that message, but it wasn't clear to me whether that was for
regular schmoes like me or only for developers. But I'll give it a whirl...
Thanks!

Andrea


flup2 wrote:
 
 Hello,
 
 Is seems that the last beta release (2.15.9) fixes the problem. You can
 down download it from http://lilypond.org/development.html
 
 Philippe
 

-- 
View this message in context: 
http://old.nabble.com/MacOSX-Lion-tp32145670p32392280.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.


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


Re: centering text on a measure

2011-09-03 Thread Trevor Daniels


David Nalesnik


However, I'd like to be able to
center the text on the measure regardless of what's in it (or, by 
extension,
center it between items of my choosing).  I'm hoping that there's 
a way to
do this without relying on 'extra-offset, so that other grobs will 
move up

to avoid collisions.  Is this possible?


Hhm.  Can't think of a way without doing some
coding.  It would be nice if TextSpanner could
centre its text between the left and right
bounds (like the number on a tuplet bracket)
but it doesn't, AFAIK.  It would be a nice
extension to request, though.

MultiMeasureRestText can also be moved with
\once \override MultiMeasureRestText #'self-alignment-X = #-2
and this will enable collisions to be avoided
at the new position.

Trevor




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


Re: centering text on a measure

2011-09-03 Thread David Nalesnik
Trevor,

On Sat, Sep 3, 2011 at 9:56 AM, Trevor Daniels t.dani...@treda.co.ukwrote:

It would be nice if TextSpanner could
 centre its text between the left and right
 bounds (like the number on a tuplet bracket)
 but it doesn't, AFAIK.


Thank you for this idea!

I've adapted the snippet for centering text on hairpins
 http://lsr.dsi.unimi.it/LSR/Snippet?id=233
to give an approximation of this.  Basically,  I've replaced the default
TextSpanner stencil with a blank with the same extents to which I add a
text.  The argument allows you to position this text using an alignment
value.  The example shows a few alignments over one-measure groups on the
first line, two-measure groups on the second.  (Unfortunately, if I don't
blank out the default stencil, the text appears on top of the extender line,
and of course the distance between the individual dashes or dots isn't
adapted to make for a nice fit.  Insert bad memories of another notation
program here.)

Uncommenting the line in \music { . . . } shows that the alignment does
affect spacing.

\version 2.15.8

#(define ((spanner-with-movable-text text value) grob)
   (let* ((spanner-stencil (ly:line-spanner::print grob))
  (new (ly:make-stencil  (ly:stencil-extent spanner-stencil X)
  (ly:stencil-extent spanner-stencil Y
 (ly:stencil-aligned-to
   (ly:stencil-add
 (ly:stencil-aligned-to new X value)
 (ly:stencil-aligned-to (grob-interpret-markup grob text) X CENTER))
   X LEFT)))

pattern = \relative c'' {
  c8\startTextSpan
  c c c
  c c c
  c\stopTextSpan
}

music = {
  \override TextSpanner #'stencil = #(spanner-with-movable-text | LEFT)
  \pattern
  \override TextSpanner #'stencil = #(spanner-with-movable-text | -0.5)
  %% uncomment to see vertical adjustment
  %\override TextSpanner #'stencil = #(spanner-with-movable-text | 2)
  \pattern
  \override TextSpanner #'stencil = #(spanner-with-movable-text | CENTER)
  \pattern
  \override TextSpanner #'stencil = #(spanner-with-movable-text | 0.5)
  \pattern
  \override TextSpanner #'stencil = #(spanner-with-movable-text | RIGHT)
  \pattern
}

\relative c'' {
  \hideNotes
  \music
  \time 2/4
  \music
}

Now, I suppose the text's position is dependent on the NoteColumn grobs to
which the spanner is attached.  Would it be possible to reset the attachment
point to another grob? (I could use offsets as in the original function, but
that will once again bring in the 'extra-offset issue.)


 It would be a nice
 extension to request, though.


I agree that this would be great feature for LilyPond.  How would I go about
making a request?

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


Re: centering text on a measure

2011-09-03 Thread Trevor Daniels


David Nalesnik wrote Saturday, September 03, 2011 6:36 PM


I've adapted the snippet for centering text on hairpins
http://lsr.dsi.unimi.it/LSR/Snippet?id=233
to give an approximation of this.  Basically,  I've replaced the 
default
TextSpanner stencil with a blank with the same extents to which I 
add a
text.  The argument allows you to position this text using an 
alignment
value.  The example shows a few alignments over one-measure groups 
on the
first line, two-measure groups on the second.  (Unfortunately, if 
I don't
blank out the default stencil, the text appears on top of the 
extender line,
and of course the distance between the individual dashes or dots 
isn't
adapted to make for a nice fit.  Insert bad memories of another 
notation

program here.)


You can kill the extender line by setting
'dash-period negative, if that helps.

Now, I suppose the text's position is dependent on the NoteColumn 
grobs to
which the spanner is attached.  Would it be possible to reset the 
attachment
point to another grob? (I could use offsets as in the original 
function, but

that will once again bring in the 'extra-offset issue.)


Not sure I understand.  The spanner start and end
points are defined by the positions of \startTextSpanner
and \stopTextSpanner.  ??

I agree that this would be great feature for LilyPond.  How would 
I go about

making a request?


Well, you could add a snippet to the LSR to
show how you've done it.  This might then
find its way into the documentation if others
like it.  Instructions are on the LSR site:
http://lsr.dsi.unimi.it/, see Contributing.

And you could send a request for an enhancement
to bug-lilyp...@gnu.org, explaining why it would
be useful, and, if you have added a snippet to the
LSR, pointing to it.

Trevor



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


Accordion notation for beginners

2011-09-03 Thread Volker Paul
Much accordion literature I got from my accordion school
is in a format that, for lack of a better name, I call it x/ (x-slash) 
notation. The left-hand staff consists of a single line. The bass is shown by a 
diagonal cross (such as noteheads.s2cross), the chord by a diagonal line (such 
as noteheads.s2slash), bass and chord together by a cross with one double line 
(from bottom left to top right; noteheads.s2cross and noteheads.s2slash could 
be used on top of one another, but don't fit together optically), quint (fifth) 
bass by diagonal cross in a circle (such as noteheads.s2xcircle; for C, quint 
bass is G, for G it's D and so on).

I described this in more detail, with examples, on my homepage:
http://www.v-paul.de/lilypond-acc.html

I wanted to write songs in this notation but I found it difficult in Lilypond.
With some effort I finally managed it. The result is a template that 
I published on my homepage. Now for my questions:

* How widely is this notation used? Is it only for beginners? Which 
notation is used for advanced accordion players? AAA notation?
* So, does it make sense to further develop a template for this notation?
* If so, is this template described here a good start? Are there different, 
better approaches?
   * Is this template worth being included somewhere in the 
Lilypond documentation? 
On my homepage, I will keep it anyway.

Cheers,

Volker



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


Positioning fingering under 1st voice slur

2011-09-03 Thread Javier Ruiz-Alma
\version 2.14.2
%looking for a way to place fingering at top but under the slur
\score{
  \new Staff
   {a''2.^( b''4^)} 
  \\ {s2 b'8^\markup{\finger 3}( g') s4} 
  \layout {}
}
attachment: Finger_Under_Tie.gif___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Positioning fingering under 1st voice slur

2011-09-03 Thread Reinhold Kainhofer
Am Saturday, 3. September 2011, 23:34:11 schrieb Javier Ruiz-Alma:
 \version 2.14.2
 %looking for a way to place fingering at top but under the slur
 \score{
   \new Staff
{a''2.^( b''4^)}
   \\ {s2 b'8^\markup{\finger 3}( g') s4} 
   \layout {}
 }

If you use a real fingering, you can override it's direction to UP. By default 
fingerings are put under slurs, while markups are printed above slurs:

\version 2.14.2
%looking for a way to place fingering at top but under the slur
\score{
  \new Staff
   {a''2.^( b''4^)} 
  \\ {s2 \once\override Fingering #'direction = #UP b'8-3( g') s4} 
  \layout {}
}

Cheers,
Reinhold
-- 
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial  Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

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


Re: Positioning fingering under 1st voice slur

2011-09-03 Thread harm6


Dominicus wrote:
 
 \version 2.14.2
 %looking for a way to place fingering at top but under the slur
 \score{
   \new Staff
    {a''2.^( b''4^)} 
   \\ {s2 b'8^\markup{\finger 3}( g') s4} 
   \layout {}
 }
 
 
 

Or use real fingerings with \set fingeringOrientations.

\version 2.14.2
%looking for a way to place fingering at top but under the slur

\score{
  \new Staff
   
  {a''2.^( b''4^)}
  \\ 
  { \set fingeringOrientations = #'(up) s2 b'-38 ( g') s4} 
  
  \layout {}
}

Cheers,
  Harm

-- 
View this message in context: 
http://old.nabble.com/Positioning-fingering-under-1st-voice-slur-tp32393729p32393833.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.


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


Re: Positioning fingering under 1st voice slur

2011-09-03 Thread Javier Ruiz-Alma
Am Saturday, 3. September 2011, 23:34:11 schrieb Javier Ruiz-Alma:
 \version 2.14.2
 %looking for a way to place fingering at top but under the slur
 \score{
  \new Staff
   {a''2.^( b''4^)}
  \\ {s2 b'8^\markup{\finger 3}( g') s4} 
  \layout {}
 }
 
From: Reinhold Kainhofer
Sent: Saturday, September 3, 2011 2:53 PM

If you use a real fingering, you can override it's direction to UP. By default 
fingerings are put under slurs, while markups are printed above slurs:

\version 2.14.2
%looking for a way to place fingering at top but under the slur
\score{
  \new Staff
   {a''2.^( b''4^)} 
  \\ {s2 \once\override Fingering #'direction = #UP b'8-3( g') s4} 
  \layout {}
}

Cheers,
Reinhold 
--

Thanks Reinhold!

I'll continue to wonder why Lilypond requires explicit override statement to 
reposition fingerings on a second voice:
    \once\override Fingering #'direction = #UP b-3
instead of interpreting the single voice notation b^3 should be explicit 
enough.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user