Re: Help with Scheme engraver please

2016-09-19 Thread Trevor Daniels

Trevor Daniels wrote Saturday, September 17, 2016 9:57 PM

> Thomas Morley wrote Friday, September 09, 2016 11:31 PM
> 
>> 2016-09-08 0:07 GMT+02:00 Trevor Daniels :
>>>
>>>  But I don't understand why you
>>> used a rather complicated procedure to obtain durations.  Could you
>>> not simply extract the durations from note events?
>> 
>> In my opinion the historic lute tablatures were written disregarding
>> any polyphony as far as rhythmy are concerned, yes.
>> But this polyphony was always _meant_ and the player should respect it.
>>
>> For our coding this means an example like
>> 
>> upper = { d'2 d' }
>> middle = { \override Rest.staff-position = #-1.5 r8 f r8 f r8 f r8 f }
>> lower = { a,4\rest d a,4\rest d }
>> 
>> \score {
>>  <<
>>   \new Staff << \clef "G_8" \upper \\ \lower \\ \middle >>
>> 
>>   \new TabStaff
>>   << \clef "G_8" \upper \\ \lower \\ \middle >>
>>  >>
>>  \layout {
>>\context {
>>\TabStaff
>>  stringTunings = \stringTuning 
>>}
>>  }
>> }
>> 
>> should return proper polyphonic in Staff, and in TabStaff only a
>> single 8th indication for the overall rhythm should be printed.
>> This can be achieved with my proposal and would warrant the principle
>> of one source-code for Staff _and_ TabStaff.
>> I didn't found a method to do so with simple durations.
> 
> OK, I see now why you need to extract the interval between a note and the
> subsequent note even when they are split between several voices.  
> This interval then should be displayed as the "duration" of the first of the 
> pair
> (unless it is unchanged from the previous one, of course)
> 
> I agree this can't be done by looking solely at the duration of individual
> notes.
> 
> However, your code doesn't quite work in all situations.  If you replace the
> first f in the middle voice with a rest we should have a duration of 4 
> followed
> by one of 8, but the 8 is missing.
> 
>> You seems to be of different opinion, for some cases you let
>> explicitely print the warning:
>> "Polyphony is not supported in lute tab"
> 
> Well, I meant it wasn't supported in my simple implementation, not
> that it shouldn't be.
> 
> I need now to study your approach to polyphony in greater detail to understand
> the logic.

Having thought about polyphony in tab a little more I realise now there is a 
fundamental difficulty: it is quite possible to have an interval in time 
between two adjacent notes that cannot be represented as a single duration.  In 
staff representation ties would be used to do this, but I don't think ties were 
used in baroque tab, were they?  Even if they were, implementing them at this 
early stage would be a step too far, at least for me.  So I plan to sidestep 
polyphony at present and concentrate on implementing lute tab from a single 
voice.  There's plenty to do yet to achieve that in a form suitable for a LP 
patch.

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


BUG: Lilypond forgets to draw barline spanner after \bar ""

2016-09-19 Thread Knut Petersen

Hi everybody!

As far as I understand after \bar "" a \break is permitted in the middle of a 
bar.
Lilypond is supposed to engrave the next barline at the proper place.

At the marked places ( FIXME/ BUG) in the attached score lilypond needs to be
forced to print a barline ... I think this is a bug, although it's also 
possible that I
missed something in the docs.

cu,
 Knut

P.S. The score  is WIP, a lot of tuning (beams, ties, slurs, etc) is missing
\version "2.19.49" % git 22a856e734d8dd3e2112ba954c4aab2ab7fc3556

\include "deutsch.ly"

ob = { \break }
opb = { \pageBreak }
br = { \breathe }

global = { 
  \key c \major
  \autoBeamOff
}

sopmus = {
  \global
  \relative c'' {
\time 2/4 \tempo \markup { "Gemächliche " \fontsize #-2 \note #"4" #UP } c4 8 8 8 8 d4 \time 3/4 c4. 8 \br 4 \time 2/4 f2 2 c2 2 \ob
f2 2 c4 \br 4 f2 2 c2 2 f2 \opb
f2 c4 \br d \time 3/4 b2 4 a2 d4 \time 2/4 b4. ( a8 g f g4 ~ 8 f \bar "" \ob
d4 es2 ) d \tempo \markup { "Etwas zurückhaltender, frei"} r8 d'8 4 4 c8 (d a g4) 8  f4 a g \br 
  \once \override Score.MetronomeMark.self-alignment-X = #CENTER \tempo \markup { \center-column {\line { "Im" } \line { "Zeitmaß"}}} d'\opb
d4 4 \time 3/4 es2 f4 d2 c4 \time 2/4 d4 \br 4 ~ 8 8 4 f2 ( 4 ) 4 ~ \ob
4 e f \br a,4 ~ 8 8 4 b4. ( a8 g4 ) f g2 2 R2 \undo \hide Score.BarLine \bar "|."
  }
}

sopfoo = {
  \override Staff.StaffSymbol.line-count = #0
  \time 2/4 \repeat unfold 2 {s2}  \time 3/4 \repeat unfold 1 {s2.} \time 2/4 \repeat unfold 14 {s2} \time 3/4 \repeat unfold 2 {s2.}
  \time 2/4 s2 s2 s4 \bar "" s4 \repeat unfold 8 {s2} \time 3/4 \repeat unfold 2 {s2.} \time 2/4 \repeat unfold 12 {s2} \bar "|."
}

mezmus = {
  \global
  \relative a' {
\time 2/4 a4 8 8 8 8 f4 \time 3/4 a4. 8 \br 4 \time 2/4 c2 2 a?2 2
\time 3/4 c8 (d c4) b a? \br a2 \time 2/4 c2 2 a?2 2 \time 3/4 c8 (d c4) \bar ""
% FIXME mensuration line requires \bar "|". Why? BUG?
%  |
%  
b  \bar "|" a?4 \br 2 \time 2/4 d g, c f, \time 3/4 b4. ( c8 b4
a4. g8 f4 ) \time 2/4 g2 ~ 2 ~ 2 ~ 2 R2 r4 a4
4 4 \time 3/4 b2 c4 a2 g4 \time 2/4 a4 \br 4 ~ 8 8 4 b4. ( a8 g4) f
g2 f4 \br 4 ~ 8 8 4 \time 3/4 d2 b4 c2. \time 2/4 f2 R2
\undo \hide Score.BarLine \bar "|."
  }
}
mezfoo = {
  \override Staff.StaffSymbol.line-count = #0
  \time 2/4 \repeat unfold 2 {s2} \time 3/4 \repeat unfold 1 {s2.} \time 2/4 \repeat unfold 4 {s2} \time 3/4 \repeat unfold 2 {s2.}
  % FIXME mensuration line requires \bar "|". Why? BUG?
  % |
  % 
  \time 2/4 \repeat unfold 4 {s2} s2 \bar "" s4 \bar "|" s2. \time 2/4 \repeat unfold 4 {s2} \time 3/4 \repeat unfold 2 {s2.}
  \time 2/4 \repeat unfold 7 {s2} \time 3/4 \repeat unfold 2 {s2.} \time 2/4 \repeat unfold 7 {s2} \time 3/4 \repeat unfold 2 {s2.}
  \time 2/4 \repeat unfold 2 {s2} \bar "|."
}

altmus = {
  \global
  \relative f' {
\time 2/4 f4 8 8 8 8 b4 \time 3/4 f4. 8 \br 4 \time 2/4 as2 2 f2 2
\time 3/4 as8 (b as4) ges f4 \br 2 \time 2/4 as2 2 f2 2 \time3/4 as8 ( b as4) \bar ""
% FIXME mensuration line requires \bar "|". Why? BUG?
% |
% 
ges4 \bar "|" f4 \br 2 \time 2/4 d? es c d \time 3/4 b4. ( a?8 g?4
b a2 ) \time 2/4 g2 ~ 2 ~ 2 ~ 2 R2 r4 g'4
4 4 \time 3/4 fis2 g4 fis2 e4 \time 2/4 d \br f4 ~ 8 8 4 \time 3/4 d2 b4 << { c2.} { s4 \bar "" \break s2 } >>
\time 2/4 f4 \br d4 ~ 8 8 4 f2 ( 4 ) 4 ~ 4 e f2 R2
\undo \hide Score.BarLine \bar "|."

  }
}

