Re: ragged-last-bottom doesn't take

2011-12-10 Thread -Eluze


George_ wrote:
> 
> For a piece I'm writing out, this is what I have at the moment:
> 
> Every one of them is good *apart from* the ragged-last-bottom, i.e.
> setting it to true doesn't make it ragged at all. I've tried replacing it
> with ragged-bottom, which works fine.
> 
> I've written in a \pageBreak at the end of the score, but I don't think
> that's interfering with it somehow - even with it gone, it still won't
> work properly. It just seems weird to me that ragged-bottom = ##t will
> work, but ragged-last-bottom = ##t won't. Am I putting it in the wrong
> place?
> 
i can't compile your code (parts are missing) - but i don't really
understand how you are using ragged-(last-)bottom - either one or the other?

you should probably use both (s. NR):

"ragged-bottom

If set to true, systems will not spread vertically down the page. This does
not affect the last page. This should be set to true for pieces that have
only two or three systems per page, for example orchestral scores. 
ragged-last-bottom

If set to false, systems will spread vertically down the last page. Pieces
that amply fill two pages or more should have this set to true. It also
affects the last page of book parts, i.e. parts of a book created with
\bookpart blocks."

Eluze
-- 
View this message in context: 
http://old.nabble.com/ragged-last-bottom-doesn%27t-take-tp32945130p32950627.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: ragged-last-bottom doesn't take

2011-12-10 Thread George_

It shouldn't compile, I left the parts out to keep it reasonably short. As
far as the \paper block is concerned, though, that is exactly what I am
using at the moment, and that is exactly what doesn't work.

The reason I'm using both ragged-last and ragged-last-bottom is so that the
lines on the last page are not spread vertically, AND so that the bars on
the last line are not spread horizontally.

The thing is, that setting ragged-last-bottom = ##t doesn't do anything to
the layout of the score, but setting ragged-bottom = ##t does.

-Eluze wrote:
> 
> 
> George_ wrote:
>> 
>> For a piece I'm writing out, this is what I have at the moment:
>> 
>> Every one of them is good *apart from* the ragged-last-bottom, i.e.
>> setting it to true doesn't make it ragged at all. I've tried replacing it
>> with ragged-bottom, which works fine.
>> 
>> I've written in a \pageBreak at the end of the score, but I don't think
>> that's interfering with it somehow - even with it gone, it still won't
>> work properly. It just seems weird to me that ragged-bottom = ##t will
>> work, but ragged-last-bottom = ##t won't. Am I putting it in the wrong
>> place?
>> 
> i can't compile your code (parts are missing) - but i don't really
> understand how you are using ragged-(last-)bottom - either one or the
> other?
> 
> you should probably use both (s. NR):
> 
> "ragged-bottom
> 
> If set to true, systems will not spread vertically down the page. This
> does not affect the last page. This should be set to true for pieces that
> have only two or three systems per page, for example orchestral scores. 
> ragged-last-bottom
> 
> If set to false, systems will spread vertically down the last page. Pieces
> that amply fill two pages or more should have this set to true. It also
> affects the last page of book parts, i.e. parts of a book created with
> \bookpart blocks."
> 
> Eluze
> 

-- 
View this message in context: 
http://old.nabble.com/ragged-last-bottom-doesn%27t-take-tp32945130p32950699.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: ragged-last-bottom doesn't take

2011-12-10 Thread George_

Oh, and I should also say that with the parts added in, there are no errors
in the log. According to the program, everything is working as it
should...except that it isn't.

