Re: Inserting a verical space, or an empty line, between two markups attached to a note.

2018-02-27 Thread Robert Blackstone
Hi Torsten,

Thank you very much. This does help, or better, it neatly solves my problem. (I 
had never used, or even read about, "baseline-skip" so this is also a very 
useful contribution to my LilyPond education.)

In your PS you wrote that you don't know the original page layout. That is hard 
to believe, for by inserting your code into my file I do get the original page 
layout (I only slightly lowered the \vspace,  from #0.8 to #0.6 ) I included a 
picture of the original page layout in my reply to Andrew Bernard, 26-02-18.

Thanks again.

Best regards,
Robert


On 26 Feb 2018, at 20:00 , Torsten Hämmerle  wrote:

> Hi Robert,
> 
> The main problem is the baseline-skip within the columns, i.e. the lines of
> text are too far apart from each other.
> If the default skip is too wide, inserting positive \vspace can only make it
> worse (by the way, it's also possible to insert negative \vspace).
> 
> The "proper" and most natural way, however, is to adjust the baseline-skip
> at will:
> 
> Each \column (or \center-column) has a property called baseline-skip that
> can be altered by overriding its default value. I've also included two
> separate \center-columns and a \line construct in order to be able to shift
> the "Rome, Mars 1934" column slightly to the right. Just for demonstration
> purposes how these markup "boxes" can be nested and combined.
> 
> \version "2.19.81"
> 
> \markup {
>  \column {
>\override #'(baseline-skip . 2.2) \italic \center-column {
>  "m. g."
>  "dessus"
>}
>\vspace #0.8
>\line {
>  \hspace #1.2
>  \override #'(baseline-skip . 1.8) \tiny \center-column { 
>"Rome"
>\bold "Mars 1934"
>  }
>}
>  }
> }
> 
> mg-dessus.png
>   
> 
> There are two different baseline-skip values for the two boxes (Rome, Mars
> 1934 is in smaller type and requires a smaller baseline-skip).
> 
> I generally used double qoutes for text because it will be coloured as
> verbatim text in my editor and (in this case to prevent "Mars 1934" from
> begin split into two lines.
> 
> HTH
> Torsten
> 
> PS: I don't know the original page layout, but probably it would be best to
> use tagline for "Rome...", as in Noeck's proposal. But it is always
> beneficial to know about baseline-skip, anyway.
> 
> 
> 
> --
> 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


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


Re: Inserting a verical space, or an empty line, between two markups attached to a note.

2018-02-27 Thread David Wright
On Tue 27 Feb 2018 at 10:13:18 (+0100), Robert Blackstone wrote:
> Hi Torsten,
> 
> Thank you very much. This does help, or better, it neatly solves my problem. 
> (I had never used, or even read about, "baseline-skip" so this is also a very 
> useful contribution to my LilyPond education.)
> 
> In your PS you wrote that you don't know the original page layout. That is 
> hard to believe, for by inserting your code into my file I do get the 
> original page layout (I only slightly lowered the \vspace,  from #0.8 to #0.6 
> ) I included a picture of the original page layout in my reply to Andrew 
> Bernard, 26-02-18.

Perhaps when you've finished the score, you could send me a copy. I've
always been looking for a version of that piece to put in my breast pocket.

:)

Cheers,
David.

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


Re: \pralllUp inside Staff

2018-02-27 Thread Ali Cuota
Hallo Torsten,

Many thanks anyway. I am now without lilypond on the road again, but I
will try it tonight

I wish a nice day for you and everybody here,

Francois 

  http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail";
target="_blank">https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png";
alt="" width="46" height="29" style="width: 46px; height: 29px;"
/>
Libre de virus. http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail";
target="_blank" style="color: #4453ea;">www.avg.com 




