Re: Four Part Piano Staff

2016-02-02 Thread David Wright
On Mon 01 Feb 2016 at 20:31:27 (-0800), Mark Stephen Mrotek wrote:

> In the past I have used the "variable" format.

Naturally.

> This leads to some repeated adjustments in the placement of the second voice.

I don't understand what you mean by "repeated adjustments".

> I prefer not to use variable, yet rather code within the Piano Staff group.

But that throws away one of the great strengths of LP: the separation
of form and content. Obviously one can replace any use of a variable
by its definition, as in

foo = { a b c d }
\new Voice { \foo }

replaced by

\new Voice { a b c d }

but look at what you lose...

Here's a carol with four independent lines, completely defined in
nine variables (drastically compressed for this email):

[... some house-style includes, version, language ...]

global = { \tempo "Leggiero e scherzando" 4=120 \key bf \major \time 4/4
  s1 * 13 \bar "||" \key g \major \time 3/4 s2. * 8 \time 4/4 s1 * 4 ... }
soprano = \relative { R1 R1 R1 r2 r4 bf'8 ^\mf c ... }
alto = \relative { R1 R1 r2 r4 r8 ef' ^\mf ... }
tenor = \relative { R1 r2 r4 r8 bf ^\mf c8 d ef c d4~ d8 r ... }
bass = \relative { r2 r4 f8 ^\mf f f4 bf8 bf bf4 bf8 r R1 ... }
sopranotext = \lyricmode { and a pro -- per Christ -- mas tree.” ... }
altotext = \lyricmode { “I’ve bought a nice fresh tur -- key ... }
tenortext = \lyricmode { my true love said to me, __ ... }
basstext = \lyricmode { On the first day of Christ -- mas }

First we generate five cyberbass-style midi files with a
potted ily that overrides the dynamics, for tutti and all
four parts. I have files for saatb, sattb, etc but won't
bother with their implementation here.

\include "Midi-satb.ily"

Now the vocal score with beams broken at the crochet beat:

#(set-global-staff-size 16)
\book { \bookOutputSuffix "vocal" \score {
  \new GrandStaff << \set GrandStaff.beamExceptions = ...
\new Staff << \clef treble \global
  \new Voice { \soprano } \addlyrics { \sopranotext } >>
\new Staff << \clef treble \global
  \new Voice { \alto } \addlyrics { \altotext } >>
\new Staff << \clef "treble_8" \global
  \new Voice { \tenor } \addlyrics { \tenortext } >>
\new Staff << \clef bass \global
  \new Voice { \bass } \addlyrics { \basstext } >>
  >> \layout { }
  }
}

Now a piano version for people who don't play from four staves,
with longer beams, and dynamics removed for clarity.

#(set-global-staff-size 17)
\book { \bookOutputSuffix "piano" \score {
  \new PianoStaff <<
\new Staff << \clef treble \global
  \new Voice { \voiceOne \soprano } \new Voice { \voiceTwo \alto } >>
\new Staff << \clef bass \global
  \new Voice { \voiceOne \tenor } \new Voice { \voiceTwo \bass } >>
  >> \layout { \context { \Voice \remove "Dynamic_engraver" } }
  }
}

I routinely do transposed parts for altos (who don't appreciate
singing early music from tenor clefs in low keys), and so on.
So much is impractical without putting the music into variables.

Cheers,
David.

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


Re: D.C. al fine

2016-02-02 Thread David Kastrup
Noeck  writes:

> Dear Graham, David, all,
>
> I never used a real repeat structure for D.C. al Fine pieces. But your
> example, Graham, does it very nicely. I put it into a little function
> below which makes it easy to reuse. A \repeatsegno follows the same
> lines. I would consider these four versions to be standard structures:
> - D.C. al Fine: A F| B -> A B A
> - D.S. al Fine: A |S B F| D -> A B D B
> - D.C. al Coda: A C| B |C D -> A B A D
> - D.S. al Coda: A |S B C| D |C E -> A B D B E
> (|S = Segno, F| = Fine, C = Coda)
>
> I know this has been discussed before [1] and found too hard to
> implement for all cases as a general repeat structure interface.

It was more of the "nobody bothered implementing it yet" variety.  The
varieties presented by Ian Hulin would all be mappable to a form of

\repeat coda #n { ... } \alternative { ... }

on the input side.  One "just" needs to make it do something useful, but
the \unfoldrepeats could be quite the same as for \repeat volta.

> [1]:
> http://lilypond.1069038.n5.nabble.com/Da-Capos-Codas-and-Segnos-td112830.html

-- 
David Kastrup

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


Re: Four Part Piano Staff

2016-02-02 Thread Simon Albrecht

On 02.02.2016 03:25, Mark Stephen Mrotek wrote:


Hello,

I want to make a template for a piano staff with two explicitly 
instantiated voices (not <<{ } \\{ } >>) in each staff – this for four 
part fugues.


Any assistance in accomplishing this would be greatly appreciated.



To come back to your original question: how about the following?

\new Staff = "foo" <<
  \time 7/32
  \key fes \minor
  \new Voice = "soprano" { \voiceOne bisis'32.. }
  \new Voice = "alto" { \voiceTwo a'\breve }
>>

If that’s not basically what you want, please be more specific.

Yours, Simon

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


Re: How to align text and dynamixs

2016-02-02 Thread Simon Albrecht

On 02.02.2016 08:43, Carl-Henrik Buschmann wrote:

Thank you! (Stupid brain seizing to work in the night, of course it is 
articulations...)

It did the trick but i only understand half of what's going on in what you 
wrote. In the interest of learning, would you mind to decipher or give a 
pointer where to read?


See some comments below. Other then that, I can recommend scouring the 
NR command index: 
 
(which is NR section D), or the full index (section E).





2. feb. 2016 kl. 00.42 skrev Thomas Morley :

2016-02-02 0:08 GMT+01:00 Carl-Henrik Buschmann :

I wonder how to align text and dynamics? I need it to explain a certain
action when using a certain symbol. I guess this question could be answered
several ways: 1) is it possible to write dynamic/other symbols in markup? 2)
How to gently force horizontal alignment between a dynamic/other mark and
\markup?


MWE

\version "2.19.35"

{
  c'->_\markup { \tiny \italic (stomp) }
}

{
  c'_\markup { > \tiny \italic (stomp) }
}


Carl



Hi Carl,

your examples doesn't show any dynamic but articulations, i.e. accents.

Maybe you'll find the below helpful though:

%%1 DynamicText
stompMrkp =
\markup {
  \musicglyph #"scripts.sforzato" \normal-text \vcenter \tiny \italic (stomp)
}


This defines a markup, specifying the appearance of the desired object.


stompSfz = #(make-dynamic-script stompMrkp)


This takes the markup, turns it into a dynamic script and stores the 
result in a variable, to be used in music as follows:



{
  c'-\tweak self-alignment-X #LEFT -\tweak parent-alignment-X #LEFT _\stompSfz
}

%%2 markup
{
  c'_\markup \concat {
\null
\musicglyph #"scripts.sforzato"
\hspace #0.6
\vcenter \tiny \italic (stomp)
  }
}


This uses slightly different markup formatting, and creates a TextScript 
grob instead of a DynamicText grob. This will behave differently, e.g. 
with the first approach \stompSfz will terminate an eventual (de)crescendo.


HTH, Simon

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


RE: Four Part Piano Staff

2016-02-02 Thread Mark Stephen Mrotek
Simon, 

Thank you for your reply and the suggested code. What you provide works well
with a single staff - as presented in the documentation. When inserted into
a piano staff two additional staves are included between the two piano
staves.

Mark

-Original Message-
From: Simon Albrecht [mailto:simon.albre...@mail.de] 
Sent: Tuesday, February 02, 2016 2:09 PM
To: Mark Stephen Mrotek ; 'lilypond-user'

Subject: Re: Four Part Piano Staff

On 02.02.2016 03:25, Mark Stephen Mrotek wrote:
>
> Hello,
>
> I want to make a template for a piano staff with two explicitly 
> instantiated voices (not <<{ } \\{ } >>) in each staff - this for four 
> part fugues.
>
> Any assistance in accomplishing this would be greatly appreciated.
>

To come back to your original question: how about the following?

\new Staff = "foo" <<
   \time 7/32
   \key fes \minor
   \new Voice = "soprano" { \voiceOne bisis'32.. }
   \new Voice = "alto" { \voiceTwo a'\breve }  >>

If that's not basically what you want, please be more specific.

Yours, Simon


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


Re: Four Part Piano Staff

2016-02-02 Thread Simon Albrecht

On 03.02.2016 00:09, Mark Stephen Mrotek wrote:

Thank you for your reply and the suggested code. What you provide works well
with a single staff - as presented in the documentation. When inserted into
a piano staff two additional staves are included between the two piano
staves.


You’d need to back that up with the code you used, or better, a minimal 
example. I’m having no problem with


%%
\version "2.19.35"
\new PianoStaff <<
  \new Staff = "foo" <<
\time 7/32
\key fes \minor
\new Voice = "soprano" { \voiceOne bisis'32.. }
\new Voice = "alto" { \voiceTwo a'\breve*49/64 }
  >>
  \new Staff = "bar" <<
\time 7/32
\key fes \minor
\clef bass
\new Voice = "tenor" { \voiceOne bisis32.. }
\new Voice = "bass" { \voiceTwo a\breve*49/64 }
  >>
>>
%

Best, Simon

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


Re: Sustain pedal cautionary after line break

2016-02-02 Thread Thomas Morley
2016-02-02 16:00 GMT+01:00 Pierre Perol-Schneider
:
> Hi Kieren, hi Caio et All,
>
> Here's a trial to find a workaround avoiding the use of a TextSpanner:
>
> \version "2.18.2"
>
> \relative c'' {
>   \set Staff.pedalSustainStyle = #'mixed
>   \once\override Staff.SustainPedalLineSpanner.stencil =
>  #ly:line-spanner::print
>   \once\override Staff.SustainPedalLineSpanner.left-bound-info =
>  #ly:line-spanner::calc-left-bound-info-and-text
>   \once\override Staff.SustainPedalLineSpanner.right-bound-info =
>  #ly:line-spanner::calc-right-bound-info
>   \once\override Staff.SustainPedalLineSpanner.staff-padding = #3
>   \once\override Staff.SustainPedalLineSpanner.bound-details =
>  #`((right (Y . 0)(attach-dir . -1))
> (left (attach-dir . 2)(Y . 0))
> (left-broken
>  (Y . 0)
>  (attach-dir . 1)
>  (text . ,
>#{
>  \markup
>  \normal-text
>  \whiteout
>  \pad-markup #.1
>  \concat { "(" \musicglyph #"pedal.Ped" ".) " }
>#})))
>
>   c1 c\sustainOn \break c c\sustainOff c
> }
>
> However, I tried to make a useful music function with it without success:
>
> \version "2.18.2"
>
> %% Cautionary pedal mark after a line break:
> cautionPed = \markup {
>   \normal-text
>   \whiteout
>   \pad-markup #.1
>   \concat { "(" \musicglyph #"pedal.Ped" ".) " }
> }
>
> %% Span:
> sustainPedalSpan =
> #(define-music-function (parser location music) (ly:music?)
>(let ((elts (extract-named-music music '(NoteEvent EventChord
>  (if (pair? elts)
>  (let ((first-element (first elts))
>(last-element (last elts)))

It's 'articulations not 'articulation.

>(set! (ly:music-property first-element 'articulation)
>  (cons (make-music 'SustainEvent 'span-direction -1)
>(ly:music-property first-element 'articulation)))
>(set! (ly:music-property last-element 'articulation)
>  (cons (make-music 'SustainEvent 'span-direction 1)
>(ly:music-property last-element 'articulation))
>#{

To make it work with recent devel versions you need to add
\once\override Staff.SustainPedalLineSpanner.layer = #2 %% every value
>1 will do

No idea why.
'layer is unset for SustainPedalLineSpanner in 2.18.2 _and_ 2.19.35

>   \set Staff.pedalSustainStyle = #'mixed
>   \once\override Staff.SustainPedalLineSpanner.stencil =
>  #ly:line-spanner::print
>   \once\override Staff.SustainPedalLineSpanner.left-bound-info =
>  #ly:line-spanner::calc-left-bound-info-and-text
>   \once\override Staff.SustainPedalLineSpanner.right-bound-info =
>  #ly:line-spanner::calc-right-bound-info
>   \once\override Staff.SustainPedalLineSpanner.staff-padding = #3
>   \once\override Staff.SustainPedalLineSpanner.bound-details =
>  #`((right (Y . 0)(attach-dir . -1))
> (left (attach-dir . 2)(Y . 0))
> (left-broken
>  (Y . 0)
>  (attach-dir . 1)
>  (text . ,cautionPed)))
>   $music
>   \unset Staff.pedalSustainStyle
>#})
>
> %% Syntax: \sustainPedSpan { notes }
>
> %% Test:
> \relative c'' {
>   c1 \sustainPedalSpan { c \break c c } c
> }
>
> Any idea what's wrong?
>
> Cheers,
> Pierre

Cheers,
  Harm

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


Re: Four Part Piano Staff

2016-02-02 Thread Michael Gerdau
Hi Mark,

> Thank you for your reply and the suggested code. What you provide works
> well with a single staff - as presented in the documentation. When
> inserted into a piano staff two additional staves are included between
> the two piano staves.

you should start posting the code you use together with your questions.

From your descriptions it is impossible to guess what you actually do
or what you try to achieve.

I strongly suggest to follow the guidelines given at
http://lilypond.org/doc/v2.18/Documentation/usage/troubleshooting
and
http://lilypond.org/doc/v2.18/Documentation/web/tiny-examples

HTH,
Michael
-- 
 Michael Gerdau   email: m...@qata.de
 GPG-keys available on request or at public keyserver

signature.asc
Description: This is a digitally signed message part.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Four Part Piano Staff

2016-02-02 Thread Urs Liska


Am 03.02.2016 um 00:17 schrieb Simon Albrecht:
> On 03.02.2016 00:09, Mark Stephen Mrotek wrote:
>> Thank you for your reply and the suggested code. What you provide
>> works well
>> with a single staff - as presented in the documentation. When
>> inserted into
>> a piano staff two additional staves are included between the two piano
>> staves.
>
> You’d need to back that up with the code you used, or better, a
> minimal example. I’m having no problem with
>
> %%
> \version "2.19.35"
> \new PianoStaff <<
>   \new Staff = "foo" <<
> \time 7/32
> \key fes \minor
> \new Voice = "soprano" { \voiceOne bisis'32.. }
> \new Voice = "alto" { \voiceTwo a'\breve*49/64 }
>   >>
>   \new Staff = "bar" <<
> \time 7/32
> \key fes \minor
> \clef bass
> \new Voice = "tenor" { \voiceOne bisis32.. }
> \new Voice = "bass" { \voiceTwo a\breve*49/64 }
>   >>
> >>
> %
>
> Best, Simon

Well, this is what I wanted to post as well.
But still, you should consider taking the advice of so many from us and
get friends with music variables. They really are the killer advantage
in this context ...

Urs


>
> ___
> 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: Four Part Piano Staff

2016-02-02 Thread Mark Stephen Mrotek
Michael,

Thank you for your response and suggestion. Whenever I make an inquiry I
attach a .ly file. 

Mark

-Original Message-
From: Michael Gerdau [mailto:m...@qata.de] 
Sent: Tuesday, February 02, 2016 3:17 PM
To: lilypond-user@gnu.org
Cc: Mark Stephen Mrotek 
Subject: Re: Four Part Piano Staff

Hi Mark,

> Thank you for your reply and the suggested code. What you provide 
> works well with a single staff - as presented in the documentation. 
> When inserted into a piano staff two additional staves are included 
> between the two piano staves.

you should start posting the code you use together with your questions.

>From your descriptions it is impossible to guess what you actually do or
what you try to achieve.

I strongly suggest to follow the guidelines given at
http://lilypond.org/doc/v2.18/Documentation/usage/troubleshooting
and
http://lilypond.org/doc/v2.18/Documentation/web/tiny-examples

HTH,
Michael
-- 
 Michael Gerdau   email: m...@qata.de
 GPG-keys available on request or at public keyserver


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


Re: Sustain pedal cautionary after line break

2016-02-02 Thread Trevor Daniels

Thomas Morley wrote Tuesday, February 02, 2016 11:17 PM

> To make it work with recent devel versions you need to add
> \once\override Staff.SustainPedalLineSpanner.layer = #2 %% every value
>>1 will do
> 
> No idea why.
> 'layer is unset for SustainPedalLineSpanner in 2.18.2 _and_ 2.19.35

When 'layer values are unset or all equal the depths at which overlaid grobs 
are placed is not specified.  It appears to vary pseudo-randomly and changes 
from release to release.

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


RE: Four Part Piano Staff

2016-02-02 Thread Mark Stephen Mrotek
Simon,

Thank you for your reply and the suggested code. It is exactly what I
wanted!

Mark

-Original Message-
From: Simon Albrecht [mailto:simon.albre...@mail.de] 
Sent: Tuesday, February 02, 2016 3:17 PM
To: Mark Stephen Mrotek ; 'lilypond-user'

Subject: Re: Four Part Piano Staff

On 03.02.2016 00:09, Mark Stephen Mrotek wrote:
> Thank you for your reply and the suggested code. What you provide 
> works well with a single staff - as presented in the documentation. 
> When inserted into a piano staff two additional staves are included 
> between the two piano staves.

You'd need to back that up with the code you used, or better, a minimal
example. I'm having no problem with

%%
\version "2.19.35"
\new PianoStaff <<
   \new Staff = "foo" <<
 \time 7/32
 \key fes \minor
 \new Voice = "soprano" { \voiceOne bisis'32.. }
 \new Voice = "alto" { \voiceTwo a'\breve*49/64 }
   >>
   \new Staff = "bar" <<
 \time 7/32
 \key fes \minor
 \clef bass
 \new Voice = "tenor" { \voiceOne bisis32.. }
 \new Voice = "bass" { \voiceTwo a\breve*49/64 }
   >>
 >>
%

Best, Simon


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


Re: Four Part Piano Staff

2016-02-02 Thread David Wright
On Tue 02 Feb 2016 at 15:37:29 (-0800), Mark Stephen Mrotek wrote:
> Michael,
> 
> Thank you for your response and suggestion. Whenever I make an inquiry I
> attach a .ly file. 

Your reply, quoted below, implies a question: "Why do I get two
unwanted additional staves?".

I can only hazard a guess: that you pasted Simon's:

\new Staff = "foo" <<
  \time 7/32
  \key fes \minor
  \new Voice = "soprano" { \voiceOne bisis'32.. }
  \new Voice = "alto" { \voiceTwo a'\breve }
>>

into your code at the point where you had:

% code for explicitly instantiating two voices

but posting the code _modified by the suggestions_ is what
we need.

> > Thank you for your reply and the suggested code. What you provide 
> > works well with a single staff - as presented in the documentation. 
> > When inserted into a piano staff two additional staves are included 
> > between the two piano staves.

Cheers,
David.

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


Re: D.C. al fine

2016-02-02 Thread Noeck
Dear Graham, David, all,

I never used a real repeat structure for D.C. al Fine pieces. But your
example, Graham, does it very nicely. I put it into a little function
below which makes it easy to reuse. A \repeatsegno follows the same
lines. I would consider these four versions to be standard structures:
- D.C. al Fine: A F| B -> A B A
- D.S. al Fine: A |S B F| D -> A B D B
- D.C. al Coda: A C| B |C D -> A B A D
- D.S. al Coda: A |S B C| D |C E -> A B D B E
(|S = Segno, F| = Fine, C = Coda)

I know this has been discussed before [1] and found too hard to
implement for all cases as a general repeat structure interface.
But wouldn't it make sense to include some syntactic sugar like the
function below for these standard cases? Of course in general you can do
more with Segno, Coda, Fine than just these cases. But I think it would
help quite often.

If so, could it be done with the repeat command like this?
{ \repeat capofine 2 { a } { b } }
{ a \repeat segnofine 2 { b } { d } }
{ \repeat capocoda 2 { a } { b } { d } }
{ a \repeat segnocoda 2 { b } { d } { e } }
(Names are surely debatable.)

… or alternatively have some \fine, \coda, \segno commands (as such
commands or bar lines) that print the marks and the bar lines – lacking
the possibility to unfold.

Cheers,
Joram



And here the function:

\version "2.19.21"

repeatfine =
#(define-music-function (parser location firstpart secondpart)
(ly:music? ly:music?)
   #{
 \repeat volta 2 {
   $firstpart
   \bar "|."
   \once \override Score.RehearsalMark.self-alignment-X = #RIGHT
   \mark \markup { \bold "Fine" }
 }
 \alternative {
   {
 \set Score.repeatCommands = #'((volta #f))
 $secondpart
 \bar "||"
 \once \override Score.RehearsalMark.self-alignment-X = #RIGHT
 \mark "D.C. al Fine"
   }
   { }
 }
   #})


%% example
\relative {
  \repeatfine { a'2 b c d } { d c b c }
}


[1]:
http://lilypond.1069038.n5.nabble.com/Da-Capos-Codas-and-Segnos-td112830.html

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


Re: Sustain pedal cautionary after line break

2016-02-02 Thread Pierre Perol-Schneider
Hi Kieren, hi Caio et All,

Here's a trial to find a workaround avoiding the use of a TextSpanner:

\version "2.18.2"

\relative c'' {
  \set Staff.pedalSustainStyle = #'mixed
  \once\override Staff.SustainPedalLineSpanner.stencil =
 #ly:line-spanner::print
  \once\override Staff.SustainPedalLineSpanner.left-bound-info =
 #ly:line-spanner::calc-left-bound-info-and-text
  \once\override Staff.SustainPedalLineSpanner.right-bound-info =
 #ly:line-spanner::calc-right-bound-info
  \once\override Staff.SustainPedalLineSpanner.staff-padding = #3
  \once\override Staff.SustainPedalLineSpanner.bound-details =
 #`((right (Y . 0)(attach-dir . -1))
(left (attach-dir . 2)(Y . 0))
(left-broken
 (Y . 0)
 (attach-dir . 1)
 (text . ,
   #{
 \markup
 \normal-text
 \whiteout
 \pad-markup #.1
 \concat { "(" \musicglyph #"pedal.Ped" ".) " }
   #})))

  c1 c\sustainOn \break c c\sustainOff c
}

However, I tried to make a useful music function with it without success:

\version "2.18.2"

%% Cautionary pedal mark after a line break:
cautionPed = \markup {
  \normal-text
  \whiteout
  \pad-markup #.1
  \concat { "(" \musicglyph #"pedal.Ped" ".) " }
}

%% Span:
sustainPedalSpan =
#(define-music-function (parser location music) (ly:music?)
   (let ((elts (extract-named-music music '(NoteEvent EventChord
 (if (pair? elts)
 (let ((first-element (first elts))
   (last-element (last elts)))
   (set! (ly:music-property first-element 'articulation)
 (cons (make-music 'SustainEvent 'span-direction -1)
   (ly:music-property first-element 'articulation)))
   (set! (ly:music-property last-element 'articulation)
 (cons (make-music 'SustainEvent 'span-direction 1)
   (ly:music-property last-element 'articulation))
   #{
  \set Staff.pedalSustainStyle = #'mixed
  \once\override Staff.SustainPedalLineSpanner.stencil =
 #ly:line-spanner::print
  \once\override Staff.SustainPedalLineSpanner.left-bound-info =
 #ly:line-spanner::calc-left-bound-info-and-text
  \once\override Staff.SustainPedalLineSpanner.right-bound-info =
 #ly:line-spanner::calc-right-bound-info
  \once\override Staff.SustainPedalLineSpanner.staff-padding = #3
  \once\override Staff.SustainPedalLineSpanner.bound-details =
 #`((right (Y . 0)(attach-dir . -1))
(left (attach-dir . 2)(Y . 0))
(left-broken
 (Y . 0)
 (attach-dir . 1)
 (text . ,cautionPed)))
  $music
  \unset Staff.pedalSustainStyle
   #})

%% Syntax: \sustainPedSpan { notes }

%% Test:
\relative c'' {
  c1 \sustainPedalSpan { c \break c c } c
}

Any idea what's wrong?

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


Re: D.C. al fine

2016-02-02 Thread Graham King
Joram,
I'm glad you found the snippet useful.  Maybe it will find its way into
the repository, although I don't know how to make that happen.

Thanks for the reference to the previous thread[1].  It's not hard to
see how the technique in the current thread can be extended to the
various DC/DS/Fine/Coda variants, although I confess that I might code
the harder examples in the previous thread by simply putting the A, B,
C, etc. sections into their own variables and then ordering these
appropriately (and explicitly) in the MIDI score.  We shouldn't forget,
either, that hand-engraved music sometimes produces structures the
resolution of which is ambiguous, or hideously complicated, just to save
paper and engraving costs.  Pitfalls for the performer.

Hosanna ut supra
-- Graham

On Tue, 2016-02-02 at 15:54 +0100, Noeck wrote:


> [1]:
> http://lilypond.1069038.n5.nabble.com/Da-Capos-Codas-and-Segnos-td112830.html
> 


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


Re: Passing along variable-number arguments

2016-02-02 Thread David Kastrup
Urs Liska  writes:

> Am 02.02.2016 um 00:44 schrieb David Kastrup:
>> Urs Liska  writes:
>>
>>> In this code "format" receives "fmt" (the format strings) and "vals" -
>>> the *list* of arguments.
>>> How should I modify this so "format" doesn't parenthesize the output and
>>> also works with more than one argument and placeholder in the format string?
>> (apply format fmt vals)
>>
>
> Argh, I *knew* it was that simply. I'm astonished how far I can get with
> Scheme while still falling over these basics.
> Thanks for not noticeably raising the eyebrows.

It doesn't seem that basic to some.  I've replaced dozens of instances
of what amounts to code like

(apply format (cons fmt vals))

since people did not appear to trust passing more than the final list
argument to format.

-- 
David Kastrup

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


Re: Sustain pedal cautionary after line break

2016-02-02 Thread Pierre Perol-Schneider
Hi Harm,

2016-02-03 0:17 GMT+01:00 Thomas Morley :


> It's 'articulations not 'articulation.
>
> >(set! (ly:music-property first-element 'articulation)
> >  (cons (make-music 'SustainEvent 'span-direction -1)
> >(ly:music-property first-element 'articulation)))
> >(set! (ly:music-property last-element 'articulation)
> >  (cons (make-music 'SustainEvent 'span-direction 1)
> >(ly:music-property last-element
> 'articulation))
>

 Thank you! No clue how I did that ;)...


> To make it work with recent devel versions you need to add
> \once\override Staff.SustainPedalLineSpanner.layer = #2 %% every value
> >1 will do
>

Great, thanks for the tip.

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


Re: Sustain pedal cautionary after line break

2016-02-02 Thread Pierre Perol-Schneider
Hi Trevor,
Thank you for the explanation.
Cheers,
Pierre

2016-02-03 0:37 GMT+01:00 Trevor Daniels :

>
> Thomas Morley wrote Tuesday, February 02, 2016 11:17 PM
>
> > To make it work with recent devel versions you need to add
> > \once\override Staff.SustainPedalLineSpanner.layer = #2 %% every value
> >>1 will do
> >
> > No idea why.
> > 'layer is unset for SustainPedalLineSpanner in 2.18.2 _and_ 2.19.35
>
> When 'layer values are unset or all equal the depths at which overlaid
> grobs are placed is not specified.  It appears to vary pseudo-randomly and
> changes from release to release.
>
> Trevor
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Sustain pedal cautionary after line break

2016-02-02 Thread Pierre Perol-Schneider
Added to the LSR: http://lsr.di.unimi.it/LSR/Item?id=1024
Pierre
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Removing white space from svg output

2016-02-02 Thread paul booker
Paul Morris  paulwmorris.com> writes:

> 
> > On Feb 1, 2016, at 10:15 PM, Paul Booker  homebass.net> wrote:
> > 
> > Ok, that wasn't clear, got it now, thanks
> > Works for one-line parts but also converts two line pieces to one line,
> > ignoring the \break. Can I reinstate that somehow, without the white-space?
> 
> Not with this function.  It puts everything on one line.  The
ly:one-page-breaking function should do what
> you want, but it’s still in development, not released yet.
> 
> -Paul
> ___
> lilypond-user mailing list
> lilypond-user  gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 

Thanks for your guidance. I would never have come across these new features
otherwise.
As a bonus, 

\paper
top-system-spacing=##f

resolves the mysterious extra pixel included in my script's "viewBox="0 1 w
h). Now I can reset it to 0.

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