George_ wrote:
> 
> It shouldn't compile, I left the parts out to keep it reasonably short. As
> far as the \paper block is concerned, though, that is exactly what I am
> using at the moment, and that is exactly what doesn't work.
> 
> The reason I'm using both ragged-last and ragged-last-bottom is so that
> the lines on the last page are not spread vertically, AND so that the bars
> on the last line are not spread horizontally.
> 
> The thing is, that setting ragged-last-bottom = ##t doesn't change the
> layout of the score, but setting ragged-bottom = ##t does.
> 
> -Eluze wrote:
>> 
>> 
>> George_ wrote:
>>> 
>>> For a piece I'm writing out, this is what I have at the moment:
>>> 
>>> Every one of them is good *apart from* the ragged-last-bottom, i.e.
>>> setting it to true doesn't make it ragged at all. I've tried replacing
>>> it with ragged-bottom, which works fine.
>>> 
>>> I've written in a \pageBreak at the end of the score, but I don't think
>>> that's interfering with it somehow - even with it gone, it still won't
>>> work properly. It just seems weird to me that ragged-bottom = ##t will
>>> work, but ragged-last-bottom = ##t won't. Am I putting it in the wrong
>>> place?
>>> 
>> i can't compile your code (parts are missing) - but i don't really
>> understand how you are using ragged-(last-)bottom - either one or the
>> other?
>> 
>> you should probably use both (s. NR):
>> 
>> "ragged-bottom
>> 
>> If set to true, systems will not spread vertically down the page. This
>> does not affect the last page. This should be set to true for pieces that
>> have only two or three systems per page, for example orchestral scores. 
>> ragged-last-bottom
>> 
>> If set to false, systems will spread vertically down the last page.
>> Pieces that amply fill two pages or more should have this set to true. It
>> also affects the last page of book parts, i.e. parts of a book created
>> with \bookpart blocks."
>> 
>> Eluze
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/ragged-last-bottom-doesn%27t-take-tp32945130p32950711.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: ragged-last-bottom doesn't take

2011-12-10 Thread Matthew Collett
On 10/12/2011, at 3:54 pm, George_ wrote:

>   \paper {
>   ragged-last-bottom = ##t
>   ragged-last = ##t
>   left-margin = 10\mm
>   right-margin = 7\mm
>   top-margin = 5\mm
>   bottom-margin = 5\mm
>   }

> Every one of them is good *apart from* the ragged-last-bottom, i.e. setting
> it to true doesn't make it ragged at all. I've tried replacing it with
> ragged-bottom, which works fine.

Setting 'ragged-last-bottom = ##t' should have no visible effect, since that is 
the default setting anyway. 

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


Re: ragged-last-bottom doesn't take

2011-12-10 Thread Francisco Vila
2011/12/10 George_ :
> The thing is, that setting ragged-last-bottom = ##t doesn't do anything to
> the layout of the score, but setting ragged-bottom = ##t does.

  ragged-last-bottom is #t by default % best for shorter scores
  ragged-bottom is #f by default

-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com

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


Re: ragged-last-bottom doesn't take

2011-12-10 Thread Xavier Scheuer
On 10 December 2011 03:54, George_  wrote:
>
> […]
>
> Every one of them is good *apart from* the ragged-last-bottom, i.e. setting
> it to true doesn't make it ragged at all. I've tried replacing it with
> ragged-bottom, which works fine.
>
> I've written in a \pageBreak at the end of the score, but I don't think
> that's interfering with it somehow - even with it gone, it still won't work
> properly. It just seems weird to me that ragged-bottom = ##t will work, but
> ragged-last-bottom = ##t won't. Am I putting it in the wrong place?

I think the \pageBreak at the end of the score *is* interfering (I did
not check, maybe I would have if the code was self-compilable without
I have to "imagine" a way to complete the missing variables).

Why are you using \pageBreak at the end of the score and not use a
\bookpart, of which this is the purpose?

Cheers,
Xavier

-- 
Xavier Scheuer 

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


Re: Shortest duration is *not* printed when running ¹lilypond --verbose¹

2011-12-10 Thread Xavier Scheuer
On 10 December 2011 00:45, Carl Sorensen  wrote:
>
> I cannot display it, either.
>
> In scm/define-grobs.scm, the SpacingSpanner grob is set with a
> base-shortest-duration of 3/16, and shortest-duration-space is set to 2.0

IIUC common-shortest-duration is different from base-shortest-duration.
base-shortest-duration is set to a value whereas
common-shortest-duration is calculated as explained in NR 4.5.1.

IIUC it is common-shortest-duration that should be printed when running
'lilypond --verbose' (and that is not printed, actually).

Who is a "specialist" of horizontal spacing?

Cheers,
Xavier

-- 
Xavier Scheuer 

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


Re: Footnotes documentation

2011-12-10 Thread James
George,

On 30 November 2011 22:16, George Xu  wrote:

> Oops, sorry. 2.14.2. I guess that explains why \auto-footnote doesn't
> work, but it doesn't help much...
>
>
In the latest 'development' version