2018-02-26 17:51 GMT-05:00, Torsten Hämmerle :
> Hi Francois,
>
> my previous answer probably went amiss, so the 2nd attempt...
>
>
> Ali Cuota wrote
>>  in BWV 572 (trio Sonate d-minor)
>
> Ah, I guess you mean BWV 527... ;)
>
>
> Ali Cuota wrote
>> he wants a prallUp (well I
>> understand it this way) inside the staff (see picture). I tried with
>> the 3 ways I found inside the Notation manual (\raise, \super,
>> \dir-column) (version 2.18.2) but none works.
>
> \raise and \super are markup commands.
> And,  in this case, by squeezing the prallup below the beam between the
> notes, the note spacing will be affected and you should try to set X-offset
> and Y-offset of the Script (technically, \prallup is a Script).
> In order to move the follow-up notehead a bit further away, you could use
> extra-spacing-width.
>
> In my example, I've included the complete measure and added another stave,
> just to show the correct rhythmic alignment of the resulting note columns:
>
>  \version "2.18.2"
>
>  \new PianoStaff <<
>\new Staff \relative {
>  \key d \minor
>  \time 6/8
>  d''8 ~ d32 cis b a e'16 g, g8\prall
>  \once\override Script.Y-offset = #-1.5
>  \once\override Script.X-offset = #3.2
>  \once\override Script.extra-spacing-width = #'(0 . 0.5)
>  f\prallup as
>}
>\new Staff \relative {
>  \clef bass
>  \key d \minor
>  \time 6/8
>  bes!8 g a d,8. es16 c! d |
>}
>  >>
>
> prallup-inside.png
> 
>
> HTH,
> Torsten
>
>
>
> --
> 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
>

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


Accidentals making Ties too short

2018-02-27 Thread Stefano Troncaro
Hello everyone!

I was wondering about how do you usually solve situations like the
following, where you have ties to chords and the accidentals cause the ties
to be too short (sometimes almost invisible).

\version "2.19.80"\language "english"
> %What tweaks do you apply to this situations?\relative c'' {
>   ~ }
> %I tried this but the accidentals prevent the ties from reaching the 
> noteheads\relative c'' {
>   \override TieColumn.tie-configuration = #`((-1 . ,DOWN) (-3 . ,DOWN))
>   \override Tie.minimum-length = #4
>   ~ }
>
>
Maybe one way would be to make it so that ties do not calculate collisions
with accidentals? Or making the accidentals smaller? The latter I imagine
you would do by overriding the stencil, the former I have no idea how to do.

I welcome any insight in how to deal with these situations. Thank you in
advance!
Stéfano
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


transpose to a set of pitches

2018-02-27 Thread Sirius Barras
I would like to transpose a motif (using \modalTranspose) to a _set_ of
different pitches. At the moment this is what I do:

scale = {c d e f g a b}
motif = {c' e' g' c'}
{
  \modalTranspose c e \scale \motif
  \modalTranspose c g \scale \motif
  \modalTranspose c a \scale \motif
}

How can I do something similar to this:

toPitchSet = {e g a}
scale = {c d e f g a b}
motif = {c' e' g' c'}
{
  \modalTranspose c \toPitchSet \scale \motif
}

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


Re: Inserting a verical space, or an empty line, between two markups attached to a note.

2018-02-27 Thread Robert Blackstone
Hi David,

I will send you a copy of that score, Poulenc's quatrième Nocturne. Do you want 
a pdf only or also the .ly-file ?
I also transcribed Poulenc's third Novelette and his 5th Improvisation. Would 
you also be interested in these nice pieces?

It may take a day or two to finish them.

Best regards,

Robert


On 27 Feb 2018, at 14:43 , David Wright  wrote:

> On Tue 27 Feb 2018 at 10:13:18 (+0100), Robert Blackstone wrote:
>> Hi Torsten,
>> 
>> Thank you very much. This does help, or better, it neatly solves my problem. 
>> (I had never used, or even read about, "baseline-skip" so this is also a 
>> very useful contribution to my LilyPond education.)
>> 
>> In your PS you wrote that you don't know the original page layout. That is 
>> hard to believe, for by inserting your code into my file I do get the 
>> original page layout (I only slightly lowered the \vspace,  from #0.8 to 
>> #0.6 ) I included a picture of the original page layout in my reply to 
>> Andrew Bernard, 26-02-18.
> 
> Perhaps when you've finished the score, you could send me a copy. I've
> always been looking for a version of that piece to put in my breast pocket.
> 
> :)
> 
> Cheers,
> David.


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


Re: Accidentals making Ties too short

2018-02-27 Thread Stefano Troncaro
This is what I came up with. It's kind of hacky, I would love to know a
more straightforward way. Basically, I deleted the stencil of the
Accidentals so that the Ties do not detect collisions with them, and I
"post processed" them in again after the Ties have been positioned. A
little scaling and some extra-offsets later this is the result:

