Re: Incipits - not alignment, but help with bug fixes

2014-08-22 Thread David Kastrup
Phil Holmes m...@philholmes.net writes:

 There are currently two problems (alignment discussion notwithstanding and 
 which I'm not ignoring, but would prefer to park temporarily) with my 
 proposed incipit code.  1) If indent is not set explicitly in the \layout 
 block, it throws an error; 2) If instrumentName is not set explicitly in 
 the score containing the incipit, no incipit is output.

 For 1), the optimum answer would apppear to be to check whether indent has 
 been set, and if it hasn't, set it to the value of indent-default which is 
 set in paper-defaults-init.ly as indent-default = 15\mm.  However, 
 trying to access that variable fails: test = \indent-default results 
 in error: unknown escaped string: `\indent-default'.  Does anyone know 
 why this is and whether there's an alternative way to access that variable 
 value?

 If it's not possible to get the value, we could set a variable to what we 
 know its value to be, and then use that.  The following code works:

 indent-incipit-default = 15\mm
 line-width = #(primitive-eval
   '(or (false-if-exception (* 1.0 indent))
   (* 1.0 indent-incipit-default)))

 But all those (* 1.0 variable) lines aren't pretty, but I don't know 
 better syntax.  Would appreciate help here.

Just indent and indent-incipit-default (strip the parens off) should
work actually.

 For 2), the only solution I know is that we would have to add 'Note that 
 instrumentName must be set in the music for the incipit to be produced.  
 If no instrument name is required then use \set Staff.instrumentName = 
 #' in the documentation.  Is there a better solution?

This is so much a royal pain to get stuff passed properly.  How do we
fare when things like choir brackets get involved?  If that would result
in unacceptable output, it would be a good excuse to rework
Instrument_name_engraver or whatever else is needed on the C++ level to
get a saner hook of incipits into the code.

-- 
David Kastrup

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


Re: Line spacing ( was Re: Incipits )

2014-07-04 Thread Phil Holmes
- Original Message - 
From: David Kastrup d...@gnu.org

To: Phil Holmes m...@philholmes.net
Cc: lilypond-devel@gnu.org
Sent: Thursday, July 03, 2014 7:08 PM
Subject: Re: Line spacing ( was Re: Incipits )



Phil Holmes m...@philholmes.net writes:


David,

Thanks for the info: I'm working on understanding it.  It threw up
another oddity: if markup slightly exceeds the end of the line, the
note spacing goes haywire.

Example (one extra a in the upper score):

\score {
 \relative c'' { d1 ^ d d d
\repeat unfold 20 { d } }
 \layout {
   ragged-right = ##f
   indent = 0.0
   line-width = 100.0\mm
 }
}

\score {
 \relative c'' { d1 ^aaa d d d
\repeat unfold 20 { d } }
 \layout {
   ragged-right = ##f
   indent = 0.0
   line-width = 100.0\mm
 }
}


Included image does not correspond with example.

--
David Kastrup



I resent it with the correct image, but it does not appear to have arrived. 
Here it is again.


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


Re: Line spacing ( was Re: Incipits )

2014-07-04 Thread David Kastrup
Phil Holmes m...@philholmes.net writes:

 I resent it with the correct image, but it does not appear to have
 arrived. Here it is again.

Oh, it did, but we sent our mails more or less simultaneously.  Won't be
able to react before next week since my father is turning 80 today.

-- 
David Kastrup

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


Re: Incipits

2014-07-04 Thread Phil Holmes
- Original Message - 
From: David Kastrup d...@gnu.org

To: Phil Holmes m...@philholmes.net
Cc: lilypond-devel@gnu.org
Sent: Thursday, July 03, 2014 3:57 PM
Subject: Re: Incipits



I don't really have an idea where the scale of ly:grob-layout is
actually coming from, but it would appear like the compensation for
issue 677 will not work for both the standard \layout and the grob
layout, the latter apparently already being scaled ?

At any rate, if calculations with sizes are done, it would seem
imperative to be talking about the same cm, so possibly the scaling in
issue 677 does not happen at the right place.

--
David Kastrup



I checked how far out the scaling of the markup score was prior to 677: by 
ruler I measured it as being a factor of 1.76.  The command-line output 
shows \cm as being 10 for the normal layout, and 5.69 for the \layout with 
$(ly:grob-layout grob).  The ratio between these is 1.757.  So it seems 
clear that the problem is related to 677, although I clearly have no idea 
what's going on.


I can post this as a bug, but I'm guessing it would be tricky to fix.  Would 
you object to scaling the dimensions of the incipit (in the incipit code) 
line-width and indent by the 1.76 factor, to work round the problem?


--
Phil Holmes 



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


Re: Incipits

2014-07-03 Thread David Kastrup
Phil Holmes m...@philholmes.net writes:

 As I said earlier, I'm working on the incipit snippet to make it fit
 as a Lilypond command.  I've spent a lng time trying to work out
 how the spacing of the incipit (its length and placing) is related to
 the indent of the main music.  In summary, it doesn't work.  In the
 code attached, you can see 2 versions of the incipit code, both with
 fixed incipit length (8 cm) and left indent (2 cm).  One uses \layout
 { $(ly:grob-layout grob) and the other a simple \layout.  The attached
 image shows that the incipit size on the first version is wrong; on
 the second it's right.

 Does anyone know what's happening here?

Here is the explanation:

\pointAndClickOff

incipitA =
#(define-music-function (parser location incipit-music) (ly:music?)
  #{
\once \override Staff.InstrumentName.self-alignment-Y = ##f
\once \override Staff.InstrumentName.self-alignment-X = #RIGHT
\once \override Staff.InstrumentName.stencil =
  #(lambda (grob)
(let* ((instrument-name (ly:grob-property grob 'long-text)))
(set! (ly:grob-property grob 'long-text)
  #{ \markup {
\score
{
  \new Staff
  {
\once \override Staff.InstrumentName.self-alignment-X = #LEFT
\set Staff.instrumentName = #instrument-name
$incipit-music
  }
  \layout { $(ly:grob-layout grob)
	#(format #t grob::cm: ~a\n (module-ref (current-module) 'cm))
line-width = 8\cm
indent = 2\cm
ragged-right = ##f
ragged-last = ##f
\context {
  \Score
  \remove Default_bar_line_engraver
}
  }
}
}
  #})
  (system-start-text::print grob)))
  #}
)

incipitB =
#(define-music-function (parser location incipit-music) (ly:music?)
  #{
\once \override Staff.InstrumentName.self-alignment-Y = ##f
\once \override Staff.InstrumentName.self-alignment-X = #RIGHT
\once \override Staff.InstrumentName.stencil =
  #(lambda (grob)
(let* ((instrument-name (ly:grob-property grob 'long-text)))
(set! (ly:grob-property grob 'long-text)
  #{ \markup {
\score
{
  \new Staff
  {
\once \override Staff.InstrumentName.self-alignment-X = #LEFT
\set Staff.instrumentName = #instrument-name
$incipit-music
  }
  \layout {
	#(format #t layout::cm: ~a\n (module-ref (current-module) 'cm))
line-width = 8\cm
indent = 2\cm
ragged-right = ##f
ragged-last = ##f
\context {
  \Score
  \remove Default_bar_line_engraver
}
  }
}
}
  #})
  (system-start-text::print grob)))
  #}
)

\score {
  {
\set Staff.instrumentName = #Altus
\incipitA { f''1 }
\repeat unfold 10 c''1 \break
\repeat unfold 10 c''1
  }
  \layout { indent = 8\cm }
}

\score {
  {
\set Staff.instrumentName = #Altus
\incipitB { f''1 }
\repeat unfold 10 c''1 \break
\repeat unfold 10 c''1
  }
  \layout { indent = 8\cm }
}

This would supposedly be related to

commit ae49e0dd10feea60fb5bd76cfb6406b7a0cf3e95
Author: David Kastrup d...@gnu.org
Date:   Tue Mar 19 09:37:23 2013 +0100

Issue 3261: regtest 'incipit.ly' compressed

After dimensions in \score markup have been fixed in issue 677,
several example of incipits in the LilyPond codebase were
overcompensating for the previous bug.  This fixes them.

and

commit 84cf69f7c840700a83ca6a9ae9e6b6f2e9f9f1f9
Author: David Kastrup d...@gnu.org
Date:   Mon Dec 31 18:15:41 2012 +0100

Issue 677: \score markup confuses paper settings

I actually have no idea whether this is the right fix, but it seems to
do something related to the TODO comments and the issue report.


I don't really have an idea where the scale of ly:grob-layout is
actually coming from, but it would appear like the compensation for
issue 677 will not work for both the standard \layout and the grob
layout, the latter apparently already being scaled ?

At any rate, if calculations with sizes are done, it would seem
imperative to be talking about the same cm, so possibly the scaling in
issue 677 does not happen at the right place.

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


Line spacing ( was Re: Incipits )

2014-07-03 Thread Phil Holmes

David,

Thanks for the info: I'm working on understanding it.  It threw up another 
oddity: if markup slightly exceeds the end of the line, the note spacing 
goes haywire.


Example (one extra a in the upper score):

\score {
 \relative c'' { d1 ^ d d d 
\repeat unfold 20 { d } }

 \layout {
   ragged-right = ##f
   indent = 0.0
   line-width = 100.0\mm
 }
}

\score {
 \relative c'' { d1 ^aaa d d d 
\repeat unfold 20 { d } }

 \layout {
   ragged-right = ##f
   indent = 0.0
   line-width = 100.0\mm
 }
}

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


Re: Line spacing ( was Re: Incipits )

2014-07-03 Thread Phil Holmes
- Original Message - 
From: Phil Holmes m...@philholmes.net

To: David Kastrup d...@gnu.org
Cc: lilypond-devel@gnu.org
Sent: Thursday, July 03, 2014 4:54 PM
Subject: Line spacing ( was Re: Incipits )



David,

Thanks for the info: I'm working on understanding it.  It threw up another
oddity: if markup slightly exceeds the end of the line, the note spacing
goes haywire.

Example (one extra a in the upper score):

\score {
 \relative c'' { d1 ^ d d d
\repeat unfold 20 { d } }
 \layout {
   ragged-right = ##f
   indent = 0.0
   line-width = 100.0\mm
 }
}

\score {
 \relative c'' { d1 ^aaa d d d
\repeat unfold 20 { d } }
 \layout {
   ragged-right = ##f
   indent = 0.0
   line-width = 100.0\mm
 }
}



Now with the correct image.

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


Re: Line spacing ( was Re: Incipits )

2014-07-03 Thread David Kastrup
Phil Holmes m...@philholmes.net writes:

 David,

 Thanks for the info: I'm working on understanding it.  It threw up
 another oddity: if markup slightly exceeds the end of the line, the
 note spacing goes haywire.

 Example (one extra a in the upper score):

 \score {
  \relative c'' { d1 ^ d d d
 \repeat unfold 20 { d } }
  \layout {
ragged-right = ##f
indent = 0.0
line-width = 100.0\mm
  }
 }

 \score {
  \relative c'' { d1 ^aaa d d d
 \repeat unfold 20 { d } }
  \layout {
ragged-right = ##f
indent = 0.0
line-width = 100.0\mm
  }
 }

Included image does not correspond with example.

-- 
David Kastrup

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


Re: Incipits

2008-02-11 Thread Karl Hammar
Till:
 Juergen Reuter schrieb:
  as far as I understand, all problems with incipits boil down to the 
  following two major issues:
 
(1) horizontal spacing, and

I did not focus on that, it is an ancient notation issue, it is not
specific to incipits.

(2) the system start delimiter.
 
  Karl's solution unfortunately leaves horizontal space between the 
  incipit and the actual score; hence it does *not* solve issue (2).  
  Rather, the score lines should not stop inbetween.

If you don't like the space, then remove the \stopStaff \startStaff 
thing. But then, whats wrong with the \bar || variant as Till suggests
below. (cont. below)

 Well, I am not so sure about that. I agree, the space is a bit too big 
 here, but I personally like Nocolas' solution where the space mainly 
 covers the distance between the choirstaff brace and the beginning of 
 the staff. I know that much incipits are engraved with the double line 
 method that is now used in the templates, but it feels logical to me 
 that the real staff with the brace start only after the incipit. I 
 somehow recall this would be also hand engraved convention, but I 
 might be wrong. There is an example pdf on the list sent by Stefan 
 Slapeta that shows a broad range of incipits which show mainly the staff 
 lines going through all the way. So it might be my personal opinion only 
 that it would be nice to have the incipit seperated by a little white space.

Getting less space is simple, us less space between \stop-\startStaff.
See attached pdf.

$ diff -u  c.ly.old c.ly
--- c.ly.old2008-02-11 19:41:54.923054408 +0100
+++ c.ly2008-02-11 19:42:34.417301808 +0100
@@ -34,8 +34,8 @@
   \stopStaff
   \once \override Score.TimeSignature #'print-function = ##f
   \nor
-  \time 3/8
-  s4.
+  \time 1/16
+  s16
   \revert Score.SpanBar #'print-function
   \revert Score.BarLine #'print-function
   \startStaff
@@ -74,7 +74,7 @@
 \score {
   \new ChoirStaff \with {
 % a pain to set? Thats Right!!!
-\override SystemStartBracket #'extra-offset = #'( 38.8 . 0 )
+\override SystemStartBracket #'extra-offset = #'( 30.2 . 0 )
   } {
 
   \new Staff {

 
 Till
 
  IMHO, all other features have been quite well demonstrated in template 
  A.5.1 for a while now.  Hence, you probably should concentrate on 
  solving these two remaining issues.
 
  Regarding issue (2), maybe the right solution is to extend the 
  system start delimiter implementation in such a way, that
 
(a) automatic printing at the system start may be suppressed for a
specific range of the score with kind of
\turnSystemStartDelimiterOff and \turnSystemStartDelimiterOn
commands, and
 
(b) a kind of \bar #'system-start-delimiter command prints an
additional system start delimiter whereever you want.  (But if this
bar should happen to appear at the system start, the delimiter
should not be printed twice.)

That would be nice, but you can use the workaround with the 
extra-offset as shown above.

  Regarding issue (1), I am not sure what the right solution is.  
  Please note that the note durations in the incipit are typically much 
  larger than in the actually score.  Karl and Nicolas, did you check 
  what happens with the horizontal spacing in your incipit solutions, if 
  you double or quadruple the note durations in the incipit (and only 
  there)?  In your examples, in the incipts you are unfortunately using 
  the same durations as in the actual score.  I may be wrong, but I 
  suspect that your solutions do *not* solve issue (1).

No I did not try. Try this (\men \nor as in previous mail)

 cold = { \clef petrucci-c4 }
 cnew = { \clef treble_8 }

 \new Voice \relative c {
   \men\cold d\breve*1/8 e\longa*1/16 f\maxima*1/32 g\breve*1/8
   \nor\cnew | d4 e2 f4~ | f2. g4 |
 }

I tried with 

 B = #(ly:make-duration -1 0 1 8)
...
 d\B e\L f\M

but it didn't work.

Maybe someone have know how to write a function \foo:
 breve - breve*1/8
 ...

I tried with

% as a first test
#(define-public (nop music)
  (if (ly:duration? music)
   (let music (ly:make-duration -1 0 1 8

foo = #(define-music-function (parser location music)
(ly:music?)
(let ((new-music (ly:music-deep-copy music)))
 (music-map nop new-music)
 new-music))

but it didn't work. 

%%%

You can use the lsr snippet 305 to scale down the note values (and a 
modern lilypond version). There is the problem with/without ligatures
with solutions like A.5.1 and the one I provided. And it would 
probably be som problems with incipits in vaticana style.

%%%

What would be nice is to be able to glue to \scores together, without a 
newline. Then one could have independent engraving on the historical 
and the modern part, or to have multiple parts stacked together,
continuing on the same line.

%%%

Also it would be nice to have an
 #(set-accidental-style 'renaissance)
which would be like 'forget, except it remebers the 

Re: Incipits

2008-02-11 Thread Nicolas Sceaux

Le 11 févr. 08 à 02:07, Han-Wen Nienhuys a écrit :


[...]



- If I'm reading this correctly, this is all a grand hack to add a
little staff to an instrument name.   I don't see the essential
difference between this and

 \set instrumentName = \markup { \score { .. } the-real-name }

except that this is longer, more error prone and less flexible. Again,
what problem are you trying to solve?


The problem I was trying to solve is to separate the definition
of the instrument name, from the one of the incipit. They are not
the same thing, and should be entered separetely. It's well enough
to explicitely write
  \set instrumentName = \markup { \score { .. } the-real-name }
when you have a single piece to typeset. It really sucks when you
have hundreds. (I have more than 600 pieces that would use this
incipit thing.)

...

Actually, if there were ly:score-add-output-def! (or an optional
output-def argument to ly:make-score) and ly:output-def-set-variable!
functions, all could be done entirely from the outside.

Example:

\score {
  \new Staff {
  %% All this would be shortcuted by an appropriate music function:
  \override Staff.InstrumentName #'music = ##{ \clef petrucci- 
c1 c'4 d' e' f' #}

  \override Staff.InstrumentName #'self-alignment-X = #RIGHT
  \override Staff.InstrumentName #'self-alignment-Y = #UP
  \override Staff.InstrumentName #'Y-offset = #4
  \override Staff.InstrumentName #'padding = #0
  \override Staff.InstrumentName #'stencil =
  #(lambda (grob)
 (let* ((instrument-name (ly:grob-property grob 'long-text))
(layout (ly:output-def-clone (ly:grob-layout grob)))
(music (make-music 'SequentialMusic
'elements (list (make-music  
'ContextSpeccedMusic

 'context-type 'MensuralStaff
 ;;'property-operations  
'((remove Time_signature_engraver))
 'element (make-music  
'PropertySet
   'symbol  
'instrumentName
   'value instrument- 
name))

   (ly:grob-property grob 'music)
   (ly:output-def-set-variable! layout 'indent 0)
   (ly:output-def-set-variable! layout 'line-width 20)
   (ly:output-def-set-variable! layout 'ragged-right #f)
   (set! (ly:grob-property grob 'long-text)
 (markup #:score (ly:make-score music layout)))
   (ly:system-start-text::print grob)))

  %% the instrument name definition is separated:
  \set Staff.instrumentName = Violon
  c'4 d' e' f' g'1
}

  \layout {
ragged-right = ##t
indent = 5\cm
  }
}

==

inline: incipit4.tiff



That would address the points you raised in your answer.
Are you ok with this (much less enormous) patch?

nicolas


incipit-helper-functions.patch
Description: Binary data




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


Re: Incipits

2008-02-11 Thread Till Rettig



Juergen Reuter schrieb:

Hi all,

as far as I understand, all problems with incipits boil down to the 
following two major issues:


  (1) horizontal spacing, and

  (2) the system start delimiter.

Karl's solution unfortunately leaves horizontal space between the 
incipit and the actual score; hence it does *not* solve issue (2).  
Rather, the score lines should not stop inbetween.
Well, I am not so sure about that. I agree, the space is a bit too big 
here, but I personally like Nocolas' solution where the space mainly 
covers the distance between the choirstaff brace and the beginning of 
the staff. I know that much incipits are engraved with the double line 
method that is now used in the templates, but it feels logical to me 
that the real staff with the brace start only after the incipit. I 
somehow recall this would be also hand engraved convention, but I 
might be wrong. There is an example pdf on the list sent by Stefan 
Slapeta that shows a broad range of incipits which show mainly the staff 
lines going through all the way. So it might be my personal opinion only 
that it would be nice to have the incipit seperated by a little white space.


Till


IMHO, all other features have been quite well demonstrated in template 
A.5.1 for a while now.  Hence, you probably should concentrate on 
solving these two remaining issues.


Regarding issue (2), maybe the right solution is to extend the 
system start delimiter implementation in such a way, that


  (a) automatic printing at the system start may be suppressed for a
  specific range of the score with kind of
  \turnSystemStartDelimiterOff and \turnSystemStartDelimiterOn
  commands, and

  (b) a kind of \bar #'system-start-delimiter command prints an
  additional system start delimiter whereever you want.  (But if this
  bar should happen to appear at the system start, the delimiter
  should not be printed twice.)

Regarding issue (1), I am not sure what the right solution is.  
Please note that the note durations in the incipit are typically much 
larger than in the actually score.  Karl and Nicolas, did you check 
what happens with the horizontal spacing in your incipit solutions, if 
you double or quadruple the note durations in the incipit (and only 
there)?  In your examples, in the incipts you are unfortunately using 
the same durations as in the actual score.  I may be wrong, but I 
suspect that your solutions do *not* solve issue (1).


IIRC, the spacing engine maintains a variable that keeps track of 
shortest available duration in a peace in computes the ideal distance 
of larger note values in a logarithmic scale based on the shortest 
duration.  Maybe this computation needs to be changed for the incipit 
(and only there!) to get tighter spacing in the incipit.


Greetings,
Juergen


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




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


Re: Incipits

2008-02-11 Thread Juergen Reuter



On Mon, 11 Feb 2008, Robert Memering wrote:


Am Montag, 11. Februar 2008 16:36 schrieb Juergen Reuter:

IIRC, the spacing engine maintains a variable that keeps track of shortest
available duration in a peace in computes the ideal distance of larger
note values in a logarithmic scale based on the shortest duration.  Maybe
this computation needs to be changed for the incipit (and only there!) to
get tighter spacing in the incipit.


IMO, horizontal spacing in incipits should be completely
turned off, i.e. uniform (and rather tight) spacing
regardless of note values, as seen in the renaissance
manuscripts.

Robert



Yes, IIRC we once used to have a global boolean variable compact for 
exactly this purpose, but I think it never worked as expected due to the 
complex resolving of competetive spacing constraints.  Remember that you 
almost always need to stretch something somewhere to get your line of 
score filled; so you can not achieve solely uniform spacing unless in 
combination with ragged printing of systems.  I guess switching from 
uniform ragged spacing in the incipit to non-uniform spacing in the 
remaining score would require a major rewrite of the whole horizontal 
spacing engine.


Greetings,
Juergen


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


Re: Incipits

2008-02-11 Thread Till Rettig



Robert Memering schrieb:

Am Montag, 11. Februar 2008 16:36 schrieb Juergen Reuter:
  

IIRC, the spacing engine maintains a variable that keeps track of shortest
available duration in a peace in computes the ideal distance of larger
note values in a logarithmic scale based on the shortest duration.  Maybe
this computation needs to be changed for the incipit (and only there!) to
get tighter spacing in the incipit.



IMO, horizontal spacing in incipits should be completely
turned off, i.e. uniform (and rather tight) spacing
regardless of note values, as seen in the renaissance
manuscripts.
  
I would agree with that. I had an idea about a scheme function working 
in the background that would scale all notes to a single duration (like 
1/8 or even 1/16 as Karl has done in some of his scores. It seems now to 
be the most easiest way to overcome the spacing engine while keeping 
still all of its advantages if some objects (like text e.g.) are wider 
than the note itself.


Till

Robert


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


Re: Incipits

2008-02-11 Thread Robert Memering
Am Montag, 11. Februar 2008 16:36 schrieb Juergen Reuter:
 IIRC, the spacing engine maintains a variable that keeps track of shortest
 available duration in a peace in computes the ideal distance of larger
 note values in a logarithmic scale based on the shortest duration.  Maybe
 this computation needs to be changed for the incipit (and only there!) to
 get tighter spacing in the incipit.

IMO, horizontal spacing in incipits should be completely
turned off, i.e. uniform (and rather tight) spacing
regardless of note values, as seen in the renaissance
manuscripts.

Robert


-- 
Robert Memering
Arbeitsbereich Linguistik, Universität Münster
Hüfferstraße 27, D-48149 Münster, Germany
Raum 01.85, Tel. +49-251-83-31958
http://santana.uni-muenster.de


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


Re: Incipits

2008-02-11 Thread Juergen Reuter

Hi all,

as far as I understand, all problems with incipits boil down to the 
following two major issues:


  (1) horizontal spacing, and

  (2) the system start delimiter.

Karl's solution unfortunately leaves horizontal space between the incipit 
and the actual score; hence it does *not* solve issue (2).  Rather, the 
score lines should not stop inbetween.


IMHO, all other features have been quite well demonstrated in template 
A.5.1 for a while now.  Hence, you probably should concentrate on solving 
these two remaining issues.


Regarding issue (2), maybe the right solution is to extend the system 
start delimiter implementation in such a way, that


  (a) automatic printing at the system start may be suppressed for a
  specific range of the score with kind of
  \turnSystemStartDelimiterOff and \turnSystemStartDelimiterOn
  commands, and

  (b) a kind of \bar #'system-start-delimiter command prints an
  additional system start delimiter whereever you want.  (But if this
  bar should happen to appear at the system start, the delimiter
  should not be printed twice.)

Regarding issue (1), I am not sure what the right solution is.  Please 
note that the note durations in the incipit are typically much larger than 
in the actually score.  Karl and Nicolas, did you check what happens with 
the horizontal spacing in your incipit solutions, if you double or 
quadruple the note durations in the incipit (and only there)?  In your 
examples, in the incipts you are unfortunately using the same durations as 
in the actual score.  I may be wrong, but I suspect that your solutions do 
*not* solve issue (1).


IIRC, the spacing engine maintains a variable that keeps track of shortest 
available duration in a peace in computes the ideal distance of larger 
note values in a logarithmic scale based on the shortest duration.  Maybe 
this computation needs to be changed for the incipit (and only there!) to 
get tighter spacing in the incipit.


Greetings,
Juergen


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


Re: Incipits

2008-02-11 Thread Karl Hammar
Han-Wen:
 Sorry for looking at this so late.
 
 General comments:
 
 - you're adding an enormous bunch of code to the instrument name
 engraver. That's a bad idea. If this idea merits an engraver, it
 should be a separate one.
...
 - If I'm reading this correctly, this is all a grand hack to add a
 little staff to an instrument name.   I don't see the essential
 difference between this and
 
   \set instrumentName = \markup { \score { .. } the-real-name }
 
 except that this is longer, more error prone and less flexible. Again,
 what problem are you trying to solve?
 
 2008/2/9, Nicolas Sceaux [EMAIL PROTECTED]:
   Here is draft patch: the Instrument_name engraver is used to create an
   Incipit grob before the first line when an incipit has been specified.
   There are several problems in it:
...
  Both these problems are solved in the following patch.
  Do core developpers see a problem with it?

Inicipits can be done with the code below.

Regards,
/Karl

%---

\version 2.6.4

men = {
  \override Accidental  #'style = #'mensural
  \override NoteHead  #'style = #'petrucci
  \override Rest  #'style = #'neomensural
  \override Staff.TimeSignature  #'style = #'mensural
  \override Stem #'flag-style = #'mensural
  \override Stem #'thickness = #0.8
%  \set Score.timing = ##f
  \set Staff.defaultBarType = 
  #(set-accidental-style 'forget)
}
nor = {
  \override Accidental  #'style = #'default
  \override NoteHead  #'style = #'default
  \override Rest  #'style = #'default
  \override Staff.TimeSignature  #'style = #'default
  \override NoteHead #'font-size = #'0
  \override Stem #'flag-style = #'default
  \override Stem #'thickness = #1.9
  \override TimeSignature #'style = #'default
  #(set-accidental-style 'default)
%  \set Score.timing = ##t
}

staa = {
  \override Score.SpanBar #'print-function = ##f
  \override Score.BarLine #'print-function = ##f
  \men
}

jump = {
  \stopStaff
  \once \override Score.TimeSignature #'print-function = ##f
  \nor
  \time 3/8
  s4.
  \revert Score.SpanBar #'print-function
  \revert Score.BarLine #'print-function
  \startStaff
  \once \override Score.TimeSignature #'print-function = ##f
  \time 1/16
  s16
  \override Score.SpanBar #'print-function = ##f
  \once \override Staff.Clef #'full-size-change = ##t
  \set Staff.forceClef = ##t
  \clef bass
  \time 4/4
  \bar 
}

%
% Music and lyrics

clefic = { \clef petrucci-c1 }
vic = \relative c' { c1 c }
lic = \lyricmode { A B }

clefmc = { \clef soprano }
vmc = \relative c' { \vic d }
lmc = \lyricmode { \lic c d e f g }

clefib = { \clef petrucci-f }
vib = \relative c { a1 a }
lib = \lyricmode { A B }

clefmb = { \clef bass }
vmb = \relative c { \vib g }
lmb = \lyricmode { \lib c d e f g }

%

\score {
  \new ChoirStaff \with {
% a pain to set? Thats Right!!!
\override SystemStartBracket #'extra-offset = #'( 38.8 . 0 )
  } {

  \new Staff {
\set Staff.instrument = \markup { Cantus }
\context Voice = vc { \clefic \staa \vic  \jump  \clefmc \vmc }
  }
  \context Lyrics = lc \lyricsto vc { \lic \lmc }

  \new Staff {
\set Staff.instrument = \markup { Bassus }
\context Voice = vb { \clefib \staa \vib  \jump  \clefmb \vmb }
  }
  \context Lyrics = lb \lyricsto vb { \lib \lmb }

  }
  \layout {
\context {
  \Score
  \consists Span_bar_engraver
  \remove System_start_delimiter_engraver
}
  }
}



c.pdf
Description: c.pdf
___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: Incipits

2008-02-11 Thread Han-Wen Nienhuys
2008/2/11, Nicolas Sceaux [EMAIL PROTECTED]:
  - If I'm reading this correctly, this is all a grand hack to add a
  little staff to an instrument name.   I don't see the essential
  difference between this and
 
   \set instrumentName = \markup { \score { .. } the-real-name }
 
  except that this is longer, more error prone and less flexible. Again,
  what problem are you trying to solve?

 The problem I was trying to solve is to separate the definition
 of the instrument name, from the one of the incipit. They are not
 the same thing, and should be entered separetely. It's well enough
 to explicitely write
\set instrumentName = \markup { \score { .. } the-real-name }
 when you have a single piece to typeset. It really sucks when you
 have hundreds. (I have more than 600 pieces that would use this
 incipit thing.)

I though we had mechanisms to create more generic/parametrized markups.

 That would address the points you raised in your answer.
 Are you ok with this (much less enormous) patch?

This looks much better. I would probably just scm-ify
Score::add_output_def(), rather than have the optarg, though.

Please go ahead.

-- 
Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen


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


Re: Incipits

2008-02-10 Thread Han-Wen Nienhuys
Sorry for looking at this so late.

General comments:

- you're adding an enormous bunch of code to the instrument name
engraver. That's a bad idea. If this idea merits an engraver, it
should be a separate one.

- the rootSystem stuff should not be necessary; if they're nowhere
else, grobs are always added to the root system.

- it is unusual and unlogical to have a music-valued context property.
 Does incipitMusic ever change over the course of the music?

- If I'm reading this correctly, this is all a grand hack to add a
little staff to an instrument name.   I don't see the essential
difference between this and

  \set instrumentName = \markup { \score { .. } the-real-name }

except that this is longer, more error prone and less flexible. Again,
what problem are you trying to solve?


2008/2/9, Nicolas Sceaux [EMAIL PROTECTED]:
  Here is draft patch: the Instrument_name engraver is used to create an
  Incipit grob before the first line when an incipit has been specified.
  There are several problems in it:
 
  - how can I access the paper object from the engraver? I need a scaled
  output definition to format the incipit score. There are paper_
  slots in
  Book and Paper_book classes, but I don't see how to get there from an
  engraver. As a workaround, I used a context property to pass the
  $defaultpaper object to the engraver, but that sucks.
 
  - there is a garbage problem:
  programming error: Parsed object should be dead: static
  scm_unused_struct* Prob::mark_smob(scm_unused_struct*)
  How do people usually track this kind of issue? (I tried to
  unprotect some
  objects, but this last one is still missing).

 Both these problems are solved in the following patch.
 Do core developpers see a problem with it?

-- 
Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen


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


Re: Incipits

2008-02-09 Thread Nicolas Sceaux


Le 8 févr. 08 à 22:37, Nicolas Sceaux a écrit :


Here is draft patch: the Instrument_name engraver is used to create an
Incipit grob before the first line when an incipit has been specified.
There are several problems in it:

- how can I access the paper object from the engraver? I need a scaled
output definition to format the incipit score. There are paper_  
slots in

Book and Paper_book classes, but I don't see how to get there from an
engraver. As a workaround, I used a context property to pass the
$defaultpaper object to the engraver, but that sucks.

- there is a garbage problem:
programming error: Parsed object should be dead: static  
scm_unused_struct* Prob::mark_smob(scm_unused_struct*)
How do people usually track this kind of issue? (I tried to  
unprotect some

objects, but this last one is still missing).


Both these problems are solved in the following patch.
Do core developpers see a problem with it?



incipit4.patch
Description: Binary data




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


Re: Incipits

2008-02-08 Thread Nicolas Sceaux


Le 3 févr. 08 à 22:08, Nicolas Sceaux a écrit :


Le 3 févr. 08 à 21:07, Till Rettig a écrit :

Whow, this is really great. I guess from that base it is somehow  
simple to have also
changing of notehead/flags etc styles possible -- and not to  
forget: for most socres
of renaissance music the ligature-engraver will have to be added to  
the score and
the ligature bracket engraver removed (which will have to be  
restored for the main
score, where there are usually notated as brackets to indicate the  
original ligatures).


My first idea was that the note head, clef, etc, styles and the
engraver settings would be set in the \incipit functions: it would be
up to the user to define a custom \incipit function based on the
default one. But maybe, using an IncipitStaff context, which  
properties

would be overridden in the score layout block, that could be done more
easily. That's what I'll try.

But there are some flaws in the instrument name hack appraoch. The  
notes

are not aligned (which may or may not be a problem), and the alignment
of the incipit with the staff is manually tuned (hence the use of two
\incipit and \vocalIncipit functions is the example).


Here is draft patch: the Instrument_name engraver is used to create an
Incipit grob before the first line when an incipit has been specified.
There are several problems in it:

 - how can I access the paper object from the engraver? I need a scaled
output definition to format the incipit score. There are paper_ slots in
Book and Paper_book classes, but I don't see how to get there from an
engraver. As a workaround, I used a context property to pass the
$defaultpaper object to the engraver, but that sucks.

 - there is a garbage problem:
programming error: Parsed object should be dead: static  
scm_unused_struct* Prob::mark_smob(scm_unused_struct*)
How do people usually track this kind of issue? (I tried to unprotect  
some

objects, but this last one is still missing).


Example:

\score {
  \new StaffGroup 
\new Staff 
  \set Staff.instrumentName = \markup Toto
  \incipit 
\new MensuralVoice = incipit { \clef neomensural-c1 c'4  
d' e' f' }

\lyricsto incipit \new Lyrics \lyricmode { do ré mi fa }
  
  \new Voice = melody { \clef treble c'4 d' e' f' c'1 }
  \lyricsto melody \new Lyrics \lyricmode { do ré mi fa }

\new Staff 
  \set Staff.instrumentName = \markup Titi
  \incipit { c'2 g'2 }
  { \clef alto c'2 g'2 c'1 }

\new Staff 
  \set Staff.instrumentName = \markup Tutu
  \set Staff.incipitStaffType = #'VaticanaStaff
  \incipit { c'4 g c'2 }
  { \clef alto c'4 g c'2 c'1 }

  
  \layout {
indent = 5\cm
ragged-right = ##t
  }
}
inline: incipit3.tiff





incipit3.patch
Description: Binary data




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


Re: Incipits

2008-02-06 Thread Till Rettig



Nicolas Sceaux schrieb:

Le 3 févr. 08 à 21:07, Till Rettig a écrit :

Whow, this is really great. I guess from that base it is somehow 
simple to have also
changing of notehead/flags etc styles possible -- and not to forget: 
for most socres
of renaissance music the ligature-engraver will have to be added to 
the score and
the ligature bracket engraver removed (which will have to be restored 
for the main
score, where there are usually notated as brackets to indicate the 
original ligatures).


My first idea was that the note head, clef, etc, styles and the
engraver settings would be set in the \incipit functions: it would be
up to the user to define a custom \incipit function based on the
default one. But maybe, using an IncipitStaff context, which properties
would be overridden in the score layout block, that could be done more
easily. That's what I'll try.

But there are some flaws in the instrument name hack appraoch. The notes
are not aligned (which may or may not be a problem), and the alignment
of the incipit with the staff is manually tuned (hence the use of two
\incipit and \vocalIncipit functions is the example).
Yes, I see the problem. I am sorry that I can't really help since my 
programming
language knowledge is still too bad. But I just thought, if it wouldn't 
be possible to
make the changes in the following way: Instrument-name looks if there is 
something
still coming between the instrument name and the staff. This would in 
our case then be the
incipit-engraver. And it it could be tuned to be not centeraligned as 
now but top aligned

with the top of the staff.
Hmm, I just have no clue how to do this...
Otherwise it seems your solution so far is really usable!

Greetings
Till


nicolas




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


Re: Incipits

2008-02-05 Thread Robert Memering
Am Sonntag, 3. Februar 2008 22:08 schrieb Nicolas Sceaux:
 But there are some flaws in the instrument name hack appraoch. The notes
 are not aligned (which may or may not be a problem), and the alignment
 of the incipit with the staff is manually tuned (hence the use of two
 \incipit and \vocalIncipit functions is the example).


I think the most important drawback in the instrument name
approach is that the horizontal spacing is very awkward,
e.g. long rests (several longae) or ligatures plus single
notes have unwanted space in between. If only one could
turn off spacing, the instrument name incipits would look
perfect.

Robert


-- 
Robert Memering
Arbeitsbereich Linguistik, Universität Münster
Hüfferstraße 27, D-48149 Münster, Germany
Raum 01.85, Tel. +49-251-83-31958
http://santana.uni-muenster.de


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


Re: Incipits

2008-02-05 Thread Mats Bengtsson



Robert Memering wrote:


I think the most important drawback in the instrument name
approach is that the horizontal spacing is very awkward,
e.g. long rests (several longae) or ligatures plus single
notes have unwanted space in between. If only one could
turn off spacing, the instrument name incipits would look
perfect.
  

If you read the section about Horizontal spacing in the manual, you can
find some parameters to tweak, to get what you want. Another solution is
to scale the durations: c\longa*1/8

  /Mats


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


Re: Incipits

2008-02-05 Thread Till Rettig



Mats Bengtsson schrieb:



Robert Memering wrote:


I think the most important drawback in the instrument name
approach is that the horizontal spacing is very awkward,
e.g. long rests (several longae) or ligatures plus single
notes have unwanted space in between. If only one could
turn off spacing, the instrument name incipits would look
perfect.
  

If you read the section about Horizontal spacing in the manual, you can
find some parameters to tweak, to get what you want. Another solution is
to scale the durations: c\longa*1/8
Indeed this is the drawback for ancient music at the moment, and there 
are a couple of
ways how to tweak the spacing manually. Another way is to set the width 
of the incipit
manually so the spaces get squashed smaller. You will have the same 
problem, though, with

the other approach as well.

till


  /Mats


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




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


Re: Incipits

2008-02-03 Thread David Kastrup
Nicolas Sceaux [EMAIL PROTECTED] writes:

 Grr, I just wanted to simply print two different clefs at the
 beginning of a score, and now I found myself trying to implement
 full featured incipits, damnit!

 I have something, based on the instrument name hack, which gives
 the following result:

[...]

 Is it nearer to people expectations wrt to incipits?

Quite nice in my non-expert opinion.  Whether or not the syntax would
warrant tweaking is out of my depth.  As it stands, it looks reasonable,
and the output appears appropriate.  Certainly something that should go
in after the experts vetted it.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum



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


Re: Incipits

2008-02-03 Thread Till Rettig
Whow, this is really great. I guess from that base it is somehow simple 
to have also
changing of notehead/flags etc styles possible -- and not to forget: for 
most socres
of renaissance music the ligature-engraver will have to be added to the 
score and
the ligature bracket engraver removed (which will have to be restored 
for the main
score, where there are usually notated as brackets to indicate the 
original ligatures).
Esp. the spaces between the incipit and the starting bracket makes it 
look really
good to me, in opposite to what most publishers do today (maybe this is 
due to Sibelius,

which just isn't able...)
I will be a happy user!

Greetings
Till

Nicolas Sceaux schrieb:


Grr, I just wanted to simply print two different clefs at the
beginning of a score, and now I found myself trying to implement
full featured incipits, damnit!

I have something, based on the instrument name hack, which gives
the following result:




The score looks like:

\score {
  \new StaffGroup 
\new Staff 
  \set Staff.instrumentName = \markup Toto
  \vocalIncipit { \clef neomensural-c1 c'4 d' e' f' }
\lyricmode { do ré mi fa }
  \new Voice = melody {
\clef treble c'4 d' e' f'

c'1
  }
  \lyricsto melody \new Lyrics \lyricmode { do re mi fa }

\new Staff 
  \set Staff.instrumentName = \markup Titi
  \incipit { \clef neomensural-c2 c'4 g c'2 }
  {
\clef alto c'4 g c'2
c'1
  }

\new Staff 
  \set Staff.instrumentName = \markup Tutu
  \incipit { \clef neomensural-c3 c'4 g c'2 }
  {
\clef alto c'4 g c'2
c'1
  }

  
  \layout {
indent = 5\cm
ragged-right = ##t
\context {
  \Staff
  \remove Instrument_name_engraver
  \consists Incipit_engraver
}
  }
}

Is it nearer to people expectations wrt to incipits?

nicolas



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


Re: Incipits

2008-02-03 Thread Nicolas Sceaux

Le 3 févr. 08 à 21:07, Till Rettig a écrit :

Whow, this is really great. I guess from that base it is somehow  
simple to have also
changing of notehead/flags etc styles possible -- and not to forget:  
for most socres
of renaissance music the ligature-engraver will have to be added to  
the score and
the ligature bracket engraver removed (which will have to be  
restored for the main
score, where there are usually notated as brackets to indicate the  
original ligatures).


My first idea was that the note head, clef, etc, styles and the
engraver settings would be set in the \incipit functions: it would be
up to the user to define a custom \incipit function based on the
default one. But maybe, using an IncipitStaff context, which properties
would be overridden in the score layout block, that could be done more
easily. That's what I'll try.

But there are some flaws in the instrument name hack appraoch. The notes
are not aligned (which may or may not be a problem), and the alignment
of the incipit with the staff is manually tuned (hence the use of two
\incipit and \vocalIncipit functions is the example).

nicolas



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