http://lilypond.org/doc/v2.15/Documentation/notation/creating-footnotes

This is explained in much more detail, \auto-footnote is explained here,
but many of the 'automatic/manual' footnote functions are not in 2.14.x.

See if this helps what you need with \auto-footnote as that is I believe in
2.14.x but wasn't documented as well in the 2.14.x manuals.

Regards

-- 
--

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


Re: ragged-last-bottom doesn't take

2011-12-10 Thread -Eluze


George_ wrote:
> 
> Oh, and I should also say that with the parts added in, there are no
> errors in the log. According to the program, everything is working as it
> should...except that it isn't.
> 
> The reason I'm using both ragged-last and ragged-last-bottom is so that
> the lines on the last page are not spread vertically, AND so that the bars
> on the last line are not spread horizontally.
> 
> The thing is, that setting ragged-last-bottom = ##t doesn't change the
> layout of the score, but setting ragged-bottom = ##t does.
> 

i have set up a small example to show it works as expected:

#(set-default-paper-size "a4" 'landscape)
#(set-global-staff-size 18)

music = { \repeat unfold 10 { c4 c c c \break} }

\paper {
  ragged-last-bottom = ##t
  ragged-bottom = ##f
  ragged-last = ##t
}
\score {
  <<
\new PianoStaff {
  <<
\context Staff = rightOne {
  \context Voice = rightOne \music
}
\context Staff = leftOne {
  \context Voice = leftOne \music
}
  >>
}
\context Staff = unten {
  \context Voice = pedalOne \music
}
  >>
}

Eluze

-- 
View this message in context: 
http://old.nabble.com/ragged-last-bottom-doesn%27t-take-tp32945130p3295.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: Clashing note columns

2011-12-10 Thread Kris Van Bruwaene

Here is an example.

Kris
http://old.nabble.com/file/p32951130/lilytest.ly lilytest.ly 

David Kastrup wrote:
> 
> Kris Van Bruwaene  writes:
> 
>> I am typesetting a choral piece wich has two voices coming in unisono on
>> a
>> single staff, one with a whole note (g1), the other with two half notes
>> (g2
>> g2). The whole note and the first half note clash at the start of the
>> measure. I tried to avoid the clash with the remedies given in the
>> Lilypond
>> manual:
>> 1) \once \override NoteColumn #'force-hshift = #2.7 g1
>> to shift the whole note to the right in the measure; no effect. And
>> 2) in the lyrics:
>> { al -- le -- lu -- \once \override LyricText #'self-alignment-X =
>> #CENTER
>> ia } (from Lilypond Snippets Lyrics alignment)
>> No effect either, probably because the syllable "ia" is too short.  How
>> can
>> I solve this?
> 
> I can't quite see your example code.
> 
> -- 
> David Kastrup
> 
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Clashing-note-columns-tp32919673p32951130.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: Clashing note columns

2011-12-10 Thread David Kastrup
Kris Van Bruwaene  writes:

>> David Kastrup wrote:
>>> 
>>> Kris Van Bruwaene  writes:
>>> 
 I am typesetting a choral piece wich has two voices coming in unisono on
 a
 single staff, one with a whole note (g1), the other with two half notes
 (g2
 g2). The whole note and the first half note clash at the start of the
 measure. I tried to avoid the clash with the remedies given in the
 Lilypond
 manual:
 1) \once \override NoteColumn #'force-hshift = #2.7 g1
 to shift the whole note to the right in the measure; no effect. And
 2) in the lyrics:
 { al -- le -- lu -- \once \override LyricText #'self-alignment-X =
 #CENTER
 ia } (from Lilypond Snippets Lyrics alignment)
 No effect either, probably because the syllable "ia" is too short.  How
 can
 I solve this?
>>> 
>>> I can't quite see your example code.
>
> Here is an example.
>
> Kris
> http://old.nabble.com/file/p32951130/lilytest.ly lilytest.ly

Well, first of all it is a surprisingly bad idea to redefine Lilypond's
existing commands \voiceOne and \voiceTwo since you will actually need
them for solving your problem.

Once you have renamed your own commands to something sensible, use
Lilypond's own \voiceOne in the upper of your two voices, and Lilypond's
own \voiceTwo in the lower of your two voices (I'd do that in the score
after \global rather than in the music definitions, but that's a matter
of taste).

