Re: Staccato Dot Size

2017-05-05 Thread Benjamin Strecker
On Fri, May 5, 2017 at 3:24 PM, David Nalesnik <david.nales...@gmail.com> wrote:
> On Fri, May 5, 2017 at 2:10 PM, Urs Liska <u...@openlilylib.org> wrote:
>>
>>
>> Am 5. Mai 2017 20:52:35 MESZ schrieb Karlin High <gne...@hotmail.com>:
>>>On 5/5/2017 1:16 PM, Benjamin Strecker wrote:
>>>> How would I go about globally reducing the size of the staccato dot?
>>>
>>>The solution is probably going to involve a \context { } block. Maybe
>>>something like this:
>>>
>>>% BEGIN LILYPOND CODE
>>>\version "2.19.59"
>>>
>>>\score {
>>>   c'4 -.
>>>
>>>   \layout {
>>> \context {
>>>   \Score
>>>   \override Script.font-size = #-2
>>> }
>>>   }
>>>}
>>>% END LILYPOND CODE
>>
>> This does *not* cover the condition to leave *other* scripts untouched.
>>
>
> The best way available to get at just the staccato dot would be
> through the snippet here:
>
> http://lilypond.org/doc/v2.19/Documentation/snippets/tweaks-and-overrides#tweaks-and-overrides-overriding-articulations-of-destinct-type
>
> -David

Thanks, David!

That's exactly the sort of thing I'm looking for.

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


Staccato Dot Size

2017-05-05 Thread Benjamin Strecker
How would I go about globally reducing the size of the staccato dot?
Locally, I can do it with:

c'4-\tweak Script.font-size #-2 -.

but I'm having a difficult time figuring out how to do this for every
staccato dot without changing the size of other articulations.

Thanks!
Ben

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


\magnifyStaff and Horizontal Spacing

2017-03-15 Thread Benjamin Strecker
I’m working on a project that involves one full size staff and several smaller 
staves providing cues for other instruments.  I’m using \magnifyStaff to 
accomplish this, but it seems to be adjusting the horizontal spacing in ways 
that I’m not liking.  My hope is to have the spacing largely determined by the 
full-size staff (except in circumstances where the more space is needed to fit 
a more active line in the cues).

In the example below, the score using the different sizes seems to be taking 
it’s spacing from smaller staff.  I first noticed this when I saw that the clef 
and time signature for the full-size staff were much closer together than they 
would normally be, but the note spacing is clearly different when compared with 
the second score in the example.

I have been able to adjust SpacingSpanner.spacing-increment to make the note 
spacing a bit better, but it was largely trial and error.  Doubling the default 
value didn’t quite work out.  Adjusting the clef/time signature issue involved 
changing Clef.spacing-alist.time-signature back to the default.

Am I missing something, or is this just the current state of affairs with using 
\magnifyMusic?

%%%
\version "2.19.52"