altfoo = {
  \override Staff.StaffSymbol.line-count = #0
  \time 2/4 \repeat unfold 2 {s2} \time 3/4 \repeat unfold 1 {s2.} \time 2/4 \repeat unfold 4 {s2} \time 3/4 \repeat unfold 2 {s2.}
  % FIXME mensuration line requires \bar "|". Why? BUG?
  % |
  % 
  \time 2/4 \repeat unfold 4 {s2} s2 \bar "" s4 \bar "|" s2. \time 2/4 \repeat unfold 4 {s2} \time 3/4 \repeat unfold 2 {s2.}
  \time 2/4 \repeat unfold 7 {s2} \time 3/4 \repeat unfold 2 {s2.} \time 2/4 \repeat unfold 2 {s2} \time 3/4 s2. s4 \bar "" s2
  \time 2/4 \repeat unfold 6 {s2}
}

ime = { \set ignoreMelismata = ##t }
ome = { \set ignoreMelismata = ##f }
le = { \once \override LyricText.self-alignment-X = #LEFT }
ce = { \once \override LyricText.self-alignment-X = #CENTER }

soplyrA = \lyricmode {
  Wasch dich, mein Schwe -- ster -- chen, wasch dich;
  zu Ro -- bins Hoch -- zeit gehn wir heut;
  er hat die stol -- ze Ruth ge -- freit.
  Wir kom -- men un -- ge -- be -- ten;
  wir schmau -- sen nicht, __ wir tan -- zen nicht,
  und nicht mit la -- chen -- dem Ge -- sicht
  komm' __ ich vor ihn __ zu __ tre -- ten,
  komm' __ ich vor ihn __ zu tre -- ten!
}
mezlyrA = \lyricmode {
  Wasch dich, mein Schwe -- ster -- chen, wasch dich;
  zu Ro -- bins Hoch -- zeit gehn __ wir heut;
  er hat die stol -- ze Ruth __ ge -- freit.
  Wir kom -- men un -- ge -- be -- ten; __ 
  

Re: BUG: Lilypond forgets to draw barline spanner after \bar ""

2016-09-19 Thread Simon Albrecht

On 19.09.2016 14:17, Knut Petersen wrote:

Hi everybody!

As far as I understand after \bar "" a \break is permitted in the 
middle of a bar.

Lilypond is supposed to engrave the next barline at the proper place.

At the marked places ( FIXME/ BUG) in the attached score lilypond 
needs to be
forced to print a barline ... I think this is a bug, although it's 
also possible that I

missed something in the docs.


Sorry, Knut, but this is a totally inacceptable report. It’s not clear 
what you want, and you come up with an example of 300+ lines of code. 
(Re)read . For bug reports, 
minimal examples are strictly required.
Also, we have a dedicated bug list . Please 
repost there.


Best, Simon

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


Re: BUG: Lilypond forgets to draw barline spanner after \bar ""

2016-09-19 Thread Wols Lists
On 19/09/16 13:29, Simon Albrecht wrote:
> On 19.09.2016 14:17, Knut Petersen wrote:
>> Hi everybody!
>>
>> As far as I understand after \bar "" a \break is permitted in the
>> middle of a bar.
>> Lilypond is supposed to engrave the next barline at the proper place.
>>
>> At the marked places ( FIXME/ BUG) in the attached score lilypond
>> needs to be
>> forced to print a barline ... I think this is a bug, although it's
>> also possible that I
>> missed something in the docs.
> 
> Sorry, Knut, but this is a totally inacceptable report. It’s not clear
> what you want,

Sorry Simon, but I think it is *extremely* clear what his problem is.
Let me give you a minimal example ...

c2 \bar "" \break c2 c4

That should be two bars with a barline in the middle. And Knut is not
getting that middle barline. THAT is what is wrong with the output.

 and you come up with an example of 300+ lines of code.
> (Re)read . For bug reports,
> minimal examples are strictly required.
> Also, we have a dedicated bug list . Please
> repost there.

I'm not a betting man, but it would not surprise me in the slightest if
my minimal example works correctly. That's down to Knut to test :-)

But Knut said it was WIP, and I've had plenty of trouble where fixing an
(apparently) unrelated problem has fixed weirdos.

So, Knut, check whether my minimal example works, fix the warnings in
your WIP, and see if the problem goes away. It's my guess it's actually
something else interfering.
> 
> Best, Simon
> 
Cheers,
Wol


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


Re: BUG: Lilypond forgets to draw barline spanner after \bar ""

2016-09-19 Thread Benkő Pál
> c2 \bar "" \break c2 c4
>
> That should be two bars with a barline in the middle.

I think not; \bar "" starts a new bar (after issuing a warning for the
incomplete bar).

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


Re: BUG: Lilypond forgets to draw barline spanner after \bar ""

2016-09-19 Thread Wols Lists
On 19/09/16 16:39, Benkő Pál wrote:
>> c2 \bar "" \break c2 c4
>>
>> That should be two bars with a barline in the middle.
> 
> I think not; \bar "" starts a new bar (after issuing a warning for the
> incomplete bar).
> 
Ummm ... but if that's the case, that's his problem.

HOWEVER. Has lily's behaviour changed? It's always (iirc) been the case
that if you want to break a line of music in the middle of a bar, you
have to put a blank barline in. You can (or could) only break on a
barline. I don't remember it ever being documented that it actually
starts a new bar!

If you want the behaviour you describe it's easy - just put a space rest
in. If you want the behaviour I describe, how are you supposed to get
it? (I suppose you could again put a spacer rest in :-)

But as I remember it, \bar doesn't actually mess about with the timing,
precisely because a lot of music doesn't have timings and still wants
(random :-) barlines.

Cheers,
Wol

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


Re: BUG: Lilypond forgets to draw barline spanner after \bar ""

2016-09-19 Thread Mark Knoop
At 17:39 on 19 Sep 2016, Benkő Pál wrote:
>> c2 \bar "" \break c2 c4
>>
>> That should be two bars with a barline in the middle.  
>
>I think not; \bar "" starts a new bar (after issuing a warning for the
>incomplete bar).

Is it really so hard to test something before sending an email
asserting things with great confidence? Or RTFM?

-- 
Mark Knoop

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


Re: BUG: Lilypond forgets to draw barline spanner after \bar ""

2016-09-19 Thread David Kastrup
Benkő Pál  writes:

>> c2 \bar "" \break c2 c4
>>
>> That should be two bars with a barline in the middle.
>
> I think not; \bar "" starts a new bar (after issuing a warning for the
> incomplete bar).

Seriously, does anybody these days bother testing stuff before making
statements?  First this minimal example is missing braces around it.
And second, \bar "" does not start a new bar and does not issue a
warning.

-- 
David Kastrup

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


Re: [LilyIssues-auto] [testlilyissues:issues] #4975 [Windows] Grace notes cause staff to protrude into the margin

2016-09-19 Thread David Kastrup
Auto mailings of changes to Lily Issues

writes:

> Later versions throw an assertion pointing to simple-spanner.cc.  This
> file was edited in commit
>
> http://git.savannah.gnu.org/cgit/lilypond.git/commit/lily/simple-spacer.cc?id=e0af94bb8939bc6f4998db6294010baa77139092
>
> which looks far more likely to the culprit.  Can anyone who
> understands this stuff (paging David really) make a comment?

The given diff is most definitely harmless.  "Newly" failed assertions
are much more likely to be the consequence of commit

commit a4cc910a3401d25bb94ff0ecb4dc18f681c71004
Author: David Kastrup 
Date:   Tue May 12 19:01:57 2015 +0200

Issue 2787: Sanitize usage of -DDEBUG, -DNDEBUG and assert

The compiler option -DNDEBUG is no longer being used: -DNDEBUG disables
the assert function, and assert is essentially stating that the program
cannot useful continue if the assertion is not met.  -DNDEBUG is
basically an option for compiling an application to a limited amount of
ROM when aborting with a diagnostic is not preferable to crashing.

This is not the case for LilyPond.  So expensive debugging options now
are enabled with -DDEBUG instead.  There is a new configure option
--enable-checking defaulting to "off" for this now.

At the current point of time, setting --disable-optimising also has the
effect of enabling the checks: this will be retained until Patchy has
been adapted to using --enable-checking.

from version 2.19.21.  However, there also is

commit d757a1b2b65c5f880af67702f1eaf5fda681724e
Author: Keith OHara 
Date:   Fri Jun 19 21:48:13 2015 -0700

simple-spacer: inappropriate assert; issue 4448

from version 2.19.22, presumably trying to fix the assert that has now
become obvious.

-- 
David Kastrup


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


Re: BUG: Lilypond forgets to draw barline spanner after \bar ""

2016-09-19 Thread Benkő Pál
sorry for the noise.

2016. szept. 19. 18:46 ezt írta ("David Kastrup" ):

> Benkő Pál  writes:
>
> >> c2 \bar "" \break c2 c4
> >>
> >> That should be two bars with a barline in the middle.
> >
> > I think not; \bar "" starts a new bar (after issuing a warning for the
> > incomplete bar).
>
> Seriously, does anybody these days bother testing stuff before making
> statements?  First this minimal example is missing braces around it.
> And second, \bar "" does not start a new bar and does not issue a
> warning.
>
> --
> David Kastrup
>
___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: BUG: Lilypond forgets to draw barline spanner after \bar ""

2016-09-19 Thread Thomas Morley
2016-09-19 14:17 GMT+02:00 Knut Petersen :
> Hi everybody!
>
> As far as I understand after \bar "" a \break is permitted in the middle of
> a bar.
> Lilypond is supposed to engrave the next barline at the proper place.
>
> At the marked places ( FIXME/ BUG) in the attached score lilypond needs to
> be
> forced to print a barline ... I think this is a bug, although it's also
> possible that I
> missed something in the docs.
>
> cu,
>  Knut


Hi Knut,

as others said already, a minimal would have been nice.
I've difficulties to understand what you're after. Moving
"Default_bar_line_engraver" obfuscates it even more...

_But_ if I understand correctly, then:
you miss the SpanBar while using \bar "".
This is no bug, but intended behaviour.
In bar-line.scm you'll find
(define-bar-line "" "" "" #f)
The last value there, #f, means; print _no_ SpanBar.

You could try to use
#(define-bar-line "-bis" "-bis" "" "|")
instead.

Cheers,
  Harm

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