Parenthesize accidental together

2015-05-30 Thread Venus' Wink
Hi,

I'd like to output like the attachment purpose.png.
But the following simple code

\parenthesize ces''4

puts the flat symbol out of the parens (with Lilypond 2.18.2).

I think that overriding the stencil of the left paren will make it so,
but I couldn't find the name of the stencil.

Or, is there more elegant way?

Thanks
Venus' Wink


FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
family!
Visit http://www.inbox.com/photosharing to find out more!
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


RE:Arrastres: function scheme question - Built from ideas of Simon and David -- Dynamic mark at the end of a bar

2015-05-30 Thread Stephen MacNeil
the second didn't work correctly so i changed it

\version "2.18.2"

Fraction = #(cons 6 8)

Arrastres =

#(define-music-function (parser location len main grace) (number? ly:music?
ly:music?)

(_i "Create @var{grace} note(s) after a @var{main} music _expression_.")

(let ((main-length (ly:music-length main))

(fraction (ly:parser-lookup parser 'Fraction)))

(make-simultaneous-music

(list

main

(make-sequential-music

(list


 (make-music 'SkipMusic

'duration (ly:make-duration

0 0

(* (ly:moment-main-numerator main-length)

(car fraction))

(* (ly:moment-main-denominator main-length)

(cdr fraction

 #{

\once \override Flag.stroke-style = #"grace"

\once \override NoteHead.extra-spacing-width = #`(,len . 1)

#}

 (make-music

'GraceMusic

'element grace)))

#{

\glissando

#}


\relative c' { \time 2/4 dis16 fis dis b c a g \Arrastres #-3 fis c' |

2~ q4 s4 |}





but now it needs a negative number


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


Arrastres: function scheme question - Built from ideas of Simon and David -- Dynamic mark at the end of a bar

2015-05-30 Thread Stephen MacNeil
I used the first snippet posted by Simon for an Arrastres function. Then I
noticed Davids post for afterGrace so I tried my hand at that.

Both work but I have a few questions.

In the first posted by simon I did it my typical way. And it works like all
my other functions. Typically I use modified lily functions like bendAfter
(one of my favorite to use). In all cases I can't figure out how to add the
command in the function. So although it works it could be better.

Here is the code

 %%%

\version "2.18.2"

Arrastres =

#(define-music-function

(parser location len

mus note)

(number?

ly:music? ly:music?)

#{

\afterGrace

$mus

{

\once \override Flag.stroke-style = #"grace"

\once \override NoteHead.extra-spacing-width = #`(,len . 1)

s1*0 \stemUp $note

}

#})


mus = \relative c' {

\time 2/4

\key g \major

\stemDown dis16 fis dis b c a g \Arrastres #-3 fis \glissando c'8|

2

}


\score {

\mus

}

%%


My question is where do I add \glissando in the function so I don't have to
write it everytime.


The second modified from the snippet posted by David afterGrace works great
and I even got it so i don't need \glissando. But again I have questions.


Here is the code


%

\version "2.18.2"

Fraction = #(cons 6 8)

Arrastres =

#(define-music-function (parser location len main grace) (number? ly:music?
ly:music?)

(_i "Create @var{grace} note(s) after a @var{main} music _expression_.")

(let ((main-length (ly:music-length main))

(fraction (ly:parser-lookup parser 'Fraction)))

(make-simultaneous-music

(list

main

(make-sequential-music

(list


 (make-music 'SkipMusic

'duration (ly:make-duration

0 len

(* (ly:moment-main-numerator main-length)

(car fraction))

(* (ly:moment-main-denominator main-length)

(cdr fraction

 #{

\once \override Flag.stroke-style = #"grace"

#}

 (make-music

'GraceMusic

'element grace)))

#{

\glissando

#}


\relative c' {c \Arrastres #6 c e8 e}


%%%


well where to begin...


first why is Fraction = #(cons 6 8) and not Fraction = #(cons 1 1) or 2 2
etc. 6 8 seams rather small. Is it so in some cases there is not to much
space?


second

'duration (ly:make-duration

0 len

was set 0 0 ... again why. I assume the first number is notes occupied? and
the second distance. Why 0 on the second. and isn't this just a recap of
Fraction = #(cons 6 8)? or is one gliss length and the other note distance
(both having the same effect -- so make one 0 )-- i assume.


Thanks


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


Re: Center note column bug

2015-05-30 Thread David Nalesnik
Hi,

>
> El 30/05/15 a las 13:31, Thomas Morley escibió:
>
>>
>> I'd deprecate the old one!
>>
>
Well, this one doesn't have quite the same amount of testing so you'd best
keep it around!

Attached you'll find a more streamlined version.  Note that it's now an
override of PaperColumn, not NoteColumn.

(It would be nice if the measure size would actually change to accommodate
the centered object, but that seems like quite an undertaking to
implement.)

--David
\version "2.19.15"

#(define center-column
   (lambda (col)
 (let* ((left-col (ly:grob-object col 'left-neighbor))
(right-col (ly:grob-object col 'right-neighbor))
; If a column adjoining our column is a PaperColumn, ours
; is not alone in the measure.  We make no adjustments.
(alone?
 (and (eq? #t (ly:grob-property left-col 'non-musical))
  (eq? #t (ly:grob-property right-col 'non-musical)
   (if alone?
   (let* ((elts-list
   (ly:grob-array->list (ly:grob-object col 'elements)))
  (note-cols
   (filter
(lambda (elt)
  (grob::has-interface elt 'note-column-interface))
elts-list))
  (all-rests
   (map (lambda (c)
  (ly:grob-object c 'rest))
 note-cols))
  (all-rests (filter ly:grob? all-rests))
  (all-notes
   (map
(lambda (c)
  (ly:grob-object c 'note-heads))
note-cols))
  (all 
   (map (lambda (ga) 
  (if (ly:grob-array? ga)
  (ly:grob-array->list ga)
  '()))
 all-notes))
  (all (flatten-list all))
  (all (append all all-rests))
  (same-dur?
   (every (lambda (o) 
(equal?
 (ly:grob-property o 'duration-log)
 (ly:grob-property (car all)
   'duration-log)))
 all)))
 (if same-dur?
 (let* ((sys (ly:grob-system col))
(col-center (interval-center
 (ly:grob-extent col sys X)))
(left-right-X
 (cdr (ly:grob-extent left-col sys X)))
(right-left-X
 (car (ly:grob-extent right-col sys X)))
(middle-X
 (- (average left-right-X right-left-X)
   col-center)))
   (ly:grob-translate-axis! col middle-X X

centerSolitaryPaperColumn =
\override Score.PaperColumn.after-line-breaking = #center-column


global = {
  \key a \major
  \time 4/4
  \partial 4
}

pianoDerI = \relative c'' {
  \global
  \voiceOne
  a4		|
  a e' e( d8[ cis]|
  b4) cis d8[ cis] b4|
  a2\fermata r4 a|
  b cis d b	|
  
  e fis e\fermata cis|
  cis8[ d] e4 d cis8[( b])			|
  a[( b] cis4) b\fermata cis			|
  a b8[ cis] d4\fermata cis			|
  
  b cis d\fermata cis|
  b a e'4.( d8	|
  cis4) d8[ cis] b2|
  %\centerNoteColumnOn 
  a2.\fermata \bar "|."
}

pianoDerII = \relative c' {
  \global
  \voiceTwo
  fis4		|
  e8( fis gis a b4) e,|
  dis e d8 a' gis4|
  e2 r4 fis	|
  fis e8( cis) gis'( fis) e( dis)		|
  
  e[ fis16 gis a8] fis gis4 a			|
  a ais b8 a gis fis|
  e[( fis16 gis a8 fis]) gis4 a8[ gis]		|
  fis4. gis16 ais b4 ais!			|
  
  b8 a g4 fis e8 a~(|
  a gis4) fis8 gis a b4~			|
  b8 e, a4 a( gis)|
  e2.
}

pianoIzqI = \relative c' {
  \global
  \voiceOne
  cis8 d	|
  e4 d8 cis b4( a|
  b) a8 g a4 e'8 d|
  cis2 r4 a	|
  a gis b8( a) b4|
  
  b8( e4) dis8 e4 e|
  fis fis fis e	|
  e8( d cis dis) e4 e|
  d8( cis) d( e) fis4 fis8 e			|
  
  d4 e a, a	|
  b cis8 dis e2~|
  e8 cis a cis fis d b e			|
  %\centerNoteColumnOn 
  cis2.
}

pianoIzqII = \relative c {
  \global
  \voiceTwo
  fis4		|
  cis' b8 a gis4 a~|
  a8 g fis e fis d e4|
  a,2\fermata r4 d|
  dis8 e4 eis fis8 gis a			|
  
  gis e b'4 e,\fermata a8 gis			|
  fis e d cis b4 e8 d|
  cis( b a4) e'\fermata a,			|
  d8 e d cis b4\fermata fis'			|
  
  g8 fis e4 d\fermata a			|
  e'2~ e8 fis gis e|
  a gis fis e d( b e4)|
  a,2.\fermata
}

\score {
  <<
\new PianoStaff \with { instrumentName = "Piano" } <<
  \new Staff = "right" <<
\new Voice \pianoDerI
\new Voice \pianoDerII
  >>
  \new Staff = "left" <<
\clef bass 
\new Voice \pianoIzqI
\new Voice \pianoIzqII
  >>
>>
  >>
  \layout {
%ragged-last= ##t
\centerSolitaryPaperColumn
  }
}
_

Re: Change direction of already positioned markup?

2015-05-30 Thread David Kastrup
Peter Crighton  writes:

> 2015-05-30 21:50 GMT+02:00 David Kastrup :
>
>>
>> Number three:
>>
>> divisiaIII = ^\markup { "div. a 3" }
>>
>> \score {
>>   { a1_\divisiaIII }
>> }
>>
>
>
> That would still affect both editions, it wouldn’t be tweakable by the
> edition-engraver.
>
>
> In this score
>
> divisiaIII = ^\markup { "div. a 3" }
> \score {
>   { a1\divisiaIII }
> }
>
> another way would be to add an additional _\divisiaIII with the
> edition-engraver and remove/omit the markup that has been placed above the
> staff. Would that be doable? Simply adding \once \omit TextScript obviously
> also removes the _\divisiaIII.

Well, I don't really know the edition-engraver so I have to leave that
to the expertise of those who do.

-- 
David Kastrup

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


Re: A slur across a line break with change of clef in another staff generates bad output

2015-05-30 Thread Simon Albrecht

Am 30.05.2015 um 18:10 schrieb Richard Shann:

Attached is a bit of LilyPond which has a slur over a line break. At the
same moment the clef is changing in the lower staff. The result is a
horribly broken slur start in the top staff.
I blindly applied the dragging-the-shape on this curve which generated
the commented out offsets. This results in something half-way
acceptable. The bug is sensitive to all sorts of things I think - this
was the most I managed to pare it down - reducing the font size made it
go away for example.

Questions:
Is there special syntax for altering the shapes of the half-slurs at
the end and beginning of the line?

Yes, look for \alterBroken in the docs.

Is this a known bug?
Yes, or at least partly so: 
 You may 
comment in there, in case you have something to add.


Yours, Simon


Richard



___
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: Change direction of already positioned markup?

2015-05-30 Thread Peter Crighton
2015-05-30 21:50 GMT+02:00 David Kastrup :

>
> Number three:
>
> divisiaIII = ^\markup { "div. a 3" }
>
> \score {
>   { a1_\divisiaIII }
> }
>


That would still affect both editions, it wouldn’t be tweakable by the
edition-engraver.


In this score

divisiaIII = ^\markup { "div. a 3" }
\score {
  { a1\divisiaIII }
}

another way would be to add an additional _\divisiaIII with the
edition-engraver and remove/omit the markup that has been placed above the
staff. Would that be doable? Simply adding \once \omit TextScript obviously
also removes the _\divisiaIII.

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Change direction of already positioned markup?

2015-05-30 Thread Peter Crighton
2015-05-30 21:25 GMT+02:00 Thomas Morley :

> 2015-05-30 20:28 GMT+02:00 Peter Crighton :
> > Hello all,
> >
> > I have a variable divisiaIII = ^\markup { "div. a 3" } that should by
> > default appear above the staff (hence the ^). Now I need it to appear
> below
> > the staff in an instrument part edition, while it should still appear
> above
> > the staff in the full score. Both editions are made from the same input
> > files and realised with the edition-engraver.
> > Is there a way to change the direction of a markup that is already
> > positioned via the use of ^\markup or _\markup, or is there any other
> > property I could override to get the same effect? I don’t want to use
> > -\markup, as I’d like to be able to call the default direction just with
> > \divisiaIII.
>
>
> Two possibilities:
>
> \version "2.18.2"
>
> %% 1
> %% tweak has priority
> { a1-\tweak direction #DOWN ^"xy" }
>
> %% 2
> %% reset the 'direction-property
> force-text-script-down =
> #(define-music-function (parser location mus)(ly:music?)
>   (music-map
> (lambda (m)
>   (if (music-is-of-type? m 'rhythmic-event)
>   (let ((arts (ly:music-property m 'articulations)))
> (for-each
>   (lambda (e)
> (if (music-is-of-type? e 'text-script-event)
> (ly:music-set-property! e 'direction DOWN)))
>   arts)
> m)
>   m))
> mus))
>
> {
>   \force-text-script-down
>   a1^"xy"
> }
>


Unfortunately, neither seems to work in an editionMod with the
edition-engraver …

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Change direction of already positioned markup?

2015-05-30 Thread David Kastrup
Thomas Morley  writes:

> 2015-05-30 20:28 GMT+02:00 Peter Crighton :
>> Hello all,
>>
>> I have a variable divisiaIII = ^\markup { "div. a 3" } that should by
>> default appear above the staff (hence the ^). Now I need it to appear below
>> the staff in an instrument part edition, while it should still appear above
>> the staff in the full score. Both editions are made from the same input
>> files and realised with the edition-engraver.
>> Is there a way to change the direction of a markup that is already
>> positioned via the use of ^\markup or _\markup, or is there any other
>> property I could override to get the same effect? I don’t want to use
>> -\markup, as I’d like to be able to call the default direction just with
>> \divisiaIII.
>
> Two possibilities:
>
> \version "2.18.2"
>
> %% 1
> %% tweak has priority
> { a1-\tweak direction #DOWN ^"xy" }
>
> %% 2
> %% reset the 'direction-property
> force-text-script-down =
> #(define-music-function (parser location mus)(ly:music?)
>   (music-map
> (lambda (m)
>   (if (music-is-of-type? m 'rhythmic-event)
>   (let ((arts (ly:music-property m 'articulations)))
> (for-each
>   (lambda (e)
> (if (music-is-of-type? e 'text-script-event)
> (ly:music-set-property! e 'direction DOWN)))
>   arts)
> m)
>   m))
> mus))
>
> {
>   \force-text-script-down
>   a1^"xy"
> }

Number three:

divisiaIII = ^\markup { "div. a 3" }

\score {
  { a1_\divisiaIII }
}

-- 
David Kastrup


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


Re: Change direction of already positioned markup?

2015-05-30 Thread Thomas Morley
2015-05-30 20:28 GMT+02:00 Peter Crighton :
> Hello all,
>
> I have a variable divisiaIII = ^\markup { "div. a 3" } that should by
> default appear above the staff (hence the ^). Now I need it to appear below
> the staff in an instrument part edition, while it should still appear above
> the staff in the full score. Both editions are made from the same input
> files and realised with the edition-engraver.
> Is there a way to change the direction of a markup that is already
> positioned via the use of ^\markup or _\markup, or is there any other
> property I could override to get the same effect? I don’t want to use
> -\markup, as I’d like to be able to call the default direction just with
> \divisiaIII.
>
> --
> Peter Crighton | Musician & Music Engraver based in Mainz, Germany
> http://www.petercrighton.de
>



Two possibilities:

\version "2.18.2"

%% 1
%% tweak has priority
{ a1-\tweak direction #DOWN ^"xy" }

%% 2
%% reset the 'direction-property
force-text-script-down =
#(define-music-function (parser location mus)(ly:music?)
  (music-map
(lambda (m)
  (if (music-is-of-type? m 'rhythmic-event)
  (let ((arts (ly:music-property m 'articulations)))
(for-each
  (lambda (e)
(if (music-is-of-type? e 'text-script-event)
(ly:music-set-property! e 'direction DOWN)))
  arts)
m)
  m))
mus))

{
  \force-text-script-down
  a1^"xy"
}


HTH,
  Harm

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


Re: Center note column bug

2015-05-30 Thread Víctor

Thank you both for your answers, I'll see to update to David's solution.

Regards. Víctor.

El 30/05/15 a las 13:31, Thomas Morley escibió:

2015-05-30 19:17 GMT+02:00 David Nalesnik :

Hi Victor,

On Fri, May 29, 2015 at 5:34 PM, Víctor  wrote:

I've been using "center note column" function written by Thomas Morley,
for some time now, and today I've spotted a bug. Notice the position of the
dots in the last measure.

I hope this can be fixed.
Regards. Víctor.


I don't have a fix for the function you're using,

The original function filters 'all-elements from system, filtering
those for certain grobs under certain conditions. Those grobs are
translated.

In case of two voices per Staff this is done for the note-heads (or
event-chords) of both voices, meaning: the dot-column is found twice
and translated twice! Same for accidental-placement.
Whereas every note-head (or event-chord) is found once and translated only once.

It may be doable to fix this, though, why?

David's function is much better.
Thanks a lot for it !!

I'd deprecate the old one!

Cheers,
   Harm


but trying the alternate
routine here

gets good results.  (See attached.)

Best,
David


___
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: Center note column bug

2015-05-30 Thread Thomas Morley
2015-05-30 19:17 GMT+02:00 David Nalesnik :
> Hi Victor,
>
> On Fri, May 29, 2015 at 5:34 PM, Víctor  wrote:
>>
>> I've been using "center note column" function written by Thomas Morley,
>> for some time now, and today I've spotted a bug. Notice the position of the
>> dots in the last measure.
>>
>> I hope this can be fixed.
>> Regards. Víctor.
>>
>
> I don't have a fix for the function you're using,

The original function filters 'all-elements from system, filtering
those for certain grobs under certain conditions. Those grobs are
translated.

In case of two voices per Staff this is done for the note-heads (or
event-chords) of both voices, meaning: the dot-column is found twice
and translated twice! Same for accidental-placement.
Whereas every note-head (or event-chord) is found once and translated only once.

It may be doable to fix this, though, why?

David's function is much better.
Thanks a lot for it !!

I'd deprecate the old one!

Cheers,
  Harm

> but trying the alternate
> routine here
> 
> gets good results.  (See attached.)
>
> Best,
> David
>
>
> ___
> 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


Change direction of already positioned markup?

2015-05-30 Thread Peter Crighton
Hello all,

I have a variable divisiaIII = ^\markup { "div. a 3" } that should by
default appear above the staff (hence the ^). Now I need it to appear below
the staff in an instrument part edition, while it should still appear above
the staff in the full score. Both editions are made from the same input
files and realised with the edition-engraver.
Is there a way to change the direction of a markup that is already
positioned via the use of ^\markup or _\markup, or is there any other
property I could override to get the same effect? I don’t want to use
-\markup, as I’d like to be able to call the default direction just with
\divisiaIII.

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: A slur across a line break with change of clef in another staff generates bad output

2015-05-30 Thread Richard Shann
On Sat, 2015-05-30 at 09:46 -0700, Mark Stephen Mrotek wrote:
> Richard,
> 
> Tried putting the "\clef treble" before the a8.

yes, it is fairly sensitive to minor changes... 
I think I have found the answer to my other question - the manual says
that \shape can take a list of two sets of displacements.

 \shape #'((0.0 . 0.0) (1 . 1.2) (3 . 1.2) (4 . 1) ()) Slur

Richard

>  Looks good to me, yet I do not know what other constraints you have.
> 
> Mark
> 
> -Original Message-
> From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org 
> [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of 
> Richard Shann
> Sent: Saturday, May 30, 2015 9:11 AM
> To: lilypond-user@gnu.org
> Subject: A slur across a line break with change of clef in another staff 
> generates bad output
> 
> Attached is a bit of LilyPond which has a slur over a line break. At the same 
> moment the clef is changing in the lower staff. The result is a horribly 
> broken slur start in the top staff.
> I blindly applied the dragging-the-shape on this curve which generated the 
> commented out offsets. This results in something half-way acceptable. The bug 
> is sensitive to all sorts of things I think - this was the most I managed to 
> pare it down - reducing the font size made it go away for example.
> 
> Questions:
>   Is there special syntax for altering the shapes of the half-slurs at 
> the end and beginning of the line?
>   Is this a known bug?
> 
> Richard
> 
> 



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


Re: Color note heads outside nominal instrument range

2015-05-30 Thread David Nalesnik
Hi,

Am 30.05.2015 um 12:38 schrieb Peter Gentry:
>
>>
>> FWIW
>>
>> I have attached a slightly simplified and better version of
>> instrument_ranges.ly
>>
>
>>
Have you seen http://lsr.di.unimi.it/LSR/Item?id=773?

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


Re: Center note column bug

2015-05-30 Thread David Nalesnik
Hi Victor,

On Fri, May 29, 2015 at 5:34 PM, Víctor  wrote:

> I've been using "center note column" function written by Thomas Morley,
> for some time now, and today I've spotted a bug. Notice the position of the
> dots in the last measure.
>
> I hope this can be fixed.
> Regards. Víctor.
>
>
I don't have a fix for the function you're using, but trying the alternate
routine here <
http://www.mail-archive.com/lilypond-user%40gnu.org/msg99927.html>
gets good results.  (See attached.)

Best,
David
\version "2.19.15"

#(define center-column
   (lambda (grob)
 (if (grob::has-interface grob 'note-column-interface)
 (let* ((col (ly:item-get-column grob))
(sys (ly:grob-system col))
(all-cols
 (ly:grob-array->list
  (ly:grob-object sys 'columns)))
(measure-no
 (car (ly:grob-property col 'rhythmic-location)))
; we need to find out if there is another
; PaperColumn in the measure.  If there is,
; we make no adjustments.
(in-company?
 ; is there a column...
 (any
  (lambda (c)
(and
 ; which is NOT our column...
 (not (eq? col c))
 ; which is a PaperColumn...
 (not (eq? #t (ly:grob-property c 'non-musical)))
 ; which is in the same measure
 (eq?
  (car (ly:grob-property c 'rhythmic-location))
  measure-no)))
  all-cols))
(alone? (not in-company?))) ; :)
   (if alone?
   (let* ((left-col (ly:grob-object col 'left-neighbor))
  (right-col (ly:grob-object col 'right-neighbor))
  ;(measure-len (ly:grob-property left-col 'measure-length))
  (elts-list
   (ly:grob-array->list (ly:grob-object col 'elements)))
  (note-cols
   (filter
(lambda (elt)
  (grob::has-interface elt 'note-column-interface))
elts-list))
  (all-rests
   (map (lambda (c)
  (ly:grob-object c 'rest))
 note-cols))
  (all-rests (filter ly:grob? all-rests))
  (all-notes
   (map
(lambda (c)
  (ly:grob-object c 'note-heads))
note-cols))
  (all 
   (map (lambda (ga) 
  (if (ly:grob-array? ga)
  (ly:grob-array->list ga)
  '()))
 all-notes))
  (all (flatten-list all))
  (all (append all all-rests))
  (same-dur?
   (every (lambda (o) 
(equal?
 (ly:grob-property o 'duration-log)
 (ly:grob-property (car all)
   'duration-log)))
 all)))
 (if same-dur?
 (let* ((col-center (interval-center
 (ly:grob-extent col sys X)))
(left-right-X
 (cdr (ly:grob-extent left-col sys X)))
(right-left-X
 (car (ly:grob-extent right-col sys X)))
(middle-X
 (- (average left-right-X right-left-X)
   col-center)))
   (ly:grob-translate-axis! col middle-X X))
 ;; do nothing if override applied to something other
 ;; than NoteColumn
 '()
 )))


global = {
  \key a \major
  \time 4/4
  \partial 4
}

pianoDerI = \relative c'' {
  \global
  \voiceOne
  a4		|
  a e' e( d8[ cis]|
  b4) cis d8[ cis] b4|
  a2\fermata r4 a|
  b cis d b	|
  
  e fis e\fermata cis|
  cis8[ d] e4 d cis8[( b])			|
  a[( b] cis4) b\fermata cis			|
  a b8[ cis] d4\fermata cis			|
  
  b cis d\fermata cis|
  b a e'4.( d8	|
  cis4) d8[ cis] b2|
  %\centerNoteColumnOn 
  a2.\fermata \bar "|."
}

pianoDerII = \relative c' {
  \global
  \voiceTwo
  fis4		|
  e8( fis gis a b4) e,|
  dis e d8 a' gis4|
  e2 r4 fis	|
  fis e8( cis) gis'( fis) e( dis)		|
  
  e[ fis16 gis a8] fis gis4 a			|
  a ais b8 a gis fis|
  e[( fis16 gis a8 fis]) gis4 a8[ gis]		|
  fis4. gis16 ais b4 ais!			|
  
  b8 a g4 fis e8 a~(|
  a gis4) fis8 gis a b4~			|
  b8 e, a4 a( gis)|
  e2.
}

pianoIzqI = \relative c' {
  \global
  \voiceOne
  cis8 d

Re: A slur across a line break with change of clef in another staff generates bad output

2015-05-30 Thread Richard Shann
On Sat, 2015-05-30 at 12:26 -0400, Kieren MacMillan wrote:
> Hi Richard,
> 
> > Is this a known bug?
> 
> I don’t know for sure… but in my current score, end-of-system clefs are 
> causing a lot of problems 

right - in fact I guess you could say there are two bad things that the
end of system clef has caused here, the (badly truncated) slur in the
top part and the (rather short) slur in the other part.

Richard



> (e.g., collisions with BreathingSign, spacing oddities), so Lily isn’t quite 
> Doing The Right Thing™ in there.
> 
> Perhaps after my current pressures are off, I will build a test file and 
> submit a bug report highlighting what needs to be addressed w.r.t. clef 
> changes.
> 
> 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: A slur across a line break with change of clef in another staff generates bad output

2015-05-30 Thread Mark Stephen Mrotek
Richard,

Tried putting the "\clef treble" before the a8. Looks good to me, yet I do not 
know what other constraints you have.

Mark

-Original Message-
From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org 
[mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of 
Richard Shann
Sent: Saturday, May 30, 2015 9:11 AM
To: lilypond-user@gnu.org
Subject: A slur across a line break with change of clef in another staff 
generates bad output

Attached is a bit of LilyPond which has a slur over a line break. At the same 
moment the clef is changing in the lower staff. The result is a horribly broken 
slur start in the top staff.
I blindly applied the dragging-the-shape on this curve which generated the 
commented out offsets. This results in something half-way acceptable. The bug 
is sensitive to all sorts of things I think - this was the most I managed to 
pare it down - reducing the font size made it go away for example.

Questions:
Is there special syntax for altering the shapes of the half-slurs at 
the end and beginning of the line?
Is this a known bug?

Richard



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


Re: A slur across a line break with change of clef in another staff generates bad output

2015-05-30 Thread Kieren MacMillan
Hi Richard,

> Is this a known bug?

I don’t know for sure… but in my current score, end-of-system clefs are causing 
a lot of problems (e.g., collisions with BreathingSign, spacing oddities), so 
Lily isn’t quite Doing The Right Thing™ in there.

Perhaps after my current pressures are off, I will build a test file and submit 
a bug report highlighting what needs to be addressed w.r.t. clef changes.

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


A slur across a line break with change of clef in another staff generates bad output

2015-05-30 Thread Richard Shann
Attached is a bit of LilyPond which has a slur over a line break. At the
same moment the clef is changing in the lower staff. The result is a
horribly broken slur start in the top staff.
I blindly applied the dragging-the-shape on this curve which generated
the commented out offsets. This results in something half-way
acceptable. The bug is sensitive to all sorts of things I think - this
was the most I managed to pare it down - reducing the font size made it
go away for example.

Questions:
Is there special syntax for altering the shapes of the half-slurs at
the end and beginning of the line?
Is this a known bug?

Richard


\version "2.18.0"

MvmntIVoiceI = {
 d''8 d''8 d''8 d'' d''16( e'' fis'' e'' d''8) d''16( e''
 fis''8) fis''8 fis''8 fis''8 fis''16( g'' a'' g'' fis''8) 
 %{ \once \override Slur
  #'control-points = #'((0.2 . 3.04) (1.88 . 4.95) (4.67 . 5.3) (6.36 . 4.9)) %}
 fis''16( g''
 \break a''8) a''8 a''8 a''8 a''4. d'''8
 a''8 fis''8 r8 d''' a''8 fis''8 r8 a'' 
}


MvmntIVoiceII = {
 s1*4/4  \skip 4 \skip 2 \skip 8 a8(
 \clef treble d') 8 8 8 \skip 2
 s1*4/4 }

\layout {indent = 0.0}
#(set-default-paper-size "a4")
#(set-global-staff-size 26)


\score { %Start of Movement
 
 \new PianoStaff 
 << 

   %Start of Staff
   \new Staff = "RH"  << 
 \new Voice = "VoiceIMvmntI"  { 
   
   \MvmntIVoiceI} %End of voice
 
   >>

   \new Staff = "LH"  << 
 \new Voice = "VoiceIIMvmntI"  { 
   \clef bass 
   
   \MvmntIVoiceII} %End of voice
 
   >>
%End of Staff
 >>

} %End of Movement



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


Re: Fedora issues

2015-05-30 Thread Kevin Barry
I am on fedora 22 and the current stable version of lilypond (2.18.2) is
working fine on my scores. I don't normally use unstable versions; should I
be concerned?

Kevin

On Sat, May 30, 2015 at 12:08 PM, Andrew Bernard 
wrote:

> Greetings all,
>
> On Fedora 21 and the recently released Fedora 22, lilypond 2.19.21 crashes
> on my complex score with the following verbose output:
>
> Drawing systems...lilypond:
> /home/gub/NewGub/gub/target/linux-64/src/lilypond-git.sv.gnu.org--lilypond.git-release-unstable/flower/include/interval.hh:226:
> T Interval_t::center() const [with T = double]: Assertion `!is_empty ()'
> failed.
> Aborted (core dumped)
>
> There is no indication of where this error is being thrown, so I am at a
> loss to know how to localise this issue in order to submit a bug report. I
> am unbale to release the score due to IP issues, and that fact that it is a
> contemporary work in progress.
>
> This is from the the 2.19.21 release downloaded from lilypond.org. The
> same happens with a locally compiled build.
>
> Should lilypond users simply abandon Fedora forever? [I ask this in all
> seriousness.]
>
> Andrew
>
>
>
> ___
> 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: Color note heads outside nominal instrument range

2015-05-30 Thread Marc Hohl

Am 30.05.2015 um 12:38 schrieb Peter Gentry:


FWIW

I have attached a slightly simplified and better version of instrument_ranges.ly


I haven't tested your code, but I like the idea of defining 
instrument-specific tonal ranges quite a lot!


Some ideas/proposals:

1)
Can you store the tone range for each instrument in an alist?

(define range-alist
 '((
  ("clarinet" . ( -10 . 34 ))
  ("bass-clarinet-c" . ( ...
)))

or even better, use pitches? You can extract upper and lower bounds
from this alist and don't have to write a conditional check for
each instrument.

2)
IIUC, the line
(if (or ( > op 34) (< op -10) ) (begin (set! o (+ o 1))) ))

adds one octave to the pitch if the note is lower than the lowest
possible note OR higher than the highest possible note?
The latter doesn't seem quite right to me ;-)

(and (< op -10)
 (set! o (+ o 1)))
(and (> op 34)
 (set! o (- o 1)))

seems to do the trick (untested).

Apart from that, such a function is a valuable extension for lilypond IMHO.

Cheers,

Marc




regards
Peter Gentry



___
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


Fedora issues

2015-05-30 Thread Andrew Bernard
Greetings all,

On Fedora 21 and the recently released Fedora 22, lilypond 2.19.21 crashes
on my complex score with the following verbose output:

Drawing systems...lilypond:
/home/gub/NewGub/gub/target/linux-64/src/lilypond-git.sv.gnu.org--lilypond.git-release-unstable/flower/include/interval.hh:226:
T Interval_t::center() const [with T = double]: Assertion `!is_empty ()'
failed.
Aborted (core dumped)

There is no indication of where this error is being thrown, so I am at a
loss to know how to localise this issue in order to submit a bug report. I
am unbale to release the score due to IP issues, and that fact that it is a
contemporary work in progress.

This is from the the 2.19.21 release downloaded from lilypond.org. The same
happens with a locally compiled build.

Should lilypond users simply abandon Fedora forever? [I ask this in all
seriousness.]

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


RE:Color note heads outside nominal instrument range

2015-05-30 Thread Peter Gentry

FWIW

I have attached a slightly simplified and better version of instrument_ranges.ly

regards
Peter Gentry 

\version "2.19.15"
% -
% include function file instrument_ranges.ly
% usuage include --> \include "./ranges/instrument_ranges.ly"
% usuage call -->   \naturalizeInstrumentRange "instrument" music
% this function will confine all pitches to the individual instruments range
% Note the ranges refer to music transposed for each instrument not the true pitches.
% use % for comment outside scheme function -  use ; inside scheme functions
% -

#(define (naturalize-instrument-range p instrument ) 
  (let ((o (ly:pitch-octave p))
  (a (* 4 (ly:pitch-alteration p)))
;; alteration, a, in quarter tone steps, for historical reasons
  (n (ly:pitch-notename p)))

(define op (+ (+ (+ (* 14 o) ) (* n 2) ) (/ a 2)))

(cond
 ;; clarinet range e to f'  -1 2 0  to 1 3 0  (-10 to 34)

((equal? instrument "clarinet" )
(if (or ( > op 34) (< op -10) ) (begin (set! o (+ o 1))) ))

; bass clarinet range eb to f'  -1 1 2  (-1 2 -2)  to 1 3 0 (-11 to34)

   ((equal? instrument "bass clarinet eb" )
(if (or ( > op 34) (< op -11) ) (begin (set! o (+ o 1))) ))
 
; bass clarinet range c to f'  -1 1 2  (-1 2 -2)  to 1 3 0 (-11 to34)

((equal? instrument "bass clarinet c" )
(if (or ( > op 34) (< op -14) ) (begin (set! o (+ o 1))) ))
 
;; flute range c to f'  0 0 0   to 1 3 0  (0 to 34)

((equal? instrument "flute")
 (if (or ( > op 34) (< op 0) ) (begin (set! o (+ o 1))) ))
 
;; alto range c to f'  1 0 0   to 1 3 0

 ((equal? instrument "alto")
 (if (or ( > op 34) (< op 0) ) (begin (set! o (+ o 1))) ))
)

(ly:make-pitch o n (/ a 4)) 

))
 
% -
% a variable for the notehaed color on pitch change
% -

my-color = #(x11-color 'red)
 
% -
% this function rebuilds the music object optionally changing pitch and notehead color
% -
#(define (instrumentrange music instrument ) 
   (  ly:music? string? ) 
; extract the various portions of the music object
(let ((es (ly:music-property music 'elements))  
   (e   (ly:music-property music 'element)) 
   (p   (ly:music-property music 'pitch)))
 
; rebuild any 'elements unchanged
(if (pair? es)
   (ly:music-set-property! music 'elements
   (map (lambda (x) (instrumentrange x instrument)) es)))  

; rebuild any 'element unchanged
 (if (ly:music? e) (ly:music-set-property! music 'element
(instrumentrange e instrument )))

;rebuild the pitch and if a changed pitch add the color tweak
(if (ly:pitch? p)
  (let ((new-pitch (naturalize-instrument-range p instrument)))
  (ly:music-set-property! music 'pitch new-pitch)
  (if (and (not (equal? p new-pitch)) (color? my-color))
  (ly:music-set-property! music 'tweaks
  (acons
'color my-color
   (ly:music-property music 'tweaks))

 music))
 
% -
% the Lily file calling function \naturalizeInstrumentRange  "clarinet"  followed by sequential music
% -
naturalizeInstrumentRange =
#(define-music-function (parser location  instrument m ) 
  ( string? ly:music? )  
  (instrumentrange m instrument ))
 
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Is Sibelius really as bad as this?

2015-05-30 Thread Helge Kruse
Am 29.05.2015 um 10:29 schrieb Urs Liska:
> This is correct. From my own experience and comments by others most
> (major) publishers require you to submit one of the following:;
> - Finale files
> - Sibelius files
> - SCORE files
> - PDF
> 
>> How can this be?
> 
> Good question.
> Has to be put also the other way round: How can it be that practically
> noone accepts LilyPond yet? It can't be the text approach alone,
> otherwise they wouldn't use SCORE (and sometimes even Amadeus which is
> very similar to LilyPond in a way).

Well we shouldn't forget that you don't need only a program that
generates a good output. You also need employees who can get all the
benefits of that program. The learning curve is a hurdle. The other
programs are available, the staff is experienced.

If they have to issue a new version in a different paper format (e.g.
European vs. American market) they have to modify the files. If they
change the format of the copyright or any corporate identity they have
to modify. That's impossible with PDF, so it would be surprise if they
accept them. But if you have
- employees experienced with a limited set of programs
- tools and libraries built in-house for that programs
- work instructions for specific jobs to make modifications
then it can be an additional risk to add a new program.

We love Lilypond & Frescobaldi but it can be a challenge to convince
publishers tat just got a dozen of well typeset scores. They must learn
that their business get benefits. It could help if the experiences that
Urs learned with "Das Trunkne Lied" is consolidated and documented. The
approach to divers the job, edit only a chunk at a time and so on can
reduce the time effort that's necessary to issue the scores.

Publishers make that job to pay the salary at the end of the month. They
also issue scores of wonderful music to enjoy use. But the employees
stay there because the get money.

Best regards
Helge

-- 
PGP Fingerprint: EDCE F8C8 B727 6CC5 7006 05C1 BD3F EADC 8922 1F61



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