> \version "2.19.80"\language "english"
> \relative c'' {
>}
> accidentalTrick =
> #(define-music-function (y-offsets) (list?)
>#{ \override NoteColumn.before-line-breaking =
>   #(lambda (note-column)
>  (let* ((noteheads (ly:grob-array->list (ly:grob-object note-column 
> 'note-heads)))
> (accidentals (filter ly:grob? (map
>   (lambda (notehead)
> (ly:grob-object notehead 'accidental-grob))
>   noteheads)))
> (accidentals-length (length accidentals))
> (y-offsets-length (length y-offsets)))
>(if (not (= accidentals-length y-offsets-length))
>(ly:warning (format "\\accidentalTrick warning: NoteColumn has 
> ~a accidentals, given list of y-offsets has ~a\n" accidentals-length 
> y-offsets-length))
>(for-each
> (lambda (accidental y-offset)
>   (let* ((orig-stil (ly:grob-property accidental 'stencil))
>  (scld-stil (ly:stencil-scale orig-stil 1 0.9)))
> (ly:grob-set-property! accidental 'stencil #f)
> (ly:grob-set-property! accidental 'after-line-breaking
>   (lambda (grob)
> (ly:grob-set-property! grob 'stencil scld-stil)
> (ly:grob-set-property! grob 'extra-offset `(-1.6 . 
> ,y-offset))
> accidentals
> y-offsets #} )
> \relative c'' {
>   \override Tie.minimum-length = 4
>   \override TieColumn.tie-configuration = #`((-3 . ,DOWN) (-1.05 . ,DOWN))
>   \override Tie.details.height-limit = 0.4
>   ~ \accidentalTrick #'(0.3 -0.25) }
>
>
Comments and/or different approaches are, as always, greatly appreciated!

2018-02-27 13:58 GMT-03:00 Stefano Troncaro :

> Hello everyone!
>
> I was wondering about how do you usually solve situations like the
> following, where you have ties to chords and the accidentals cause the ties
> to be too short (sometimes almost invisible).
>
> \version "2.19.80"\language "english"
>> %What tweaks do you apply to this situations?\relative c'' {
>>   ~ }
>> %I tried this but the accidentals prevent the ties from reaching the 
>> noteheads\relative c'' {
>>   \override TieColumn.tie-configuration = #`((-1 . ,DOWN) (-3 . ,DOWN))
>>   \override Tie.minimum-length = #4
>>   ~ }
>>
>>
> Maybe one way would be to make it so that ties do not calculate collisions
> with accidentals? Or making the accidentals smaller? The latter I imagine
> you would do by overriding the stencil, the former I have no idea how to do.
>
> I welcome any insight in how to deal with these situations. Thank you in
> advance!
> Stéfano
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: transpose to a set of pitches

2018-02-27 Thread Thomas Morley
2018-02-27 19:12 GMT+01:00 Sirius Barras :
> I would like to transpose a motif (using \modalTranspose) to a _set_ of
> different pitches. At the moment this is what I do:
>
> scale = {c d e f g a b}
> motif = {c' e' g' c'}
> {
>   \modalTranspose c e \scale \motif
>   \modalTranspose c g \scale \motif
>   \modalTranspose c a \scale \motif
> }
>
> How can I do something similar to this:
>
> toPitchSet = {e g a}
> scale = {c d e f g a b}
> motif = {c' e' g' c'}
> {
>   \modalTranspose c \toPitchSet \scale \motif
> }
>
> Many thanks, S.


How about:

\version "2.19.65"

%% Based on a function by David K
multipleModalTransposes =
#(define-music-function (parser location m scale music)
  (ly:music? ly:music? ly:music?)
  ;; If `music' is simple `SequentialMusic', we need to go for 'elements instead
  ;; of 'element. In this case we also need to "unfold" the resulting
  ;; `possible-elts' one level
  (let* ((seq-mus? (music-is-of-type? music 'sequential-music))
 (possible-elts
   (map
 (lambda (pitch)
 (ly:music-property
   #{ \modalTranspose c $pitch $scale $music #}
 (if seq-mus?
'elements
'element)))
(event-chord-pitches m

(music-clone m
  'elements
  (if seq-mus?
  (apply append '() possible-elts)
  possible-elts

toPitchSet = { e g a e b }
scale = { c d e f g a b }
motif =
  %\absolute { c' e' g' c' }
  %\relative { c' e g c, }
  %\relative c' { c e g c, }
  %\fixed c' { c e g c }
  %\context Voice { c'4 e' g' c' }
  { c'4 e' g' c' }

\multipleModalTransposes \toPitchSet \scale \motif


Cheers,
  Harm

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


Re: Accidentals making Ties too short

2018-02-27 Thread Andrew Bernard
Hi Stefano,

Am I missing something? If you set minimum tie length to say 4.5 or even
4.2  it looks fine to me.

  \override Tie.minimum-length = #4.5

Using #4 is just too short, that's all.

Given that you have gone to great effort to elaborate this in Scheme, I
fear I must be missing something in your request.

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


Re: \pralllUp inside Staff

2018-02-27 Thread Ali Cuota
Hi Torsten,

done. Again many thanks, this works perfectly.

BTW: I will publish in imslp, this seems more interesting for
everybody, than mutopia.

Francois 

  http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail";
target="_blank">https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png";
alt="" width="46" height="29" style="width: 46px; height: 29px;"
/>
Libre de virus. http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail";
target="_blank" style="color: #4453ea;">www.avg.com 




2018-02-27 11:22 GMT-05:00, Ali Cuota :
> Hallo Torsten,
>
> Many thanks anyway. I am now without lilypond on the road again, but I
> will try it tonight
>
> I wish a nice day for you and everybody here,
>
> Francois  style="border-top: 1px solid #D3D4DE;">
>   
>href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail";
> target="_blank"> src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png";
> alt="" width="46" height="29" style="width: 46px; height: 29px;"
> />
>   Libre de virus.  href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail";
> target="_blank" style="color: #4453ea;">www.avg.com   
>   
> 
>  height="1">
>
> 2018-02-26 17:51 GMT-05:00, Torsten Hämmerle :
>> Hi Francois,
>>
>> my previous answer probably went amiss, so the 2nd attempt...
>>
>>
>> Ali Cuota wrote
>>>  in BWV 572 (trio Sonate d-minor)
>>
>> Ah, I guess you mean BWV 527... ;)
>>
>>
>> Ali Cuota wrote
>>> he wants a prallUp (well I
>>> understand it this way) inside the staff (see picture). I tried with
>>> the 3 ways I found inside the Notation manual (\raise, \super,
>>> \dir-column) (version 2.18.2) but none works.
>>
>> \raise and \super are markup commands.
>> And,  in this case, by squeezing the prallup below the beam between the
>> notes, the note spacing will be affected and you should try to set
>> X-offset
>> and Y-offset of the Script (technically, \prallup is a Script).
>> In order to move the follow-up notehead a bit further away, you could use
>> extra-spacing-width.
>>
>> In my example, I've included the complete measure and added another
>> stave,
>> just to show the correct rhythmic alignment of the resulting note
>> columns:
>>
>>  \version "2.18.2"
>>
>>  \new PianoStaff <<
>>\new Staff \relative {
>>  \key d \minor
>>  \time 6/8
>>  d''8 ~ d32 cis b a e'16 g, g8\prall
>>  \once\override Script.Y-offset = #-1.5
>>  \once\override Script.X-offset = #3.2
>>  \once\override Script.extra-spacing-width = #'(0 . 0.5)
>>  f\prallup as
>>}
>>\new Staff \relative {
>>  \clef bass
>>  \key d \minor
>>  \time 6/8
>>  bes!8 g a d,8. es16 c! d |
>>}
>>  >>
>>
>> prallup-inside.png
>> 
>>
>> HTH,
>> Torsten
>>
>>
>>
>> --
>> 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
>>
>

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


Re: Multiple staffs

2018-02-27 Thread Vaughan McAlley
On 26 Feb 2018 12:28 p.m., "David Wright"  wrote:

On Sun 25 Feb 2018 at 23:27:31 (+), J Martin Rushton wrote:
> The only slight niggle is whether I can persuade Lily to
> use the full instrument names at the start of the main section rather
> than the short names.

You can use \set to change shortInstrumentName on the fly at any time.
Whatever is its value is when a new system begins is what gets written
before the staff. If you're using something like \RemoveAllEmptyStaves,
you might need a bit of trial and error to make sure you place each of
your \set shortInstrumentName declarations in the appropriate place for
the line break decisions being made by LP.

Cheers,
David.

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


If you're only changing instrumentation occasionally, the Lilypond layout
engine will happily accommodate a few explicit breaks:

\tag #'score { \set shortInstrumentName "Piccolo" \break }

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


Re: Accidentals making Ties too short

2018-02-27 Thread Stefano Troncaro
Hi Andrew,

Of course there is nothing wrong with setting the minimum length around
4.5. In this example this setting results in the Ties ending halfway
between the Noteheads, which I feel as a "loss of continuity" (for lack of
better words), and this did not leave me fully satisfied. I am aware this
is nitpicking, but this is why I was looking for an alternative.

My previous answer was not without problems however. First, the alignment
of the Accidentals to the Notes is off, which is ugly. Second, the code
lacked coherence and had hard-coded values, so it was not useful outside of
this very specific case. I tinkered with it and got rid of the misaligned
Accidentals by using whiteout in the Ties, and wrapped the whole thing in a
more flexible shell which will be useful to me in other situations.

Attached is my updated solution, hope someone finds it useful!

2018-02-27 20:04 GMT-03:00 Andrew Bernard :

> Hi Stefano,
>
> Am I missing something? If you set minimum tie length to say 4.5 or even
> 4.2  it looks fine to me.
>
>   \override Tie.minimum-length = #4.5
>
> Using #4 is just too short, that's all.
>
> Given that you have gone to great effort to elaborate this in Scheme, I
> fear I must be missing something in your request.
>
> Andrew
>
>
\version "2.19.80"
\language "english"

%%% Definitions %%%
%Predicates
#(define (proc-list? obj)
   (and (list? obj)
(every procedure? obj)))

#(define (note-column? obj)
   (and (ly:grob? obj)
(let ((name (assq-ref 
 (ly:grob-property obj 'meta) 
 'name)))
  (eq? name 'NoteColumn

%Selection functions
#(define NoteColumn->Accidentals
   (define-scheme-function (nc) (note-column?)
 (let ((noteheads (ly:grob-array->list (ly:grob-object nc 'note-heads
   (filter ly:grob? 
   (map
(lambda (notehead)
  (ly:grob-object notehead 'accidental-grob))
noteheads)

%Functions that apply to lists of grobs
#(define set::stencil->alb-phantom
   (define-scheme-function (list-of-grobs) (grob-list?)
 (for-each
  (lambda (grob)
(let ((stil (ly:grob-property grob 'stencil)))
  (ly:grob-set-property! grob 'stencil #f)
  (ly:grob-set-property! grob 'after-line-breaking
(lambda (alb-grob)
  (ly:grob-set-property! alb-grob 'stencil stil)
  list-of-grobs)))

#(define set::stencil->scale
   (define-scheme-function (x y) (number? number?)
 (define-scheme-function (list-of-grobs) (grob-list?)
   (for-each
(lambda (grob)
  (let ((stil (ly:grob-property grob 'stencil)))
(ly:grob-set-property! grob 'stencil (ly:stencil-scale stil x y
list-of-grobs

%Main function
applyTo =
#(define-music-function (blb-grob selection-proc procs-to-apply) (symbol? procedure? proc-list?)
   #{ \override $blb-grob .before-line-breaking =
  #(lambda (grob)
 (let ((selection (delete-duplicates (selection-proc grob
   (for-each
(lambda (proc)
  (proc selection))
procs-to-apply))) #} )

%%% End of definitions %%%

\relative c'' {
   
}

\relative c'' {
  \override Tie.minimum-length = 4.5
   
}

\relative c'' {
  \override Tie.minimum-length = 4.5
  \override Tie.details.height-limit = 0.5
  ~
  \override TieColumn.tie-configuration = #`((-3.05 . ,DOWN) (-1 . ,DOWN))
  
}

\relative c'' {
  \override Tie.minimum-length = 4
  \override Tie.whiteout-style = #'outline
  \override Tie.whiteout = 1.2
  ~ 
  \override TieColumn.tie-configuration = #`((-3 . ,DOWN) (-1 . ,DOWN))
  \override Accidental.extra-offset = #'(-1.5 . 0)
  \override Accidental.layer = 0
  \applyTo NoteColumn #NoteColumn->Accidentals #`(,(set::stencil->scale 0.95 0.9) ,set::stencil->alb-phantom)
  
}

\relative c'' {
  \override Tie.minimum-length = 4.5
  \override Tie.details.height-limit = 0.5
  \override Tie.whiteout-style = #'outline
  \override Tie.whiteout = 1.2
  ~
  \override TieColumn.tie-configuration = #`((-3 . ,DOWN) (-1 . ,DOWN))
  \override Accidental.extra-offset = #'(-1.5 . 0)
  \override Accidental.layer = 0
  \applyTo NoteColumn #NoteColumn->Accidentals #`(,(set::stencil->scale 0.95 0.9) ,set::stencil->alb-phantom)
  
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user