The collisions will then get resolved amicably without any property
meddling of your own.

-- 
David Kastrup


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


Re: Clashing note columns

2011-12-10 Thread Phil Holmes
- Original Message - 
From: "Kris Van Bruwaene" 

To: 
Sent: Saturday, December 10, 2011 12:00 PM
Subject: Re: Clashing note columns




Here is an example.

Kris
http://old.nabble.com/file/p32951130/lilytest.ly lilytest.ly


If you'd cut even more of the code out, you would have seen that the lyrics 
are irrelevant to the clashing notes.  The notes clash because Lilypond uses 
voices to split the parts in a single stave, and these are called voiceOne, 
voiceTwo, etc.  But you've redefined these, so it doesn't work.  Redefine 
your music with different names, and base your song on this structure:


\score {
<<
  \new Staff = sopStaff {
   <<
   \new Voice = sopSplitpart { \voiceOne \voiceTwoA }
   \new Voice = sopVoice { \voiceTwo \voiceOneA }
   >>
  }
>>
}


I think you'll find that this will work.

--
Phil Holmes



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


Re: ragged-last-bottom doesn't take

2011-12-10 Thread George_


Xavier Scheuer wrote:
> 
> I think the \pageBreak at the end of the score *is* interfering (I did
> not check, maybe I would have if the code was self-compilable without
> I have to "imagine" a way to complete the missing variables).
> 
> Why are you using \pageBreak at the end of the score and not use a
> \bookpart, of which this is the purpose?
> 
> Cheers,
> Xavier
> 
> -- 
> Xavier Scheuer 
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 
It could be, I removed the \pageBreak and things still didn't work properly,
so I assumed it wasn't. But I've never heard of \bookpart before, that seems
to do everything I need. Thanks :)
-- 
View this message in context: 
http://old.nabble.com/ragged-last-bottom-doesn%27t-take-tp32945130p32952009.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: Footnotes documentation

2011-12-10 Thread George_


pkx166h-2 wrote:
> 
> George,
> 
> On 30 November 2011 22:16, George Xu  wrote:
> 
>> Oops, sorry. 2.14.2. I guess that explains why \auto-footnote doesn't
>> work, but it doesn't help much...
>>
>>
> In the latest 'development' version
> 
> http://lilypond.org/doc/v2.15/Documentation/notation/creating-footnotes
> 
> This is explained in much more detail, \auto-footnote is explained here,
> but many of the 'automatic/manual' footnote functions are not in 2.14.x.
> 
> See if this helps what you need with \auto-footnote as that is I believe
> in
> 2.14.x but wasn't documented as well in the 2.14.x manuals.
> 
> Regards
> 
> -- 
> --
> 
> James
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 
I updated to 2.15.20 to try solve this issue, by the way.

I agree, the 2.15 docs seem to have it documented much better. Just
wondering, though, is there a way to get a body \markup footnote to look
like a top-level markup footnote?

Also, if I may propose a small change to the docs, I think it should
explicitly say that body markups are treated as grobs. I know that it says
that top-level markups are treated differently, but I think it should point
out a bit clearer how other markups are handled, especially when it says:

"Of the two commands used to create automatic footnotes, use
\autoFootnoteGrob for individual grobs (i.e. note heads, stems, slurs,
dynamics including \markup when using TextScripts); and \autoFootnote for
annotating chorded notes."

I don't feel that it's as clear as it could be at the moment, since the only
body markup that is footnoted is the rit. at the end of the 3rd example on
the page. So if it was changed to something like:

"Of the two commands used to create automatic footnotes, use
\autoFootnoteGrob for individual grobs (i.e. note heads, stems, slurs,
dynamics, and \markup when using TextScripts); and \autoFootnote for
annotating chorded notes."

I feel it would be much clearer. Change in bold.

Thanks

George
-- 
View this message in context: 
http://old.nabble.com/Footnotes-documentation-tp32885651p32952013.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: Need a new articulation glyph...

2011-12-10 Thread George_

The snippet that David linked to was too complicated for me to edit
effectively, so what I've done as a temporary solution is I've combined a
couple other snippets and used the mensural custos as a fill-in glyph:

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

to make this:

