Re: String Number collision

2017-07-05 Thread Marc Hohl

Hi Harm,

Am 05.07.2017 um 23:21 schrieb Thomas Morley:

Hi Marc,

2017-07-05 8:13 GMT+02:00 Marc Hohl :

Hi list,

I have the following MWE:

[...]

It causes the string number "5" to appear twice, strangely overlapping.
I tried to move the New_fingering_engraver to Staff, but then I got

side-axis not set for grob StringNumber.


Not sure what you expected, I didn't explore the programming error, though.


Well, I hoped that lilypond discardes one of two identical string-number 
events automatically.



I assume that I have to create an engraver similar to the
Merge_rests_engraver that does this job? Or is there another way apart from

\once\hide StringNumber

all the way across the file?




You could do:

#(define (suicide-duplicate-text-grobs grob-lst)
"Walks through the sorted @var{grob-lst}, suiciding grobs with duplicate text"
   (if (null? (cdr grob-lst))
   #f
   (suicide-duplicate-text-grobs
 (if (string=? (ly:grob-property (car grob-lst) 'text)
   (ly:grob-property (cadr grob-lst) 'text))
 (begin
   (ly:grob-suicide! (car grob-lst))
   (cdr grob-lst))
 (cdr grob-lst)

#(define reduce-string-numbers
   (lambda (grob)
"Gets the PaperColumn-grob, filters for StringNumber-grobs, sorts this grobs
with @code{stringlist (ly:grob-object paper-column 'elements
(sorted-strgs
  (sort
strgs
(lambda (p q)
  (string8 ~ e''2. }

down = {  ~ c'2. }

\score {
   <<
   \new Staff
   <<
  \new Voice \with { \deleteDuplicateStrings } { \voiceOne \up }
  \new Voice  { \voiceTwo \down }
   >>
   \new TabStaff
   <<
  \new TabVoice { \voiceOne \up }
  \new TabVoice  { \voiceTwo \down }
   >>
   >>
}


Though, I think an engraver would probably do the job cheaper. (Not tested)


Okay, thanks a lot for your solution! I'll check how it fits in my project.

Regards,

Marc




HTH,
   Harm




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


Re: String Number collision

2017-07-05 Thread Thomas Morley
Hi Marc,

2017-07-05 8:13 GMT+02:00 Marc Hohl :
> Hi list,
>
> I have the following MWE:
[...]
> It causes the string number "5" to appear twice, strangely overlapping.
> I tried to move the New_fingering_engraver to Staff, but then I got
>
> side-axis not set for grob StringNumber.

Not sure what you expected, I didn't explore the programming error, though.

> I assume that I have to create an engraver similar to the
> Merge_rests_engraver that does this job? Or is there another way apart from
>
> \once\hide StringNumber
>
> all the way across the file?



You could do:

#(define (suicide-duplicate-text-grobs grob-lst)
"Walks through the sorted @var{grob-lst}, suiciding grobs with duplicate text"
  (if (null? (cdr grob-lst))
  #f
  (suicide-duplicate-text-grobs
(if (string=? (ly:grob-property (car grob-lst) 'text)
  (ly:grob-property (cadr grob-lst) 'text))
(begin
  (ly:grob-suicide! (car grob-lst))
  (cdr grob-lst))
(cdr grob-lst)

#(define reduce-string-numbers
  (lambda (grob)
"Gets the PaperColumn-grob, filters for StringNumber-grobs, sorts this grobs
with @code{stringlist (ly:grob-object paper-column 'elements
   (sorted-strgs
 (sort
   strgs
   (lambda (p q)
 (string8 ~ e''2. }

down = {  ~ c'2. }

\score {
  <<
  \new Staff
  <<
 \new Voice \with { \deleteDuplicateStrings } { \voiceOne \up }
 \new Voice  { \voiceTwo \down }
  >>
  \new TabStaff
  <<
 \new TabVoice { \voiceOne \up }
 \new TabVoice  { \voiceTwo \down }
  >>
  >>
}


Though, I think an engraver would probably do the job cheaper. (Not tested)

HTH,
  Harm

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


String Number collision

2017-07-04 Thread Marc Hohl

Hi list,

I have the following MWE:

\version "2.19.60"

up = { c'8\5 e'' ~ 2. }

down = { c'4\5 ~ 2. }

%{ uncomment this to trigger error
\layout {
  \context {
\Voice
\remove "New_fingering_engraver"
  }
  \context {
\Staff
\consists "New_fingering_engraver"
  }
}
%}

\score {
  \new Staff <<
 \new Voice { \voiceOne \up }
 \new Voice { \voiceTwo \down }
  >>
}

It causes the string number "5" to appear twice, strangely overlapping.
I tried to move the New_fingering_engraver to Staff, but then I got

side-axis not set for grob StringNumber.
up = { c'8
  \5 e'' ~ 2. }

I assume that I have to create an engraver similar to the 
Merge_rests_engraver that does this job? Or is there another way apart from


\once\hide StringNumber

all the way across the file?

Note: I have to specify the sting in both voices since I use tablature 
too (ommitted in the MWE) and removing the string specification would 
yield in a erroneous tablature.


Best regards,

Marc
\version "2.19.60"

up = { c'8\5 e'' ~ 2. }

down = { c'4\5 ~ 2. }

%{ uncomment this to trigger error
\layout {
  \context {
\Voice
\remove "New_fingering_engraver"
  }
  \context {
\Staff
\consists "New_fingering_engraver"
  }
}
%}

\score {
  \new Staff <<
 \new Voice { \voiceOne \up }
 \new Voice { \voiceTwo \down }
  >>
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: String number collision

2010-02-03 Thread Graham Percival
On Wed, Feb 03, 2010 at 07:42:18PM -0600, Bobber wrote:
> David Stocker wrote:
>>
>> Your example works as is in 2.13.11, with the string number  
>> indications appearing above the beams of the notes.
> I'm using the 2.12 stable branch.  Is 2.13.11 mostly usable?

2.13.12 (not yet released) has 17 critical issues, fixing 4 of the
21 critical issues in 2.13.11.  It is not recommended for normal
users.

Cheers,
- Graham


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


Re: String number collision

2010-02-03 Thread Bobber

David Stocker wrote:

Greetings.

Your example works as is in 2.13.11, with the string number 
indications appearing above the beams of the notes.

I'm using the 2.12 stable branch.  Is 2.13.11 mostly usable?

--
Bob Wooldridge
Blog: http://kc0dxf.net/blog/



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


Re: String number collision

2010-02-02 Thread David Stocker

Greetings.

Your example works as is in 2.13.11, with the string number indications 
appearing above the beams of the notes.


At any rate, try adding \override StringNumber #'add-stem-support = ##t

% measure  20:
 <<
{ \override StringNumber #'add-stem-support = ##t
   r8 8 8 c'8 e'4 }  \\
{ c2. }
 >>

Hope that helps,

David

Bobber wrote:
I'm engraving some guitar music.  It's polyphonic on one staff.  In 
one measure I am indicating string numbers.  The numbers are colliding 
with the upper voice.  Here's the measure where it's happening:

% measure  20:
  <<
 { r8 8 8 c'8 e'4 }  \\
 { c2. }
  >>
The eight notes here have the stems pointing upwards.  The numbers 
appear to be placed right above the note heads and are colliding with 
the stems.


I'm kind of new to Lilypond so I was wondering if someone could give 
me some pointers and help me resolve this.


Thanks!




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


String number collision

2010-02-02 Thread Bobber
I'm engraving some guitar music.  It's polyphonic on one staff.  In one 
measure I am indicating string numbers.  The numbers are colliding with 
the upper voice.  Here's the measure where it's happening:

% measure  20:
  <<
 { r8 8 8 c'8 e'4 }  \\
 { c2. }
  >>
The eight notes here have the stems pointing upwards.  The numbers 
appear to be placed right above the note heads and are colliding with 
the stems.


I'm kind of new to Lilypond so I was wondering if someone could give me 
some pointers and help me resolve this.


Thanks!

--
Bob Wooldridge
Blog: http://kc0dxf.net/blog/



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