tie

2019-01-21 Thread Gianmaria Lari
Is there any simple way to tie the last note contained in a variable?
Here it is an example (that doesn't work).

\version "2.19.82"
test = {a1}
{\test ~ a4}


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


Re: tie

2019-01-21 Thread Valentin Villenave
On 1/21/19, Gianmaria Lari  wrote:
> Is there any simple way to tie the last note contained in a variable?
> Here it is an example (that doesn't work).

It doesn’t work _yet_, but it will with the upcoming 2.21 release.
(You may already build a pre-release from the source code, but it’s a
bit technical. What’s your operating system?)

Cheers,
V.

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


print bass staff not always

2019-01-21 Thread Gianmaria Lari
The following code prints three "lines" of music. The first and second
lines are two staff system (treble and bass) and the third line just one
staff (treble).

\version "2.19.82"
rh = { \clef treble \repeat unfold 3 {a1 b1 c'1 d'1 \break}}
lh = { \clef bass s1*4 a1 1 11}
\score
{
  \new PianoStaff <<
\new Staff \rh
\new Staff \lh
  >>
  \layout {}
}

I would like to avoid printing the first bass line because it's empty
(s1*4). How can I do it?
Sorry for my "imprecise" english.
g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: print bass staff not always

2019-01-21 Thread Andrew Bernard
Hi Gianmaria,

I know you can do this with GrandStaff and the score context settings shown
here.

Not sure how to do it with PianoStaff.

Andrew

%
\version "2.19.82"
rh = { \clef treble \repeat unfold 3 {a1 b1 c'1 d'1 \break}}
lh = { \clef bass s1*4 a1 1 1 1}
\score
{
  \new GrandStaff <<
\new Staff \rh
\new Staff \lh
  >>
  \layout {

\context {
  \Score
  \RemoveEmptyStaves
  \override VerticalAxisGroup.remove-first = ##t
}
  }
}

%===


On Mon, 21 Jan 2019 at 21:13, Gianmaria Lari 
wrote:

> The following code prints three "lines" of music. The first and second
> lines are two staff system (treble and bass) and the third line just one
> staff (treble).
>
> \version "2.19.82"
> rh = { \clef treble \repeat unfold 3 {a1 b1 c'1 d'1 \break}}
> lh = { \clef bass s1*4 a1 1 11}
> \score
> {
>   \new PianoStaff <<
> \new Staff \rh
> \new Staff \lh
>   >>
>   \layout {}
> }
>
> I would like to avoid printing the first bass line because it's empty
> (s1*4). How can I do it?
> Sorry for my "imprecise" english.
> g.
>
> ___
> 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: print bass staff not always

2019-01-21 Thread Valentin Villenave
On 1/21/19, Andrew Bernard  wrote:
> Not sure how to do it with PianoStaff.

That’s because of the Keep_alive_together engraver. Your layout block
should look like:

\layout {
\context {
  \PianoStaff
  \RemoveEmptyStaves
  \remove "Keep_alive_together_engraver"
  \override VerticalAxisGroup.remove-first = ##t
}
}

That being said, I have never seen a piano part where only one of the
hands is printed when the other doesn’t play. (Vibraphone and marimba
parts, maybe.) That’s why we added this feature in the first place.

Cheers,
V.

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


Re: print bass staff not always

2019-01-21 Thread Andrew Bernard
Hi Valentin,

Great!

Re staff visibility in piano, that was going to be my comment also. But I
always say, give people what they want. At least lilypond lets you do it if
you like.

Andrew



On Mon, 21 Jan 2019 at 23:00, Valentin Villenave 
wrote:

>
> That being said, I have never seen a piano part where only one of the
> hands is printed when the other doesn’t play. (Vibraphone and marimba
> parts, maybe.) That’s why we added this feature in the first place.
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: fingering

2019-01-21 Thread Gianmaria Lari
On Fri, 23 Feb 2018 at 08:43, Gianmaria Lari 
wrote:

>
> On 23 February 2018 at 00:53, Thomas Morley 
> wrote:
>
>> 2018-02-22 11:03 GMT+01:00 Thomas Morley :
>> > 2018-02-22 10:58 GMT+01:00 Gianmaria Lari :
>> >> Dear Harm,
>> >>
>> >> thank you for your really nice help. Your fix worked well and now your
>> >> example is perfect!
>> >>
>> >> I hope others will take advantage of it.
>> >>
>> >> I copy here the final working code with a screenshot.
>> >
>> > Glad you like it :)
>> >
>> > This morning I observed a certain weakness in the code, a missing
>> > safety net to be more precise.
>> > I'll have a deeper look this evening. Now I have to run for my regular
>> job ...
>> >
>> > Cheers,
>> >   Harm
>>
>> Likely safer to check whether a stencil is present before trying to
>> change it. At least it calms down my paranoia ...
>>
>> adjustFC =
>>   \override Staff.FingeringColumn.before-line-breaking =
>> #(lambda (grob)
>>"Sets @code{snap-radius} of @code{FingeringColumn} to @code{3} and
>> applies @code{centered-stencil} to every fingering-stencil"
>>(let*  ((fingerings (ly:grob-object grob 'fingerings))
>>(fingering-ls
>>  (if (ly:grob-array? fingerings)
>>  (ly:grob-array->list fingerings)
>>  '(
>>  (ly:grob-set-property! grob 'snap-radius 3)
>>  (for-each
>>(lambda (f)
>>  (let ((f-stil (ly:grob-property f 'stencil)))
>>(if (ly:stencil? f-stil)
>>(ly:grob-set-property! f 'stencil
>>  (centered-stencil f-stil)
>>fingering-ls)))
>>
>> Cheers,
>>   Harm
>>
>
> Ciao Harm,
>
> tried your new safer code: it works perfectly like the previous :)
> I update my snippet database :))
>
> Thanks a lot, Gianmaria
>

Hi Tomas,
Using your old code to draw a circle around finger number on the left of
the note today I found a problem. When I use "\omit Fingering" the
compilation report me the error:

programming error: Infinity or NaN encountered

\omit Fingering 


Here it is a simple code showing the problem:

\version "2.19.82"
%% returns a stencil (created by `ly:text-interface::print') within a circle
circledFingerStil =
#(lambda (grob)
   (circle-stencil (ly:text-interface::print grob) 0.1 0.1))

%% tweak-short-cut
cFS =
\tweak stencil \circledFingerStil
\etc

adjustFC =
\override Staff.FingeringColumn.before-line-breaking =
#(lambda (grob)
   "Sets @code{snap-radius} of @code{FingeringColumn} to @code{3} and
applies @code{centered-stencil} to every fingering-stencil"
   (let*  ((fingerings (ly:grob-object grob 'fingerings))
   (fingering-ls
(if (ly:grob-array? fingerings)
(ly:grob-array->list fingerings)
'(
 (ly:grob-set-property! grob 'snap-radius 3)
 (for-each
  (lambda (f)
(let ((f-stil (ly:grob-property f 'stencil)))
  (if (ly:stencil? f-stil)
  (ly:grob-set-property! f 'stencil
(centered-stencil f-stil)
  fingering-ls)))


\score
{
 { \set fingeringOrientations = #'(left) \adjustFC
  \omit Fingering 
  \undo \omit Fingering
 }
  \layout {}
}

Do you know how to fix it?

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


Tips and Tricks on making Vim a good environment for Lilypond?

2019-01-21 Thread Rue
I'm somewhat new to Vim and just started learning Lilypond, so I was
wondering if anyone with more experience might be able to share their
experience regarding workflow, plugins you're using, and in general, how
you've set up Vim as a comfortable environment for working with Lilypond.
Whether it's for snippets, live preview, keybinds, or anything that you've
set up in order to have a better visual workspace or to increase your
productivity and workflow.


By the way, regarding syntax highlighting, Lilypond has it built in for Vim
correct?
I found this from the Lilypond documentation regarding "vim mode":

> filetype off
> set runtimepath+=/usr/local/share/lilypond/current/vim/
> filetype on
> syntax on


Furthermore, the path listed here "/usr/local/share/lilypond/current/vim/",
I don't actually have this path. What I have is
"/usr/share/lilypond/2.19.82/", but there's no vim folder though.
The folders inside 2.19.82 are: fonts, ly, ps, python, scm, tex.

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


Re: setting one \book to landscape

2019-01-21 Thread N. Andrew Walsh
Hi List,

On Sat, Jan 19, 2019 at 12:39 PM N. Andrew Walsh 
wrote:

>
> I have an input file with the following structure:
>
> \paper {
>   #(set-default-paper-size "a3" )
> }
>
> \include "file 1 - content.ly"
> \include "file 2 - content.ly"
>
> \book {
> \include "file 1 - score.ly"
> }
>
> \book {
> \include "file 2 - score.ly"
> }
>
> The second file has its own paper block as follows:
>
> \paper {
>   #(set-paper-size "a3" 'landscape )
>   two-sided = "false"
>   left-margin = 5\mm
>   right-margin = 15\mm
>#(define fonts
>  (set-global-fonts
>   #:factor (/ staff-height pt 24 )
>   ))
>   system-system-spacing.basic-distance = #36
>   score-system-spacing =
> #'((basic-distance . 24)
>(minimum-distance . 12)
>(padding . 8)
>(stretchability . 12))
>
> }
>
>
There's one other matter here with this score: In the console output, I see
this:

Drawing systems. . .
warning: compressing over-full page by 24.5 staff-spaces
warning: page 1 has been compressed

So how can I figure out why it's compressing the page? I don't see any
\paper block besides these I've listed that specify a size for the page, so
I don't know where it could be. Is there some special procedure for making
landscape-format scores?

Cheers,

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


Re: setting one \book to landscape

2019-01-21 Thread Carl Sorensen
From: "N. Andrew Walsh" 
Date: Monday, January 21, 2019 at 8:30 AM
To: lilypond-user 
Subject: Re: setting one book to landscape



There's one other matter here with this score: In the console output, I see 
this:

Drawing systems. . .
warning: compressing over-full page by 24.5 staff-spaces
warning: page 1 has been compressed

So how can I figure out why it's compressing the page? I don't see any \paper 
block besides these I've listed that specify a size for the page, so I don't 
know where it could be. Is there some special procedure for making 
landscape-format scores?

All this means is that the best page layout it could find with your systems was 
24.5 staff spaces too tall for the page, so it squeezed things a little closer 
than you’d like.

I don’t consider this warning to be a problem at all, as long as the visual 
representation of the music is OK in your opinion.

HTH,

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


Re: setting one \book to landscape

2019-01-21 Thread David Kastrup
"N. Andrew Walsh"  writes:

>> The second file has its own paper block as follows:
>>
>> \paper {
>>   #(set-paper-size "a3" 'landscape )
>>   two-sided = "false"

That is _not_ how you specify a boolean value in LilyPond.  You probably
want ##f here.

-- 
David Kastrup

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


Re: Tips and Tricks on making Vim a good environment for Lilypond?

2019-01-21 Thread Valentin Villenave
On 1/21/19, Rue  wrote:
> I don't actually have this path. What I have is
> "/usr/share/lilypond/2.19.82/", but there's no vim folder though.

If you’ve installed LilyPond through your distribution’s packages,
then the relevant files should have already been put in
/usr/share/vim/, e.g.

~:  find /usr/share/vim/ -name lilypond*
/usr/share/vim/vim81/compiler/lilypond.vim
/usr/share/vim/vim81/ftdetect/lilypond.vim
/usr/share/vim/vim81/ftplugin/lilypond.vim
/usr/share/vim/vim81/indent/lilypond.vim
/usr/share/vim/vim81/syntax/lilypond-words
/usr/share/vim/vim81/syntax/lilypond-words.vim
/usr/share/vim/vim81/syntax/lilypond.vim

I remember using LilyPond’s vim mode quite a bit a dozen years ago;
syntax highlighting did work but I was not an advanced Vim user enough
to take advantage of all the other niceties. Please let us know if
you’re happy with it!

Cheers,
V.

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


Lilypond and LaTeX margins

2019-01-21 Thread Klaus Ethgen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi,

Taking into account the hints I already gotten, I try to typeset songs
using multiple files and use \lilypondfile to include them into LaTeX
using scrartcl class (Koma).

Now I found out that the margins for the songs are different when
compiling with lilypond direct instead of included in the document by
lilypond-book.

I tried to get the same margins, as with the bigger margins in LaTeX,
the music gets split into two staff lines instead of one.

It seems that lilypond is adding its own margins to the LaTeX one.

Unfortunately, the documentation is not correct. Using line-width option
with no argument results in an compile error. And using
\lilypondfile[line-width=\linewidth]{...} does not work either. (I use
\begin{addmargin}{-0.7cm} to extend the margins.)

So, what is the correct way to include the lilypond file with proper
margins or with margins equal as lilypond uses itself? Is it possible to
use \lilypondfile with no added margins?

By the way, one of my sheets needs "indent = 14\mm" to fit the first
line in one line instead of two. I set this in the \layout section. I
don't know if that will be used for LaTeX include too.

Regards
   Klaus
- -- 
Klaus Ethgen   http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16Klaus Ethgen 
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C
-BEGIN PGP SIGNATURE-
Comment: Charset: ISO-8859-1

iQGzBAEBCgAdFiEEMWF28vh4/UMJJLQEpnwKsYAZ9qwFAlxGJtgACgkQpnwKsYAZ
9qzClgwAlkDdA2MEpucNA0LsV6HxW8PabBeOpwri3doduu/4mLgyypWNgS1ss3XV
86T5DuPrOIe850fCZcEuNChn844p9e0n3coopBUESXMMKrh6eSWtjGLNfRh4rOIN
4tpdHgbGID7u11FbwXBsuREGzwzgn9Wo8/0+u8YyJUXjfXJn3WT7upm9Iq7+NMEA
FbPfTOlYvsHQxKs+5LMKkBBnV86y59/v78h+s3BWtlh3dQKHDuD/Js69VowvwR8O
fnYKwByhJQNyX8eGzi/W9UAchzkQsgoVK9hhaj2UK2XkuOzLms3EaLrY7NHzYWN5
NNWgVR+oC5W0RtGV0W/QPe/W0id3zZVcBol+a9turCzi1lCOyrbqNtQSJyYj3YHi
aoqm93zGFIcBXj+jJ2KL4S9/wTNh1EKeRXd1Qms9gcAj3YUyWGpuQ/YNNpjjvm4X
HmZ27121wcODDx9KNpxUGbzWRUbVO99PjT/2QOsbvVrK6mbthv70NudJh0SDMgsi
KUbi5FLR
=A3uh
-END PGP SIGNATURE-

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


Re: fingering

2019-01-21 Thread Thomas Morley
Hi Gianmaria,

> Using your old code to draw a circle around finger number on the left of the 
> note today I found a problem. When I use "\omit Fingering" the compilation 
> report me the error:
>
> programming error: Infinity or NaN encountered

Has nothing to do with my code, you rather detected a serious bug, imho.
See:
{
  \set fingeringOrientations = #'(left)
  \override Fingering #'stencil = ##f
  
}

I just wrote a bug-report about it.
https://www.mail-archive.com/bug-lilypond@gnu.org/msg42634.html

Sorry to be of not more help,
  Harm

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


Re: fingering

2019-01-21 Thread Aaron Hill

On 2019-01-21 6:04 am, Gianmaria Lari wrote:
Using your old code to draw a circle around finger number on the left 
of

the note today I found a problem. When I use "\omit Fingering" the
compilation report me the error:

programming error: Infinity or NaN encountered

\omit Fingering 


Here it is a simple code showing the problem:

[ . . . ]


This is all you need to trigger the error:


\version "2.19.82"
{ \set fingeringOrientations = #'(left)
  \omit Fingering
   }


Not \setting fingeringOrientations or not \omitting Fingering results in 
a clean compile.  Also changing \omit to \hide works, although then 
there is extra space.


\omit * is basically \override *.stencil = ##f whereas \hide * is 
\override *.transparent = ##t.


My guess is the code that handles fingeringOrientations expects the 
stencil to be valid and is balking at the false value.  Looking at the 
code, I see the programming_error comes from grob.cc:318 which is within 
Grob::translate_axis.  The problem is that translate_axis gets called 
from so many different places.  Without a stack trace, this will be 
harder to track down.


This variation works:


\version "2.19.82"
{ \set fingeringOrientations = #'(left)
  \override Fingering.stencil = #(lambda (grob)
(ly:make-stencil '() '(0 . 0) '(0 . 0)))
   }


Here we have a valid, albeit empty, stencil.  This bypasses the 
programming error.




Ignoring the programming error, there is another issue with how \omit * 
behaves.  Consider the following:



\version "2.19.82"

circledFingerStil = #(lambda (grob)
  (circle-stencil (ly:text-interface::print grob) 0.1 0.1))
cFS = \tweak stencil \circledFingerStil \etc

{ \omit Fingering
   }


Using \omit Fingering is supposed to eliminate Fingering grobs until it 
is \undone.  The problem is that \tweak also modifies the stencil, 
cancelling out the effect of the \omit.



-- Aaron Hill

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


Re: print bass staff not always

2019-01-21 Thread Gianmaria Lari
On Mon, 21 Jan 2019 at 14:57, Gianmaria Lari 
wrote:

>
>
> On Mon, 21 Jan 2019 at 13:02, Valentin Villenave 
> wrote:
>
>> On 1/21/19, Andrew Bernard  wrote:
>> > Not sure how to do it with PianoStaff.
>>
>> That’s because of the Keep_alive_together engraver. Your layout block
>> should look like:
>>
>> \layout {
>> \context {
>>   \PianoStaff
>>   \RemoveEmptyStaves
>>   \remove "Keep_alive_together_engraver"
>>   \override VerticalAxisGroup.remove-first = ##t
>> }
>> }
>>
>> That being said, I have never seen a piano part where only one of the
>> hands is printed when the other doesn’t play. (Vibraphone and marimba
>> parts, maybe.) That’s why we added this feature in the first place.
>>
> [...]

Valentin, your solution works well if the staff is made of rests (r) or
skips (s). Is it possible to print the staff if it contains rests but avoid
to print it if it contains skip?

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


Re: fingering

2019-01-21 Thread David Kastrup
Aaron Hill  writes:

> This variation works:
>
> 
> \version "2.19.82"
> { \set fingeringOrientations = #'(left)
>   \override Fingering.stencil = #(lambda (grob)
> (ly:make-stencil '() '(0 . 0) '(0 . 0)))

That's just #point-stencil .

>}
> 
>
> Here we have a valid, albeit empty, stencil.  This bypasses the
> programming error.
>
> 
>
> Ignoring the programming error, there is another issue with how \omit
> * behaves.  Consider the following:
>
> 
> \version "2.19.82"
>
> circledFingerStil = #(lambda (grob)
>   (circle-stencil (ly:text-interface::print grob) 0.1 0.1))
> cFS = \tweak stencil \circledFingerStil \etc
>
> { \omit Fingering
>}
> 
>
> Using \omit Fingering is supposed to eliminate Fingering grobs until
> it is \undone.  The problem is that \tweak also modifies the stencil,
> cancelling out the effect of the \omit.

I fail to see the problem.  You specify a specific stencil explicitly
not referring to the original definition and get it.

If that's not what you want, you could most certainly have written
something like

\version "2.19.82"

circledFingerStil = #(grob-transformer 'stencil
   (lambda (grob old)
  (and (ly:stencil? old) (circle-stencil old 0.1 0.1
cFS = \tweak stencil \circledFingerStil \etc

{ \omit Fingering
   }

-- 
David Kastrup

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


Re: print bass staff not always

2019-01-21 Thread David Kastrup
Gianmaria Lari  writes:

> On Mon, 21 Jan 2019 at 14:57, Gianmaria Lari 
> wrote:
>
>>
>>
>> On Mon, 21 Jan 2019 at 13:02, Valentin Villenave 
>> wrote:
>>
>>> On 1/21/19, Andrew Bernard  wrote:
>>> > Not sure how to do it with PianoStaff.
>>>
>>> That’s because of the Keep_alive_together engraver. Your layout block
>>> should look like:
>>>
>>> \layout {
>>> \context {
>>>   \PianoStaff
>>>   \RemoveEmptyStaves
>>>   \remove "Keep_alive_together_engraver"
>>>   \override VerticalAxisGroup.remove-first = ##t
>>> }
>>> }
>>>
>>> That being said, I have never seen a piano part where only one of the
>>> hands is printed when the other doesn’t play. (Vibraphone and marimba
>>> parts, maybe.) That’s why we added this feature in the first place.
>>>
>> [...]
>
> Valentin, your solution works well if the staff is made of rests (r) or
> skips (s). Is it possible to print the staff if it contains rests but avoid
> to print it if it contains skip?

[NR:]

A.20 Context modification identifiers
=

The following commands are defined for use as context modifications
within a ‘\layout’ or ‘\with’ block.

‘RemoveAllEmptyStaves’
 Remove staves which are considered to be empty according to the
 list of interfaces set by ‘keepAliveInterfaces’, including those in
 the first system.
• Sets grob property ‘remove-empty’ in ‘*note
  (lilypond-internals)VerticalAxisGroup::’ to ‘#t’.
• Sets grob property ‘remove-first’ in ‘*note
  (lilypond-internals)VerticalAxisGroup::’ to ‘#t’.

‘RemoveEmptyStaves’
 Remove staves which are considered to be empty according to the
 list of interfaces set by ‘keepAliveInterfaces’.
• Sets grob property ‘remove-empty’ in ‘*note
  (lilypond-internals)VerticalAxisGroup::’ to ‘#t’.

[IR:]

2.2.5 Axis_group_engraver
-

Group all objects created in this context in a ‘VerticalAxisGroup’
spanner.

   Properties (read)

 ‘currentCommandColumn’ (graphical (layout) object)
  Grob that is X-parent to all current breakable (clef, key
  signature, etc.)  items.

 ‘hasAxisGroup’ (boolean)
  True if the current context is contained in an axis group.

 ‘keepAliveInterfaces’ (list)
  A list of symbols, signifying grob interfaces that are worth
  keeping a staff with ‘remove-empty’ set around for.

   Properties (write)

 ‘hasAxisGroup’ (boolean)
  True if the current context is contained in an axis group.

   This engraver creates the following layout object(s):

   *note VerticalAxisGroup::.

   ‘Axis_group_engraver’ is part of the following context(s): *note
ChordNames::, *note DrumStaff::, *note Dynamics::, *note FiguredBass::,
*note FretBoards::, *note GregorianTranscriptionStaff::, *note
KievanStaff::, *note Lyrics::, *note MensuralStaff::, *note NoteNames::,
*note OneStaff::, *note PetrucciStaff::, *note RhythmicStaff::, *note
Staff::, *note TabStaff:: and *note VaticanaStaff::.

[ly/engraver-init.ly in definition of Score]

  keepAliveInterfaces = #'(
bass-figure-interface
chord-name-interface
cluster-beacon-interface
fret-diagram-interface
lyric-syllable-interface
note-head-interface
tab-note-head-interface
lyric-interface
percent-repeat-item-interface
percent-repeat-interface

;; need this, as stanza numbers are items, and appear only once.
stanza-number-interface
  )

So probably you likely want to add the rest-interface to that list of
interfaces, probably in Staff context.

-- 
David Kastrup

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


Re: fingering

2019-01-21 Thread Aaron Hill

On 2019-01-21 1:23 pm, David Kastrup wrote:

Aaron Hill  writes:

Using \omit Fingering is supposed to eliminate Fingering grobs until
it is \undone.  The problem is that \tweak also modifies the stencil,
cancelling out the effect of the \omit.


I fail to see the problem.  You specify a specific stencil explicitly
not referring to the original definition and get it.

If that's not what you want, you could most certainly have written
something like

\version "2.19.82"

circledFingerStil = #(grob-transformer 'stencil
   (lambda (grob old)
  (and (ly:stencil? old) (circle-stencil old 
0.1 0.1

cFS = \tweak stencil \circledFingerStil \etc

{ \omit Fingering
   }


That seems like such a useful pattern.  Why is it only mentioned once 
and buried away in extending.pdf?  Also, there is no use of it in the 
entirety of the LSR.  Even searching the mailing list turns up a grand 
total of nine threads where it is ever mentioned.  (Well, I guess it 
will be ten threads now, since this thread is still new enough to not be 
indexed yet.)


Not trying to complain, though.  I have often wondered how to modify a 
property in situ without relying on the constraints of \offset; and I 
definitely going to make use of grob-transformer now.


-- Aaron Hill

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


Title Position Off

2019-01-21 Thread Reggie
How is it possible to simply? move a title of a piece vertical up? Without
moving the systems below first or any systems? I don't want to mess up
markup-system-spacing.minimum-distance or
markup-system-spacing.basic-distance or so on. Just move a title up Y offset
something amount without effecting anything else. Why is this not possible
without custom headers it's too complicated :( Can you help me solve this
thank you!!



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: Title Position Off

2019-01-21 Thread Kieren MacMillan
Hi Reggie,

> How is it possible to simply? move a title of a piece vertical up?

%%%  SNIPPET BEGINS
\version "2.19.80"

\bookpart {
  \header {
title = \markup "My Default Title"
  }
  \score {
c''1
  }
}
\bookpart {
  \header {
title = \markup \raise #15 "My Higher Title"
  }
  \score {
c''1
  }
}%
%%  SNIPPET ENDS

> Why is this not possible without custom headers

It is!  =)

> it's too complicated

Really?  ;)

Hope this helps,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Title Position Off

2019-01-21 Thread Reggie
And actually you are incorrect that command pushes all systems down in my
Piece so I literally want just move up the TITLE and not touch anything
else. This is not possible I can't see it yet. Sorry but no. Your raise does
not only move title it bothers my music.



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: Title Position Off

2019-01-21 Thread Reggie
Kieren MacMillan wrote
> Hi Reggie,
> 
>> How is it possible to simply? move a title of a piece vertical up?
> 
> %%%  SNIPPET BEGINS
> \version "2.19.80"
> 
> \bookpart {
>   \header {
> title = \markup "My Default Title"
>   }
>   \score {
> c''1
>   }
> }
> \bookpart {
>   \header {
> title = \markup \raise #15 "My Higher Title"
>   }
>   \score {
> c''1
>   }
> }%
> %%  SNIPPET ENDS
> 
>> Why is this not possible without custom headers
> 
> It is!  =)
> 
>> it's too complicated
> 
> Really?  ;)
> 
> Hope this helps,
> Kieren.
> 
> 
> Kieren MacMillan, composer
> ‣ website: www.kierenmacmillan.info
> ‣ email: 

> info@

> 
> 
> ___
> lilypond-user mailing list

> lilypond-user@

> https://lists.gnu.org/mailman/listinfo/lilypond-user

I kindly ask you to show me anywhere in the Manual that states that is how
to raise the Title of your Piece please? I coule not locate it anywhere. I
thought markup was markup and title was title. Is everything markup?? :))



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: Title Position Off

2019-01-21 Thread Karlin High

On 1/21/2019 5:02 PM, Reggie wrote:

I literally want just move up the TITLE and not touch anything
else.


Could you attach an image or PDF showing the form of your current 
layout? I'm curious about what is currently above the title.

--
Karlin High
Missouri, USA

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


Re: Title Position Off

2019-01-21 Thread Reggie
Karlin High wrote
> On 1/21/2019 5:02 PM, Reggie wrote:
>> I literally want just move up the TITLE and not touch anything
>> else.
> 
> Could you attach an image or PDF showing the form of your current 
> layout? I'm curious about what is currently above the title.
> -- 
> Karlin High
> Missouri, USA
> 
> ___
> lilypond-user mailing list

> lilypond-user@

> https://lists.gnu.org/mailman/listinfo/lilypond-user

You confuse me. Nothing is above my title. I have a normal Piece of music. I
would like to have my title move UP vertically only but not move my  music
at all. The top system and beyond is just fine.

His raise markup answer does not do that sorry but it's wrong. It moves
music as well somehow. Why can't you just show me in the manual where it
teaches us how to move title TEXT only up or down? No commands I found does
exactly that. You?





--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: Title Position Off

2019-01-21 Thread Aaron Hill

On 2019-01-21 3:02 pm, Reggie wrote:
And actually you are incorrect that command pushes all systems down in 
my

Piece so I literally want just move up the TITLE and not touch anything
else. This is not possible I can't see it yet. Sorry but no. Your raise 
does

not only move title it bothers my music.


If you move the title upwards, then there will be more space between the 
title and the following score.  But space has to come from somewhere.  
Do you want it to come from the space *before* the header?  Then you 
need to subtract that space.  Is there nothing above but the page 
margin?  Then you need to shrink the margins.


-- Aaron Hill

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


Re: Title Position Off

2019-01-21 Thread Karlin High

On 1/21/2019 5:30 PM, Reggie wrote:

Nothing is above my title.


Sorry, communication failure. I was thinking that moving the title up 
will quickly reach the top of the page, and there must be something 
about the layout I am not understanding.


How about using annotate-spacing to show the available dimensions that 
can be adjusted? Which one should be changed to get the result you want?




% BEGIN
\version "2.18.2"
  \header { title = "My Title" }
  \paper { annotate-spacing = ##t }
  \score { c4 }
% END

--
Karlin High
Missouri, USA

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


Re: Tips and Tricks on making Vim a good environment for Lilypond?

2019-01-21 Thread Ivan Kuznetsov
I am a lifelong vim user and I cannot imagine any other way
to enter or manipulate text, be it for web pages,
documents (which I create with Latex) or lilypond.

I have looked at Frescobaldi, but once one is fluent
with a Unix editor (which means vim or emacs)
Frescobaldi and other third party tools are
_not_ a time saver.

You ask about workflow though, and apart from
a xterm where I am using vim, a PDF viewer which
automatically reloads an updated file, and a
Makefile, I don't know that there is anything
to offer you.

Here is a tip, which may be obvious to most, but I will
go ahead and list it here.  I have a few small
template-files.  For example, I mostly write contrapuntal
guitar music, and here is something that I pretty much
use in almost every measure of what I code in lilypond:

   <<
   {
 \voiceOne
   }
   \context Voice = "vtwo"
   {
 \voiceTwo
   }
   >>
   \oneVoice

I have the above template in a separate file, we will say
this file is called "v.ly", and when I need this template
I execute in vim:

  :r v.ly


You ask about syntax highlighting.  I use to get lilypond
syntax highlighting to work in vim by having the following line
in my .vimrc file:

   set runtimepath+=/usr/local/share/lilypond/current/vim/

but I see for the last several years, I have had that line
commented out.  I think that is because my lilypond installation
automatically puts the correct files in /usr/share/vim/ and so
lilypond syntax highlighting works immediately for me upon a new
OS installation.  But then, I use Fedora.  What OS do
you work under?

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


Re: Title Position Off

2019-01-21 Thread Aaron Hill

On 2019-01-21 3:30 pm, Reggie wrote:

Karlin High wrote

On 1/21/2019 5:02 PM, Reggie wrote:

I literally want just move up the TITLE and not touch anything
else.


Could you attach an image or PDF showing the form of your current
layout? I'm curious about what is currently above the title.


You confuse me. Nothing is above my title. I have a normal Piece of 
music. I
would like to have my title move UP vertically only but not move my  
music

at all. The top system and beyond is just fine.

His raise markup answer does not do that sorry but it's wrong. It moves
music as well somehow. Why can't you just show me in the manual where 
it
teaches us how to move title TEXT only up or down? No commands I found 
does

exactly that. You?


The "somehow" you wrote above indicates that you have not yet learned 
how LilyPond handles objects and layout.  There should be no mystery as 
to why raising a markup adjusts things the way it does.


Raising a bit of text in markup only moves it "upwards" relative to the 
other elements within the markup.  However, this changes the overall 
vertical height of the entire markup.  As such, LilyPond must 
accommodate the extra height.  This forces the rest of music further 
down the page.


Why not shift the markup upwards?  Well, there could be things there 
already.  And by things, I might mean the top of the paper.


If you really wanted \raise to shift an item without changing the 
height, consider the following hack:



\version "2.19.82"

#(define-markup-command (faux-raise layout props amount arg) (number? 
markup?)

  (let* ((sten (interpret-markup layout props arg))
 (xex (ly:stencil-extent sten X))
 (yex (ly:stencil-extent sten Y)))
(interpret-markup layout props
  (markup #:with-dimensions xex yex (#:raise amount arg)

\markup { Some \faux-raise #1 "\faux-raised" "text" }
\markup { Some \raise #1 "\raised" "text" }
\markup { Some \raise #1 "\raised" "text" }
\markup { Some \faux-raise #1 "\faux-raised" "text" }


Before you go off and actually use this hack, be sure you have 
acknowledged the major drawbacks.  The first line clips the bounds of 
the image and the last line overlaps the third.  This markup command 
works because it lies to LilyPond about the actual extents of the raised 
markup.  As such, LilyPond has no way to avoid clipped or overlapping 
stencils.




A side commentary, if you would not mind.  You have posted a few times 
asking for features that seem to show a focus on WYSIWYG-style 
activities.  You are probably used to using tools that let you click and 
drag items around on a virtual paper, placing things wherever you see 
fit.  This is very un-LilyPond, which is almost certainly why you are 
experiencing frustration.  To use LilyPond is to learn and adopt a new 
way of thinking about music engraving.


Arbitrary positioning of items is not something typically done in 
LilyPond, although there are some ways to facilitate the task.  Since 
this is not the "normal" (as LilyPond defines it) way of doing things, 
it must be expected that you as the user will have to do the lifting, 
however heavy it may be.


My point here is that you may stand your best chance at success by 
taking a step back from the work you are doing and reconsider your 
approach.  If I looked at my music and said, "I think the title is too 
far down on the paper", my experience tells me that the solution is to 
change the spacing between the top of the paper and the header block.  
The \paper block has top-margin and top-markup-spacing to adjust for 
this.


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


Re: Tips and Tricks on making Vim a good environment for Lilypond?

2019-01-21 Thread Mason Hock
On 01/21, Ivan Kuznetsov wrote:
> I have looked at Frescobaldi, but once one is fluent
> with a Unix editor (which means vim or emacs)
> Frescobaldi and other third party tools are
> _not_ a time saver.

I use vim for everything except large Lilypond projects that consist of
multiple input files. The ability to click on an object in the score and
jump to that place in the code, even if the file containing that code is
not open, outweighs for me vim's advantages as a text editor, but I also
have not spent much time trying to come up with an alternative solution
in vim. How do you angle this.

> You ask about workflow though, and apart from
> a xterm where I am using vim, a PDF viewer which
> automatically reloads an updated file, and a
> Makefile, I don't know that there is anything
> to offer you.

I'd be interested to see one of your Makefiles.

> I have the above template in a separate file, we will say
> this file is called "v.ly", and when I need this template
> I execute in vim:
> 
>   :r v.ly

Nice.

Mason


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


Re: Tips and Tricks on making Vim a good environment for Lilypond?

2019-01-21 Thread Ivan Kuznetsov
Mason Hock  writes:
>
> I use vim for everything except large Lilypond projects that consist of
> multiple input files. The ability to click on an object in the score and
> jump to that place in the code, even if the file containing that code is
> not open, outweighs for me vim's advantages as a text editor, but I also
> have not spent much time trying to come up with an alternative solution
> in vim. How do you angle this.

Well, so far I have just used Lilypond
for solo guitar music, and duets including guitar,
so perhaps I have not begun to work on projects that
are considered large.


> I'd be interested to see one of your Makefiles.

They are no big deal, I am sure.  An example:

###
all: panfan-entire.pdf
wav: panfan-entire.wav


clean:
/bin/rm -f *.pdf *.wav *.midi


panfan-entire.pdf: \
panfan-entire.ly \
panfan-include.ly \
panfan-sec01.ly \
panfan-sec02.ly \
panfan-sec03.ly \
panfan-sec04.ly \
panfan-tempo-sec01.ly \
panfan-tempo-sec02.ly \
panfan-tempo-sec03.ly \
panfan-tempo-sec04.ly
lilypond panfan-entire.ly


panfan-entire.wav: panfan-entire.midi
timidity -A200 -Ow -o panfan-entire.wav   panfan-entire.midi


###


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


Re: Title Position Off

2019-01-21 Thread Aaron Hill

On 2019-01-21 4:35 pm, Aaron Hill wrote:


\version "2.19.82"

#(define-markup-command (faux-raise layout props amount arg) (number? 
markup?)

  (let* ((sten (interpret-markup layout props arg))
 (xex (ly:stencil-extent sten X))
 (yex (ly:stencil-extent sten Y)))
(interpret-markup layout props
  (markup #:with-dimensions xex yex (#:raise amount arg)

\markup { Some \faux-raise #1 "\faux-raised" "text" }
\markup { Some \raise #1 "\raised" "text" }
\markup { Some \raise #1 "\raised" "text" }
\markup { Some \faux-raise #1 "\faux-raised" "text" }



I forgot \with-dimensions-from was a thing:


#(define-markup-command (faux-raise layout props amount arg) (number? 
markup?)

  (interpret-markup layout props
(markup #:with-dimensions-from arg (#:raise amount arg


-- Aaron Hill

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


Re: Title Position Off

2019-01-21 Thread Kieren MacMillan
Hi Reggie,

> Nothing is above my title. I have a normal Piece of music. I
> would like to have my title move UP vertically only but not move my  music
> at all. The top system and beyond is just fine.

Then you need to decrease top-markup-spacing (to reduce the gap between the top 
margin and your title) and compensate by increasing markup-system-spacing (so 
that the first system stays where it currently is).

Still no need to involve custom titles.  =)

Hope that helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Compound meter

2019-01-21 Thread Andrew Bernard
LSR 745 does a nice job of providing for complex compound meter time
signatures.

But it's a very large chunk of Scheme for a relatively small matter, yet
another bit of complex code to look after locally. Is this functionality
built in to lilypond by now?

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


Re: Compound meter

2019-01-21 Thread Andrew Bernard
Mea culpa.

It's built in to 2.19.82.

Apologies for the noise.

Andrew


On Tue, 22 Jan 2019 at 12:52, Andrew Bernard 
wrote:

>
> But it's a very large chunk of Scheme for a relatively small matter, yet
> another bit of complex code to look after locally. Is this functionality
> built in to lilypond by now?
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Title Position Off

2019-01-21 Thread Reggie
Aaron Hill wrote
> A side commentary, if you would not mind.  You have posted a few times 
> asking for features that seem to show a focus on WYSIWYG-style 
> activities.  You are probably used to using tools that let you click and 
> drag items around on a virtual paper, placing things wherever you see 
> fit.  This is very un-LilyPond, which is almost certainly why you are 
> experiencing frustration.  To use LilyPond is to learn and adopt a new 
> way of thinking about music engraving.
> 
> Arbitrary positioning of items is not something typically done in 
> LilyPond, although there are some ways to facilitate the task.  Since 
> this is not the "normal" (as LilyPond defines it) way of doing things, 
> it must be expected that you as the user will have to do the lifting, 
> however heavy it may be.
> 
> My point here is that you may stand your best chance at success by 
> taking a step back from the work you are doing and reconsider your 
> approach.  If I looked at my music and said, "I think the title is too 
> far down on the paper", my experience tells me that the solution is to 
> change the spacing between the top of the paper and the header block.  
> The \paper block has top-margin and top-markup-spacing to adjust for 
> this.
> 
> -- Aaron Hill

I don't mind no that was really actually helpful to hear you say thank you
yes I believe you are correct. My eyes are open now. Sorry. Is there a way
to only adjust the first page top-margin or must I do what Kieren suggested
which is "" then you need to decrease top-markup-spacing (to reduce the gap
between the top margin and your title) and compensate by increasing
markup-system-spacing (so that the first system stays where it currently
is).
 ""

Sorry thank you.




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: Title Position Off

2019-01-21 Thread Reggie
Kieren MacMillan wrote
> Hi Reggie,
> 
>> Nothing is above my title. I have a normal Piece of music. I
>> would like to have my title move UP vertically only but not move my 
>> music
>> at all. The top system and beyond is just fine.
> 
> Then you need to decrease top-markup-spacing (to reduce the gap between
> the top margin and your title) and compensate by increasing
> markup-system-spacing (so that the first system stays where it currently
> is).
> 
> Still no need to involve custom titles.  =)
> 
> Hope that helps!
> Kieren.
> 
> 
> Kieren MacMillan, composer
> ‣ website: www.kierenmacmillan.info
> ‣ email: 

> info@

> 
> 
> ___
> lilypond-user mailing list

> lilypond-user@

> https://lists.gnu.org/mailman/listinfo/lilypond-user

For your information, top-system-spacing has zero effect on my Score. I have
my margins set all to a basic .75\in and this top-system-spacing has no
visible change. Why is this? What causes top-system-spacing to not show any
change? How should I be a detective and solve this? :))




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: Title Position Off

2019-01-21 Thread Kieren MacMillan
Hi Reggie,

> Is there a way to only adjust the first page top-margin

What I suggested will do that, because top-markup-spacing (essentially, the 
"first page" top spacing) is independent of top-system-spacing (essentially, 
the "second and subsequent page" top spacing).

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Title Position Off

2019-01-21 Thread Kieren MacMillan
Hi Reggie,

> top-system-spacing has zero effect on my Score. I have
> my margins set all to a basic .75\in and this top-system-spacing has no
> visible change. Why is this? What causes top-system-spacing to not show any
> change? How should I be a detective and solve this? :))

Compile the snippet below.
Do you not see that the second page of the second score has more top padding?

Cheers,
Kieren.

%%%  SNIPPET BEGINS
\version "2.19.80"

\paper {
  top-margin = 0.75\in
  ragged-bottom = ##t
  top-markup-spacing.padding = #12
}

\header {
  title = "My Masterpiece"
}

\bookpart {
  \score {
{ c''1 \pageBreak c''1 }
  }
}

\bookpart {
  \paper {
top-system-spacing.padding = #48
  }
  \score {
{ c''1 \pageBreak c''1 }
  }
}
%%%  SNIPPET ENDS



Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Title Position Off

2019-01-21 Thread Aaron Hill

On 2019-01-21 6:17 pm, Reggie wrote:
For your information, top-system-spacing has zero effect on my Score. I 
have

my margins set all to a basic .75\in and this top-system-spacing has no
visible change. Why is this? What causes top-system-spacing to not show 
any

change? How should I be a detective and solve this? :))


Is there any \markup above the \score?  If so, then top-system-spacing 
will not apply.  Instead, what will matter is a combination of 
top-markup-spacing and markup-system-spacing.


Consider the following:


\version "2.19.82"

\paper {
  #(set-paper-size "a6")
  top-margin = 50\pt % eqv. to 10 staff spaces at default staff size
  left-margin = 50\pt
  indent = 0
  tagline = ##f
  ragged-bottom = ##t

  top-markup-spacing.basic-distance = 10 % staff spaces are the units 
here

  top-system-spacing.basic-distance = 30
  markup-system-spacing.basic-distance = 20
  score-markup-spacing.basic-distance = 15
}

ruler = \tweak color #red \tweak stencil #(lambda (grob)
  (ly:make-stencil (ly:stencil-expr (apply ly:stencil-add
(map (lambda (n) (let ((t (if (zero? (modulo n 10)) 0.3 0.1))
   (x (+ 5 (if (zero? (modulo n 5)) 7 0)
   (if (zero? (modulo n 10)) 3 0
   (make-line-stencil t (- x) n x n)))
  (iota 61 -20 '(0 . 1) '(0 . 0))) \etc

\markup { \fontsize #6 "top markup" }
\new Staff { \mark \markup "after markup score" \ruler b'1 }
\markup { \fontsize #6 "after score markup" }
\pageBreak
\new Staff { \mark \markup "top score" \ruler b'1 }
\markup { \fontsize #6 "after score markup" }


This replaces the whole notes on each staff with a bright red ruler 
measuring in staff spaces.  You should be able to confirm all of the 
spacing distances as specified in the \paper block.



-- Aaron Hill

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


Re: Tips and Tricks on making Vim a good environment for Lilypond?

2019-01-21 Thread Martin Tarenskeen




On Mon, 21 Jan 2019, Ivan Kuznetsov wrote:


I think that is because my lilypond installation
automatically puts the correct files in /usr/share/vim/ and so
lilypond syntax highlighting works immediately for me upon a new
OS installation.  But then, I use Fedora.  What OS do
you work under?


Hi,

I also use Fedora and vim.
I did a small modification of the file 
/usr/share/vim/vim81/ftplugin/lilypond.vim


-"   view pdf with ghostview
-map   :!gv --watch "%<.pdf" &
+"   view pdf with evince
+map   :!evince "%<.pdf" &

Evince is the standard PDF viewer for Gnome in Fedora and a more obvious 
choice than gv (ghostview). Maybe I should report/request that to the 
Fedora packagers?


Also since I personally prefer to use *.mid instead of *.midi as default 
file extension for midifiles and I like to use Timidity with a GUI I did the 
following modification:


 "   save & make and play midi with timidity
-map   :w:setl makeprg=lilypond\ \"%<\":make:!timidity 
"%<.midi"
+map   :w:setl makeprg=lilypond\ -dmidi-extension=mid\ 
\"%<\":make:!timidity -ig "%<.mid"
 "
 "   save & make
-map   :w:setl makeprg=lilypond\ \"%<\":make
+map   :w:setl makeprg=lilypond\ -dmidi-extension=mid\ 
\"%<\":make


These are lines that configure what happens if you hit the function keys 
F4, F5, F6 when using Vim to edit lilypond files.

The same plugin files also work when using gvim, the GUI version of vim.

At some point I even managed to make Point&Click work (sort of) for the 
combination Evince + Gvim. If I drag the Evince and Gvim to the left and 
right borders of the screen a nice split screen is organized that almost 
can compete with Frescobaldi. And for an experience Vim user this even 
works better than Frescobaldi.


(Don't misunderstand me: Frescobaldi is fantastic, but this thread is 
about Vim)


--

MT

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


Re: fingering

2019-01-21 Thread Valentin Villenave
On 1/21/19, Aaron Hill  wrote:
> That seems like such a useful pattern.

Agreed.

> Why is it only mentioned once
> and buried away in extending.pdf?  Also, there is no use of it in the
> entirety of the LSR.

Well, grob-transformer is a relatively new function (it was introduced
after 2.18, which makes it unvailable on the LSR for now). You can,
however, find plenty of LSR snippets where the stencil is rewritten as
a lambda function (just not with grob-transformer)…

V.

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


Re: Title Position Off

2019-01-21 Thread Jacques Menu
Hello Reggie,

Why can't you just show us an MWE (Minimum Working Example) of your Lily code? 
That would make helping you so much easier!

JM

> Le 22 janv. 2019 à 04:57, Aaron Hill  a écrit :
> 
> On 2019-01-21 6:17 pm, Reggie wrote:
>> For your information, top-system-spacing has zero effect on my Score. I have
>> my margins set all to a basic .75\in and this top-system-spacing has no
>> visible change. Why is this? What causes top-system-spacing to not show any
>> change? How should I be a detective and solve this? :))
> 
> Is there any \markup above the \score?  If so, then top-system-spacing will 
> not apply.  Instead, what will matter is a combination of top-markup-spacing 
> and markup-system-spacing.
> 
> Consider the following:
> 
> 
> \version "2.19.82"
> 
> \paper {
>  #(set-paper-size "a6")
>  top-margin = 50\pt % eqv. to 10 staff spaces at default staff size
>  left-margin = 50\pt
>  indent = 0
>  tagline = ##f
>  ragged-bottom = ##t
> 
>  top-markup-spacing.basic-distance = 10 % staff spaces are the units here
>  top-system-spacing.basic-distance = 30
>  markup-system-spacing.basic-distance = 20
>  score-markup-spacing.basic-distance = 15
> }
> 
> ruler = \tweak color #red \tweak stencil #(lambda (grob)
>  (ly:make-stencil (ly:stencil-expr (apply ly:stencil-add
>(map (lambda (n) (let ((t (if (zero? (modulo n 10)) 0.3 0.1))
>   (x (+ 5 (if (zero? (modulo n 5)) 7 0)
>   (if (zero? (modulo n 10)) 3 0
>   (make-line-stencil t (- x) n x n)))
>  (iota 61 -20 '(0 . 1) '(0 . 0))) \etc
> 
> \markup { \fontsize #6 "top markup" }
> \new Staff { \mark \markup "after markup score" \ruler b'1 }
> \markup { \fontsize #6 "after score markup" }
> \pageBreak
> \new Staff { \mark \markup "top score" \ruler b'1 }
> \markup { \fontsize #6 "after score markup" }
> 
> 
> This replaces the whole notes on each staff with a bright red ruler measuring 
> in staff spaces.  You should be able to confirm all of the spacing distances 
> as specified in the \paper block.
> 
> 
> -- Aaron Hill
> 
> ___
> 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: print bass staff not always

2019-01-21 Thread Gianmaria Lari
On Mon, 21 Jan 2019 at 22:33, David Kastrup  wrote:

> Gianmaria Lari  writes:
>
> > On Mon, 21 Jan 2019 at 14:57, Gianmaria Lari 
> > wrote:
> >
> >>
> >>
> >> On Mon, 21 Jan 2019 at 13:02, Valentin Villenave <
> valen...@villenave.net>
> >> wrote:
> >>
> >>> On 1/21/19, Andrew Bernard  wrote:
> >>> > Not sure how to do it with PianoStaff.
> >>>
> >>> That’s because of the Keep_alive_together engraver. Your layout block
> >>> should look like:
> >>>
> >>> \layout {
> >>> \context {
> >>>   \PianoStaff
> >>>   \RemoveEmptyStaves
> >>>   \remove "Keep_alive_together_engraver"
> >>>   \override VerticalAxisGroup.remove-first = ##t
> >>> }
> >>> }
> >>>
> >>> That being said, I have never seen a piano part where only one of the
> >>> hands is printed when the other doesn’t play. (Vibraphone and marimba
> >>> parts, maybe.) That’s why we added this feature in the first place.
> >>>
> >> [...]
> >
> > Valentin, your solution works well if the staff is made of rests (r) or
> > skips (s). Is it possible to print the staff if it contains rests but
> avoid
> > to print it if it contains skip?
>
> [NR:]
>
> A.20 Context modification identifiers
> =
>
> The following commands are defined for use as context modifications
> within a ‘\layout’ or ‘\with’ block.
>
> ‘RemoveAllEmptyStaves’
>  Remove staves which are considered to be empty according to the
>  list of interfaces set by ‘keepAliveInterfaces’, including those in
>  the first system.
> • Sets grob property ‘remove-empty’ in ‘*note
>   (lilypond-internals)VerticalAxisGroup::’ to ‘#t’.
> • Sets grob property ‘remove-first’ in ‘*note
>   (lilypond-internals)VerticalAxisGroup::’ to ‘#t’.
>
> ‘RemoveEmptyStaves’
>  Remove staves which are considered to be empty according to the
>  list of interfaces set by ‘keepAliveInterfaces’.
> • Sets grob property ‘remove-empty’ in ‘*note
>   (lilypond-internals)VerticalAxisGroup::’ to ‘#t’.
>
> [IR:]
>
> 2.2.5 Axis_group_engraver
> -
>
> Group all objects created in this context in a ‘VerticalAxisGroup’
> spanner.
>
>Properties (read)
>
>  ‘currentCommandColumn’ (graphical (layout) object)
>   Grob that is X-parent to all current breakable (clef, key
>   signature, etc.)  items.
>
>  ‘hasAxisGroup’ (boolean)
>   True if the current context is contained in an axis group.
>
>  ‘keepAliveInterfaces’ (list)
>   A list of symbols, signifying grob interfaces that are worth
>   keeping a staff with ‘remove-empty’ set around for.
>
>Properties (write)
>
>  ‘hasAxisGroup’ (boolean)
>   True if the current context is contained in an axis group.
>
>This engraver creates the following layout object(s):
>
>*note VerticalAxisGroup::.
>
>‘Axis_group_engraver’ is part of the following context(s): *note
> ChordNames::, *note DrumStaff::, *note Dynamics::, *note FiguredBass::,
> *note FretBoards::, *note GregorianTranscriptionStaff::, *note
> KievanStaff::, *note Lyrics::, *note MensuralStaff::, *note NoteNames::,
> *note OneStaff::, *note PetrucciStaff::, *note RhythmicStaff::, *note
> Staff::, *note TabStaff:: and *note VaticanaStaff::.
>
> [ly/engraver-init.ly in definition of Score]
>
>   keepAliveInterfaces = #'(
> bass-figure-interface
> chord-name-interface
> cluster-beacon-interface
> fret-diagram-interface
> lyric-syllable-interface
> note-head-interface
> tab-note-head-interface
> lyric-interface
> percent-repeat-item-interface
> percent-repeat-interface
>
> ;; need this, as stanza numbers are items, and appear only once.
> stanza-number-interface
>   )
>
> So probably you likely want to add the rest-interface to that list of
> interfaces, probably in Staff context.
>
> --
> David Kastrup
>

I post here another solution that's not clean as David solution. It's a
simple escamotage.

To make lilypond print anyway a staff only containing rests I put in the
staff a zero length note and hide it like this:


\hideNotes g4*0  R1*4 \unHideNotes \break


I saw only two drawbacks (?):
1 You have to put this hide note in each line that is made of rests
2 There is some small rest alignment issue in the bar where you put the
hide note

In my case these two drawbacks were not a problem.

Here a complete (and simple) example that compiles.

\version "2.19.82"
stone = {
  \clef treble
  a1 b c' d' \break
  a1 b c' d' \break
  a1 b c' d' \break
}
sttwo = {
  \clef bass
  \hideNotes g4*0 R1*4 \unHideNotes
  f1 g a b \break
  f1 g a b \break
}
sttre = {
  \clef bass
  s1*4
  a1 b c' d'
  s1*4
}
\score {
  \new PianoStaff { <<
\new Staff \with {instrumentName = #"S1" shortInstrumentName = #"S1"}
\stone
\new Staff \with {instrumentName = #"S2" shortInstrumentName = #"S2"}
\sttwo
\new Staff \with {instrumentName = #"S3" shortInstrumentName = #"S3"}
\sttre
  >> }
  \