dwn =
#(define-music-function (parser location note)   (ly:music?)
 #{ \once \override Voice.Accidental #'stencil =
  #ly:text-interface::print
  \once \override Staff.AccidentalPlacement #'right-padding = #2
\once \override Voice.Accidental #'text =
  \markup {\halign #-1 \musicglyph #"custodes.mensural.u0"
   }
$note #})

\dwn g!

Only...I can't figure out how to make it move up or down. If someone could
help me with this I'd really appreciate it.

Thanks

George

David Nalesnik-2 wrote:
> 
> Hi George,
> 
>>
>>
>>> I'd appreciate some feedback on how to implement a new ornament:
>>>
>>> http://old.nabble.com/file/**p32910828/Untitled.png
>>>
>>> It's a Bach ornament known as a slide, and is normally played by playing
>>> the
>>> 2 consecutive notes below and leading up to the ornamented note. So for
>>> the
>>> given example, you would play "e32 fis g8". I can think of a couple of
>>> potential ways this could be written out:
>>>
>>> 1) Pray and hope that somebody here had this need and have somehow
>>> solved
>>> it
>>> already
>>>
>>
> Here's a snippet from the LSR which you might find helpful:
> 
>  http://lsr.dsi.unimi.it/LSR/Item?id=720
> 
> Also see this discussion:
> 
> http://www.mail-archive.com/lilypond-user@gnu.org/msg64645.html
> 
> HTH,
> David
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 



-- 
View this message in context: 
http://old.nabble.com/Need-a-new-articulation-glyph...-tp32910828p32952014.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: duration and pitch in a function

2011-12-10 Thread jakob lund
2011/12/9 Matthew Collett :
>
> On 9/12/2011, at 2:27 pm, David Kastrup wrote:
>
>>> On 8/12/2011, at 10:48 pm, David Kastrup wrote:
>>>
 Please, *never*, *never*, *never* send a "courtesy copy" of a public
 answer as a private mail when answering on a mailing list unless you
 have been _explicitly_ asked to provide such a copy.
>>>
>>> Normally I'd agree with you, but in fairness to Paolo I observe that
>>> this is the only mailing list I am or ever have been a member of in
>>> which the default behaviour is to reply to the sender (only) rather
>>> than to the list.  I have in consequence more than once
>>> unintentionally sent a separate "courtesy copy" message.
>>
>> You arae confusing a _separate_ "courtesy copy", namely one for which
>> the _only_ recipient in the headers is the person you are replying to,
>> with _including_ the intended recipient in the list of recipients of the
>> _same_ mail.
>
> No, I am not: a separate message is what I said, and what I meant.  Because 
> the list reply defaults to the sender _only_, unless I remember explicitly to 
> choose "Reply All" (which I otherwise rarely use) any message I mean to send 
> to the list goes instead to just the individual.  I then have to send a 
> separate copy to the list (only), making my first reply retrospectively and 
> unintentionally a "courtesy copy".  The last occasion that happened was just 
> yesterday.  And as I said, I do not have this problem with any other mailing 
> list.

+1

.. Sorry Matt, I did it again... Jakob.
>
> Best wishes,
> Matthew
>
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

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


Re: Footnotes documentation

2011-12-10 Thread David Kastrup
George_  writes:

> pkx166h-2 wrote:
>> 
>> George,
>> 
>> On 30 November 2011 22:16, George Xu  wrote:
>> 
>>> Oops, sorry. 2.14.2. I guess that explains why \auto-footnote doesn't
>>> work, but it doesn't help much...
>>>
>>>
>> In the latest 'development' version
>> 
>> http://lilypond.org/doc/v2.15/Documentation/notation/creating-footnotes
>> 
>> This is explained in much more detail, \auto-footnote is explained here,
>> but many of the 'automatic/manual' footnote functions are not in 2.14.x.
>> 
>> See if this helps what you need with \auto-footnote as that is I believe
>> in
>> 2.14.x but wasn't documented as well in the 2.14.x manuals.
>> 
> I updated to 2.15.20 to try solve this issue, by the way.
>
> I agree, the 2.15 docs seem to have it documented much better. Just
> wondering, though, is there a way to get a body \markup footnote to look
> like a top-level markup footnote?
>
> Also, if I may propose a small change to the docs, I think it should
> explicitly say that body markups are treated as grobs. I know that it says
> that top-level markups are treated differently, but I think it should point
> out a bit clearer how other markups are handled, especially when it says:
>
> "Of the two commands used to create automatic footnotes, use
> \autoFootnoteGrob for individual grobs (i.e. note heads, stems, slurs,
> dynamics including \markup when using TextScripts); and \autoFootnote for
> annotating chorded notes."