music = {
  \repeat unfold 16 {f'16}
}

\score {
  <<
    \new Staff = "full-size" \music
    \new Staff \with {
      \magnifyStaff #1/2
    } \music
  >>
}

\score {
  <<
    \new Staff \music
    \new Staff \music
  >>
}

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


Re: Cautionary Accidental Stencil

2016-11-28 Thread Benjamin Strecker
On Mon, Nov 28, 2016 at 2:46 PM, tisimst <tisimst.lilyp...@gmail.com> wrote:

>
>
> On Mon, Nov 28, 2016 at 12:32 PM, Benjamin Strecker [via Lilypond] <[hidden
> email] <http:///user/SendEmail.jtp?type=node=197190=0>> wrote:
>
>> Abraham,
>>
>>
>> > On Tue, Nov 22, 2016 at 1:25 PM, Abraham Lee <[hidden email]> wrote:
>> >>
>> >>
>> >> Here's how you can use the same functionality as the markup macro
>> >> "bracket" to do the job:
>> >>
>> >> %%%
>> >>
>> >> \version "2.19.36"
>> >>
>> >> bracketAcc = {
>> >>   \once \override AccidentalCautionary.parenthesized = ##f
>> >>   \once \override AccidentalCautionary.stencil =
>> >>   #(lambda (grob)
>> >>  (let ((stil (ly:accidental-interface::print grob))
>> >>(th 0.1))
>> >>(bracketify-stencil stil Y th (* 2.5 th) th)))
>> >> }
>> >>
>> >> \score {
>> >>   \new Staff {
>> >> c''4 c''? \bracketAcc c''? c''
>> >>   }
>> >> }
>> >>
>> >> %%%
>> >>
>> >> An unfortunate side-effect of this is that each accidental's brackets
>> will
>> >> look different because it draws brackets that span the accidental's
>> exact
>> >> vertical extent (e.g., compare a flat vs. a natural). So, here's
>> another
>> >> variant that I cobbled together based on the same macro and the
>> underlying
>> >> "bracketify-stencil" command. It works better because it makes the
>> brackets
>> >> *act like the normal parentheses* so you get a more consistent look
>> for any
>> >> accidental:
>> >>
>> >> %%%
>> >>
>> >> \version "2.19.36"
>> >>
>> >> bracketAcc = {
>> >>   \once \override AccidentalCautionary.parenthesized = ##f
>> >>   \once \override AccidentalCautionary.stencil =
>> >>   #(lambda (grob)
>> >>  (let* ((paren-stil
>> >>   (grob-interpret-markup grob
>> >> (markup #:musicglyph "accidentals.leftparen")))
>> >> (axis Y)
>> >> (other-axis (lambda (a) (remainder (+ a 1) 2)))
>> >> (ext (ly:stencil-extent paren-stil axis))
>> >> (stil (ly:accidental-interface::print grob))
>> >> (thick
>> >>   (ly:output-def-lookup (ly:grob-layout grob)
>> 'line-thickness
>> >> 0.1))
>> >> (padding thick)
>> >> (protrusion (* 2.5 thick))
>> >> (lb (ly:bracket axis ext thick protrusion))
>> >> (rb (ly:bracket axis ext thick (- protrusion
>> >>(set! stil
>> >>  (ly:stencil-combine-at-edge stil (other-axis axis) 1 rb
>> >> padding))
>> >>(set! stil
>> >>  (ly:stencil-combine-at-edge stil (other-axis axis) -1 lb
>> >> padding))
>> >>stil))
>> >> }
>> >>
>> >> \score {
>> >>   \new Staff {
>> >> c''4 c''? \bracketAcc c''? c''
>> >>   }
>> >> }
>> >>
>> >> %%%
>> >>
>> >> HTH,
>> >> Abraham
>> That's pretty helpful.  The second one in particular looks quite good on
>> the accidentals.  I'm trying to apply a similar approach for producing a
>> bracketed trill marking, but I'm not having much luck.  Here's what I
>> currently have:
>>
>> \version "2.19.50"
>>
>> brack = {
>>   \once\override ParenthesesItem.stencil =
>>   #(lambda (grob)
>>  (let ((stil (ly:script-interface::print grob))
>>   (th 0.1))
>>(bracketify-stencil stil Y th (* 2.5 th) th)))
>> }
>>
>> \score {
>>   \new Staff {
>> \brack
>> c''-\parenthesize \trill
>>   }
>> }
>>
>> But this fails for me with the following error:
>>
>> /home/gub/NewGub/gub/target/darwin-x86/src/lilypond-git.sv.
>> gnu.org--lilypond.git-release-unstable/lily/script-interface.cc:36:
>> failed assertion `scm_is_pair (s)'
>>
>> From my (incomplete) understanding of the internal workings, I would have
>> thought this would produce something in the neighborhood of what I want.
>> Any advice to point me in the correct direction?
>>
>
> I get the same error, but I'm not sure it's the right approach anyway. Try
> this:
>
> brack = {
>   \once \override Script.stencil =
>   #(lambda (grob)
>  (let* ((stil (ly:script-interface::print grob))
> (th 0.1))
>(bracketify-stencil stil Y th (* 2.5 th) th)))
> }
>
> HTH,
> Abraham
>
> --
> View this message in context: Re: Cautionary Accidental Stencil
> <http://lilypond.1069038.n5.nabble.com/Cautionary-Accidental-Stencil-tp197011p197190.html>
> Sent from the User mailing list archive
> <http://lilypond.1069038.n5.nabble.com/User-f3.html> at Nabble.com.
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
>
That's just what I was looking for!  Thanks!
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Cautionary Accidental Stencil

2016-11-28 Thread Benjamin Strecker
Abraham,

> On Tue, Nov 22, 2016 at 1:25 PM, Abraham Lee <[hidden email]> wrote:
>>
>>
>> Here's how you can use the same functionality as the markup macro
>> "bracket" to do the job:
>>
>> %%%
>>
>> \version "2.19.36"
>>
>> bracketAcc = {
>>   \once \override AccidentalCautionary.parenthesized = ##f
>>   \once \override AccidentalCautionary.stencil =
>>   #(lambda (grob)
>>  (let ((stil (ly:accidental-interface::print grob))
>>(th 0.1))
>>(bracketify-stencil stil Y th (* 2.5 th) th)))
>> }
>>
>> \score {
>>   \new Staff {
>> c''4 c''? \bracketAcc c''? c''
>>   }
>> }
>>
>> %%%
>>
>> An unfortunate side-effect of this is that each accidental's brackets
will
>> look different because it draws brackets that span the accidental's exact
>> vertical extent (e.g., compare a flat vs. a natural). So, here's another
>> variant that I cobbled together based on the same macro and the
underlying
>> "bracketify-stencil" command. It works better because it makes the
brackets
>> *act like the normal parentheses* so you get a more consistent look for
any
>> accidental:
>>
>> %%%
>>
>> \version "2.19.36"
>>
>> bracketAcc = {
>>   \once \override AccidentalCautionary.parenthesized = ##f
>>   \once \override AccidentalCautionary.stencil =
>>   #(lambda (grob)
>>  (let* ((paren-stil
>>   (grob-interpret-markup grob
>> (markup #:musicglyph "accidentals.leftparen")))
>> (axis Y)
>> (other-axis (lambda (a) (remainder (+ a 1) 2)))
>> (ext (ly:stencil-extent paren-stil axis))
>> (stil (ly:accidental-interface::print grob))
>> (thick
>>   (ly:output-def-lookup (ly:grob-layout grob) 'line-thickness
>> 0.1))
>> (padding thick)
>> (protrusion (* 2.5 thick))
>> (lb (ly:bracket axis ext thick protrusion))
>> (rb (ly:bracket axis ext thick (- protrusion
>>(set! stil
>>  (ly:stencil-combine-at-edge stil (other-axis axis) 1 rb
>> padding))
>>(set! stil
>>  (ly:stencil-combine-at-edge stil (other-axis axis) -1 lb
>> padding))
>>stil))
>> }
>>
>> \score {
>>   \new Staff {
>> c''4 c''? \bracketAcc c''? c''
>>   }
>> }
>>
>> %%%
>>
>> HTH,
>> Abraham

That's pretty helpful.  The second one in particular looks quite good on
the accidentals.  I'm trying to apply a similar approach for producing a
bracketed trill marking, but I'm not having much luck.  Here's what I
currently have:

\version "2.19.50"

brack = {
  \once\override ParenthesesItem.stencil =
  #(lambda (grob)
 (let ((stil (ly:script-interface::print grob))
  (th 0.1))
   (bracketify-stencil stil Y th (* 2.5 th) th)))
}

\score {
  \new Staff {
\brack
c''-\parenthesize \trill
  }
}

But this fails for me with the following error:

/home/gub/NewGub/gub/target/darwin-x86/src/lilypond-git.sv.gnu.org--lilypond.git-release-unstable/lily/script-interface.cc:36:
failed assertion `scm_is_pair (s)'

>From my (incomplete) understanding of the internal workings, I would have
thought this would produce something in the neighborhood of what I want.
Any advice to point me in the correct direction?

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


Cautionary Accidental Stencil

2016-11-22 Thread Benjamin Strecker
Hello!

I am working from an edition that uses square brackets for items added
by the editors.  I was able to change the stencils property for
\parenthesize for most of these, but there are some accidentals that
have been added.  Currently, I'm using the following to produce a
reasonable approximation, but are there any simpler ways to do this?

\version "2.19.50"

%% Set of overrides to approximate a cautionary natural inside square
brackets instead of parentheses
brackNat = {
  \once\override AccidentalCautionary.stencil = #ly:text-interface::print
  \once\override AccidentalCautionary.text = \markup {
\concat{\translate #'(0.0 . -0.7) [
\musicglyph #"accidentals.natural"
\translate #'(0.0 . -0.7) ]}
  }
}

\score {
  \new Staff {
c''4 c''? \brackNat c''? c''
  }
}

Thanks for any advice you can offer!
Ben

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


Re: lilypond-book and latex indenting issue

2016-07-08 Thread Benjamin Strecker
Hello,

On Fri, Jul 8, 2016 at 1:21 PM, Vaylor Trucks  wrote:
> Vaylor Trucks  gmail.com> writes:
>
>>
>> I'm not sure if this is a LaTeX question or a Lilypond question.
>
> After some digging, the definitely seems to be a Lilypond issue. If I look
> in the output directory I specify in invoking lilypond-book, I see the
> .PDF files created by Lilypond which are used as images in the LaTeX doc,
> and there is definitely white space to the left of the staff in these
> images. The question I have now is, how to I eliminate that white space if
> not by using #indent=0?
>

lilypond-book adds a little bit of space by slightly reducing the
line-width (it looks like about 4mm to me).  One possible way to
remove this space is by adding the following to a paper block inside
your external .ly file:

line-width = #(+ line-width (* mm 4))

And in the preamble of your .lytex file:

\def\preLilyPondExample{\hspace*{-3mm}}
\newcommand{\betweenLilyPondSystem}[1]{\linebreak\hspace*{-3mm}}

Note: this is what I would call a workaround, not a fix.  There are
reasons why this space exists.  If you are using braces at the
beginning of a stave or have long bar numbers showing up at the
beginning of the line, these will be hanging in the left margin.

Hope this helps!
Ben

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


Re: lilypond-book and latex indenting issue

2016-07-08 Thread Benjamin Strecker
On Fri, Jul 8, 2016 at 1:32 PM, Vaylor Trucks  wrote:
> I found the problem. Invoking lilypond-book with --left-padding 0 solved
> the problem.
>

That is a much better solution.

Cheers!
Ben

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


Re: Cues recursion

2016-06-19 Thread Benjamin Strecker
David, Matteo,

On Sun, Jun 19, 2016 at 9:53 PM, David Wright  wrote:
> On Mon 20 Jun 2016 at 00:40:08 (+0200), matpen3@gmail wrote:
>> I’m preparing parts for a quite complex score, and I’m using the ‘’\add 
>> quote” command for cues.
>
> Why aren't you using cues rather than quotes?
>
>> Everything is fine until I have to quote a part that contains a cue of the 
>> same one.
>> For example, cues for the first violin are extracted from the second violin 
>> that in turn has cues of the first.
>>
>> Lilypond enters in a sort of freezing and then return a 'malloc error’.
>>
>> That makes sense to me: I figure out that it recalls an endless recursion.
>> I tried to use \killCues (\addQuote “FirstViolinCue" { \killCues 
>> \FirstViolin}) bur it doesn’t work.
>
> killCues kills cues, not quotes.
>
> Cues are notes written in a part that aren't played by that part.
> Quotes are notes written in a part that are played by that part.
> So killing quotes would leave a part incomplete.
> Killing cues leaves just the notes which actually belong to the part.
>
> Cheers,
> David.
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

Matteo is correct to be using addQuote to use the cueDuring function
(http://lilypond.org/doc/v2.19/Documentation/notation/writing-parts#formatting-cue-notes).
The problem here is not with recursive cues but recursive includes.
As things stand, you are alternately \include-ing each of the violin
parts until you run out of space.  I would recommend reorganizing your
files a little bit so you don't have to \include each of the part
files into the other.  Since you're creating both scores in the same
file (in this example), you could use \addQuote in the score file.

I'm a bit pressed for time, but I hope that helps!
Ben

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


Re: Question about output

2016-04-28 Thread Benjamin Strecker
On Wed, Apr 27, 2016 at 11:51 PM, Michiel Sikma  wrote:
>
> Hi all,
>
> I'm doing some tests trying to figure out repeating sections and voices, and 
> I've written this so far:
> http://lilybin.com/mwafar/2
> My question is, does it look OK to you that the end of the second alternative 
> is a repeat bar (e.g. ":..:" ) in both directions? I was expecting to get a 
> ".|:" bar. Here's an example: http://i.imgur.com/PJ9prg1.png
> Did I accidentally mess up the repeat formatting or is Lilypond's output also 
> valid? To me it looks almost like there should be another repeat of the first 
> part, after playing the second alternative, which is not how the score should 
> be, but maybe I'm mistaken.
>
> I appreciate any insight you can give, or other tips if you happen to think 
> of any :)
>
> Michiel Sikma
>

The short answer is that you didn't _quite_ handle the repeat
structure correctly.  You have the repeat and alternatives all set up
in the right hand part, but in the left hand part, you don't have the
alternatives, just the repeat, so that adds the left-facing repeat
dots at the end of the second alternative.  To me, that is a confusing
appearance, because, as you said, it looks like there's yet another
repeat back to the top.

One thing that I like to do (and I'm pretty sure others will back me
up on this) is have a global voice that contains key signature
settings, tempo indications, repeat structure, etc.  In your case, it
might look something like this for the first repeated section:

global = {
  \key c \major
  \time 9/16
  \tempo "Adagio molto semplice e cantabile"
  \repeat volta 2 {
\partial 8. s8. |
\repeat unfold 7 {s4. s8.}
  }
  \alternative {
{
  \set Timing.measureLength = #(ly:make-moment 6/16)
  s4.
}
{
  \set Timing.measureLength = #(ly:make-moment 9/16)
  s4. s8.
}
  }
}

Then, you just add that as another simultaneous voice.  This means you
don't have to re-create the repeat structure precisely in every single
staff, which is particularly handy when working with a large score
with many staves.

Hope this helps,
Ben

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


Re: difference of code construct

2016-03-19 Thread Benjamin Strecker
Ming,

I agree that the way you have your input file organized is a bit difficult
to read, and (I would argue) pretty unorthodox.

I was a little curious about the difference in the output, but I'm afraid I
can't offer a solution, only some observations after looking at it.

In my tinkering, it seemed to be associated with the time signature.  In
the example below (and attached), I get the same behavior you do, where the
second score has the left-hand part continuing past the apparent end of its
voice(s).  Additionally, there is inconsistency about the beaming of the
eighth notes between the two scores.  However, if I change the time
signature to 4/4 (and change R2. to R1 in the right hand), both scores
produce the same output.

Would anyone be able to elaborate if this is expected behavior?

\version "2.19.32"

right = \relative c' {
  \time 3/4
  R2.*6
}

left = \relative c {
  \time 3/4
  << {r4 d8 e r4} \\ {r4 b8 c r4} >>
}

xLeft = \relative c {
  \time 3/4
  r4 << {d8 e} \\ {b8 c} >> r4
}

\score {
  \new PianoStaff <<
\new Staff \right
\new Staff {
  \clef bass \left
}
  >>
}

\score {
  \new PianoStaff <<
\new Staff \right
\new Staff {
  \clef bass \xLeft
}
  >>
}


On Fri, Mar 18, 2016 at 9:25 AM, MING TSANG  wrote:

> Hi, lilyponder:
>
> I have a question about coding construct. Please refer to lilybin
>  attachment
>
>  LilyPond Score 
>
>
>
>
>
>
> LilyPond Score 
> LilyPond Score made using LilyBin.
> View on lilybin.com 
> Preview by Yahoo
>
>
> Immanuel,
> Ming
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
>


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


Re: Edition-engraver: Multiple editions in same file

2016-01-23 Thread Benjamin Strecker
Thanks, Urs.

That occurred to me after a good night’s sleep.  I think I have *a*
solution now, but I don’t know if it’s the recommended way to do things.

My project contains four scores where the melody is the same but in
different registers.  There are some modifications that I want applied
universally to each score, but the individual scores have their own
requirements from different BreathingSign collisions, slur shapes, etc.

I now have my file organized with a global \layout block:

\layout {
  \context {
\Score
\consists \editionEngraver beams
  }
  \context {
\Staff
\consists \editionEngraver ##f
  }
  \context {
\Voice
\consists \editionEngraver ##f
  }
}

And each of the scores has it's own layout block consisted with an
editionEngraver unique to that score.  Here are the first two, for example:

\score {
  \new Staff {
<< \melody \dynamics \global >>
  }
  \layout {
\context {
  \Staff
  \consists \editionEngraver firstTreble
}
  }
}


\score {
  \new Staff {
<< \transpose e b \melody \dynamics \global >>
  }
  \layout {
\context {
  \Staff
  \consists \editionEngraver highest
}
  }
}

So far this seems to be working, but I don't know if this is considered the
'correct' way to do it.

So have I kept myself on the beaten path or wandered into inadvisable
territory?

Ben

On Jan 23, 2016, at 9:17 AM, Urs Liska  wrote:



Am 22.01.2016 um 22:00 schrieb Ben Strecker:

I’m working on a project that would have the same melody appearing in
different ranges in the same document.  Each range has its own set of
modifications through the edition-engraver, but using \removeEdition
anywhere in the file appears to remove that edition for all of the
scores.  What is the best practice for managing multiple editions in
the same file?

I have attached a very simple example where I have two scores:  one
that should have a color modification applied, and another that should
not have any editionMods applied.


If your actual file is also organized using different \score blocks you can
achieve what you want by moving the layout block *inside* the score block:

\score {
  \new Staff { \melody }
  \layout {
\context {
  \Score
  \consists \editionEngraver my.Test
}
\context {
  \Staff
  \consists \editionEngraver ##f
}
\context {
  \Voice
  \consists \editionEngraver ##f
}
  }
}

If that's not what you need please give more details on the actual use
case. It may be that we can help you further

HTH
Urs

Thanks,
Ben




___
lilypond-user mailing
listlilypond-user@gnu.orghttps://lists.gnu.org/mailman/listinfo/lilypond-user


___
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