Why don't we have \footnote \default for autonumbering (just like with
\mark), and why can't \footnote just look at the kind of its argument
(just like with \parenthesize) to decide what it is annotating?

I really don't see the need for half a dozen different commands.

-- 
David Kastrup


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


Re: Need a new articulation glyph...

2011-12-10 Thread David Nalesnik
Hi George,

On Sat, Dec 10, 2011 at 11:56 AM, George_  wrote:

Only...I can't figure out how to make it move up or down. If someone could
> help me with this I'd really appreciate it.


This adds another argument to the function which will move the markup up or
down:

 \version "2.15.16"

dwn =
#(define-music-function (parser location note offset) (ly:music? number?)
 #{ \once \override Voice.Accidental #'stencil =
  #ly:text-interface::print
\once \override Staff.AccidentalPlacement #'right-padding = #2
\once \override Voice.Accidental #'text =
  \markup {
  \halign #-1 \translate #(cons 0 $offset) \musicglyph
#"custodes.mensural.u0"
  }
$note #})

\dwn g! #1

Hope this helps--

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


Re: center NoteColumn

2011-12-10 Thread Thomas Morley
Hi David,

2011/12/9 David Nalesnik :
> Hi Harm,
>
> (...) looking
> with fresh eyes at the file I just attached, I really should have condensed
> that list of nearly identical offset calculations.  (See attached for the
> way I came up with.)

thanks for doing this! I did the next step to simplify the definition,
with defining "read-out".
-> attachment

>
>> > The results look fine to me, except for the arpeggio of course.  I don't
>> > know what the problem is here.
>>
>> The arpeggio seems to belong to the NoteColumn (with "2.15.x"),
>> although the IR speaks only about Stems and NoteHeads . This means
>> that a chord with an arpeggio has a bigger extent (and length) and is
>> selected when passing the condition of dir-correction as being greater
>> than one-note-head-length.
>> It's of course possible to change the condition, but I'm not sure,
>> perhaps it's a bug. Did you notice
>>
>> http://old.nabble.com/bug-or-feature-with-the-extent-of-NoteColumn-with-%222.15.20%22---td32935365.html
>> where I ask about it (so far without answer)?
>>
>
> Yes, I saw your thread and I'd be interested in hearing the answer too.  I
> just tried the file with 2.14.2, and the arpeggio works perfectly there.
>

If you haven't seen it already, it's now on the tracker:
http://code.google.com/p/lilypond/issues/detail?id=2091

Thanks,
  Harm
\version "2.14.2"

% Thanks to David Nalesnik

#(set-global-staff-size 20)

#(define (helper ls1 ls2 ls3)
 "Constructs an alist with the elements of ls1 and ls2"
 (set! ls3 (assq-set! ls3 (car ls1) (car ls2)))
(if (null? (cdr ls1))
  ls3
  (helper (cdr ls1) (cdr ls2) ls3)))

#(define (helper-2 lst number)
  "Search the first element of the sorted lst, which is greater than number"
  (let ((ls (sort lst <)))
  (if (> (car ls) number)
  (car ls)
  (if (null? (cdr ls))
  (begin
(display "no member of the list is greater than the number")
(newline))
  (helper-2 (cdr ls) number)

#(use-modules (srfi srfi-1))

#(define (delete-adjacent-duplicates lst)
  "Deletes adjacent duplicates in lst
  eg. '(1 1 2 2) -> '(1 2)"
(fold-right (lambda (elem ret)
  (if (equal? elem (first ret))
  ret
  (cons elem ret)))
(list (last lst))
lst))

#(define (position-in-list obj ls)
  "Search the position of obj in ls"
(define (position-in-list-helper obj ls bypassed)
  (if (null? ls)
  #f
  (if (equal? obj (car ls))
  bypassed
  (position-in-list-helper obj (cdr ls) (+ bypassed 1)
  (position-in-list-helper obj ls 0))
  
#(define (read-out ls1 ls2 ls3 symbol)
"Filters all elements of ls1 from ls2 and appends it to ls3"
(set! ls3 (append ls3 (filter (lambda (x) (eq? (car ls1) (symbol x))) ls2)))
  (if (null? (cdr ls1))
  ls3
  (read-out (cdr ls1) ls2 ls3 symbol)))
  
#(define ((center-note-column x-offs) grob)
 (let* ((sys (ly:grob-system grob))
(elements-lst (ly:grob-array->list (ly:grob-object sys 'all-elements)))
(grob-name (lambda (x) (assq-ref (ly:grob-property x 'meta) 'name)))
(X-extent (lambda (q) (ly:grob-extent q sys X)))
  ;; NoteColumn
(note-column-coord (ly:grob-relative-coordinate grob sys X))
(grob-ext (X-extent grob))
(grob-length (interval-length grob-ext))
  ;; NoteHeads
(note-heads (ly:grob-object grob 'note-heads))
(note-heads-grobs (if (not (null? note-heads))
 (ly:grob-array->list note-heads)
 '()))
(one-note-head (if (not (null? note-heads-grobs))
(car note-heads-grobs)
'()))
(one-note-head-length (if (not (null? one-note-head))
 (interval-length (ly:grob-extent one-note-head sys X))
 0))
  ;; Stem
(stem (ly:grob-object grob 'stem))
(stem-dir (ly:grob-property stem 'direction))
(stem-length-x (interval-length (ly:grob-extent stem sys X)))
  ;; DotColumn
(dot-column (ly:note-column-dot-column grob))
  ;; AccidentalPlacement
(accidental-placement (ly:note-column-accidentals grob))
  ;; Arpeggio
(arpeggio (ly:grob-object grob 'arpeggio))
  ;; Rest
(rest (ly:grob-object grob 'rest))
  ;; Grobs to center between
(args (list 'BarLine 
 	'Clef 
 	'KeySignature
 	'KeyCancellation
 	'TimeSignature))
(grob-lst (read-out args elements-lst '() grob-name)) 
(new-grob-lst (remove (lambda (x) (interval-empty? (X-extent x))) grob-lst))
(co

Re: Footnotes documentation

2011-12-10 Thread m...@apollinemike.com

Le Dec 10, 2011 à 9:18 PM, David Kastrup a écrit :

>> 
> 
> Why don't we have \footnote \default for autonumbering (just like with
> \mark),

We could...I don't understand how \default works, so I'm not sure how to make 
it work here, but a tutorial would get me on my way!

> and why can't \footnote just look at the kind of its argument
> (just like with \parenthesize) to decide what it is annotating?
> 

This is much harder.  Footnotes can annotate all sorts of grobs that 
\parenthesize has only ever dreamed of being able to apply to.

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


Re: Footnotes documentation

2011-12-10 Thread David Kastrup
"m...@apollinemike.com"  writes:

> Le Dec 10, 2011 à 9:18 PM, David Kastrup a écrit :
>
>>> 
>> 
>> Why don't we have \footnote \default for autonumbering (just like with
>> \mark),
>
> We could...I don't understand how \default works, so I'm not sure how
> to make it work here, but a tutorial would get me on my way!

Have you read "Scheme function usage" in EG?

Anyway, let's take a look at two contenders:

autoFootnoteGrob =
#(define-music-function (parser location grob-name offset footnote)
   (symbol? number-pair? markup?)
   (_i "Footnote @var{grob-name} with the text in @var{footnote}
allowing for the footnote to be automatically numbered such that
the number appears at @var{offset}.  Note that, for this to take effect,
auto-numbering must be turned on in the paper block.  Otherwise, no
number will appear.  Use like @code{\\once})")
   (make-music 'FootnoteEvent
   'automatically-numbered #t
   'symbol grob-name
   'X-offset (car offset)
   'Y-offset (cdr offset)
   'text (make-null-markup)
   'footnote-text footnote))


footnote =
#(define-music-function (parser location offset text footnote)
   (number-pair? markup? markup?)
   (_i "Attach @var{text} at @var{offset} with @var{text} referring
to @var{footnote} (use like @code{\\tweak})")
   (make-music 'FootnoteEvent
   'automatically-numbered #f
   'X-offset (car offset)
   'Y-offset (cdr offset)
   'text text
   'footnote-text footnote))

There is an optional argument before number-pair giving the symbol, and
an optional markup text before the footnote.  So we do

footnote =
#(define-music-function (parser location grob-name offset text footnote)
   ((symbol? '()) number-pair? (markup?) markup?)
   (_i "Attach @var{text} at @var{offset} with @var{text} referring
to @var{footnote} (use like @code{\\tweak})")
   (make-music 'FootnoteEvent
   'automatically-numbered (not text)
   'symbol grob-name
   'X-offset (car offset)
   'Y-offset (cdr offset)
   'text (or text (make-null-markup))
   'footnote-text footnote))

And there you are.  If you write a symbol before your offset, that is
used as the grob-name.  If you write \default as the text, then the
footnote is automatically numbered (there is no other way than writing
\default to skip an optional argument before another argument of
identical type, or you could also just leave out the optional argument
like you do with the grob name).

The difference between grob-name and text here is that the first gets
specified with a default value of '() in case the argument is not given
(because that is just what LilyPond uses for unset arguments) while text
just takes the default default of #f since that is easiest to check for
and we need it in two places.  Can't be confused with an explicit
argument of #f since that would not make it through argument type
checking.

So there: your personal tutorial, and you get 1 function and interface
instead of 4.  I have no idea why that was hard to do from the existing
documentation, so it is your task to change the existing documentation
in a way that would have made it possible for you to do this.

Deal?

-- 
David Kastrup

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


Re: Footnotes documentation

2011-12-10 Thread David Kastrup
David Kastrup  writes:

> "m...@apollinemike.com"  writes:
>
>> Le Dec 10, 2011 à 9:18 PM, David Kastrup a écrit :
>>
 
>>> 
>>> Why don't we have \footnote \default for autonumbering (just like with
>>> \mark),
>>
>> We could...I don't understand how \default works, so I'm not sure how
>> to make it work here, but a tutorial would get me on my way!
>
> Have you read "Scheme function usage" in EG?
>
> Anyway, let's take a look at two contenders:
>
> autoFootnoteGrob =
> #(define-music-function (parser location grob-name offset footnote)
>(symbol? number-pair? markup?)
>(_i "Footnote @var{grob-name} with the text in @var{footnote}
> allowing for the footnote to be automatically numbered such that
> the number appears at @var{offset}.  Note that, for this to take effect,
> auto-numbering must be turned on in the paper block.  Otherwise, no
> number will appear.  Use like @code{\\once})")

Just seen "auto-numbering must be turned on in the paper block".  Is
there a use case where turning it off might make any sense?  You have a
per-event property of autonumbering anyway, don't you?

-- 
David Kastrup


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


Re: Footnotes documentation

2011-12-10 Thread David Kastrup
David Kastrup  writes:

> David Kastrup  writes:
>
>> "m...@apollinemike.com"  writes:
>>
>>> Le Dec 10, 2011 à 9:18 PM, David Kastrup a écrit :
>>>
> 
 
 Why don't we have \footnote \default for autonumbering (just like with
 \mark),
>>>
>>> We could...I don't understand how \default works, so I'm not sure how
>>> to make it work here, but a tutorial would get me on my way!
>>
>> Have you read "Scheme function usage" in EG?
>>
>> Anyway, let's take a look at two contenders:
>>
>> autoFootnoteGrob =
>> #(define-music-function (parser location grob-name offset footnote)
>>(symbol? number-pair? markup?)
>>(_i "Footnote @var{grob-name} with the text in @var{footnote}
>> allowing for the footnote to be automatically numbered such that
>> the number appears at @var{offset}.  Note that, for this to take effect,
>> auto-numbering must be turned on in the paper block.  Otherwise, no
>> number will appear.  Use like @code{\\once})")
>
> Just seen "auto-numbering must be turned on in the paper block".  Is
> there a use case where turning it off might make any sense?  You have a
> per-event property of autonumbering anyway, don't you?

And "Use like @code{\once})" is nonsense even discounting the closing
paren.  "Affects all grobs in the current time step like
@code{\once\override}" is presumably what you mean.

-- 
David Kastrup


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