Re: Notehead Position

2017-12-29 Thread Andrew Bernard
Hi Dave,

Here is my code for centering notes in a bar. It's based on work by David
Nalesnik and Thomas Morley, to whom many thanks.

Works for 2.19.80. Not for 2.18.

Andrew


% Thanks to David Nalesnik and Thomas Morley.

#(define (sort-by-X-coord sys grob-lst)
   "Arranges a list of grobs in ascending order by their X-coordinates"
   (let* ((X-coord (lambda (x) (ly:grob-relative-coordinate x sys X)))
  (comparator (lambda (p q) (< (X-coord p) (X-coord q)

 (sort grob-lst comparator)))

#(define (find-bounding-grobs note-column grob-lst)
   (let* ((sys (ly:grob-system note-column))
  (X-coord (lambda (n) (ly:grob-relative-coordinate n sys X)))
  (note-column-X (X-coord note-column)))

 (define (helper lst)
   (if (and (< (X-coord (car lst)) note-column-X)
(> (X-coord (cadr lst)) note-column-X))
   (cons (car lst) (cadr lst))
   (if (null? (cddr lst))
   (cons note-column note-column)
   (helper (cdr lst)

 (helper grob-lst)))

#(define (read-out ls1 ls2 ls3 symbol)
   "Filters all elements of ls1 from ls2 and appends it to ls3"
   (set! ls3 (append ls3 (filter (lambda (x) (eq? (car ls1) (symbol x)))
ls2)))
   (if (null? (cdr ls1))
   ls3
   (read-out (cdr ls1) ls2 ls3 symbol)))

#(define ((center-note-column x-offs) grob)
   (let* ((sys (ly:grob-system grob))
  (elements-lst (ly:grob-array->list (ly:grob-object sys
'all-elements)))
  (grob-name (lambda (x) (assq-ref (ly:grob-property x 'meta)
'name)))
  (X-extent (lambda (q) (ly:grob-extent q sys X)))
  ;; NoteColumn
  (note-column-coord (ly:grob-relative-coordinate grob sys X))
  (grob-ext (X-extent grob))
  (grob-length (interval-length grob-ext))
  ;; NoteHeads
  (note-heads (ly:grob-object grob 'note-heads))
  (note-heads-grobs (if (not (null? note-heads))
(ly:grob-array->list note-heads)
'()))
  (one-note-head (if (not (null? note-heads-grobs))
 (car note-heads-grobs)
 '()))
  (one-note-head-length (if (not (null? one-note-head))
(interval-length (X-extent
one-note-head)) ;; NB
0))
  ;; Stem
  (stem (ly:grob-object grob 'stem))
  (stem-dir (ly:grob-property stem 'direction))
  (stem-length-x (interval-length (X-extent stem))) ;; NB
  ;; DotColumn
  (dot-column (ly:note-column-dot-column grob))
  ;; AccidentalPlacement
  (accidental-placement (ly:note-column-accidentals grob))
  ;; Arpeggio
  (arpeggio (ly:grob-object grob 'arpeggio))
  ;; Rest
  (rest (ly:grob-object grob 'rest))
  ;; Grobs to center between
  (args (list 'BarLine
  'Clef
  'KeySignature
  'KeyCancellation
  'TimeSignature))
  (grob-lst (read-out args elements-lst '() grob-name))
  (new-grob-lst (remove (lambda (x) (interval-empty? (X-extent x)))
grob-lst))
  (sorted-grob-lst (sort-by-X-coord sys new-grob-lst))
  ;; Bounds
  (bounds (find-bounding-grobs grob sorted-grob-lst))
  (left (cdr (X-extent (car bounds
  (right (car (X-extent (cdr bounds

  ;;(bounds-coord (cons left right)) ;; delete

  (basic-offset
   (- (average left right)
 (interval-center (X-extent grob))
 (* -1 x-offs)))
  (dir-correction
   (if (> grob-length one-note-head-length)
   (* stem-dir (* -2 stem-length-x) grob-length)
   0))

  ) ;; End of Defs in let*

 ;; Calculation
 (begin
  ;;(display "\n\tbounds: \t")(write bounds)
  (for-each
   (lambda (x)
 (cond ((ly:grob? x)
(ly:grob-translate-axis!
 x
 (- basic-offset dir-correction)
 X
   (list
(cond ((not (null? note-heads)) grob))
dot-column accidental-placement arpeggio rest))
  )))

centerNoteColumnOn = \override Staff.NoteColumn #'after-line-breaking =
#(center-note-column 0)

centerNoteColumnOff = \revert Staff.NoteColumn #'after-line-breaking

onceCenterNoteColumn =
#(define-music-function (x-offs)(number?)
   #{
 \once \override Staff.NoteColumn #'after-line-breaking =
#(center-note-column x-offs)
   #})



On 30 December 2017 at 00:37, Dave Higgins  wrote:

> Is there a way to center a whole notehead in the bar?
>
> << { c'1 } \new Dynamics { \override Hairpin #'minimum-length = #8 s8\> s
> s s s\p\< s s s\! } >>
>
> I know I could use silence and fractional note lengths, but that seems
> sloppy.
>
> Also, why doesn't R1*1 work like R1*2 (by putting the 2 in position over
> the 

Re: Notehead Position

2017-12-29 Thread Andrew Bernard
Hi All,

It's clear to me he just wants the note in the middle. I use this a lot for
18C music, and contemporary music. I have a nice generalised function to do
this, but I will have to wait a bit to post as my machine is undergoing a
complete rebuild. Stand by!

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


Re: Notehead Position

2017-12-29 Thread Ben

On 12/29/2017 8:37 AM, Dave Higgins wrote:

Is there a way to center a whole notehead in the bar?

<< { c'1 } \new Dynamics { \override Hairpin #'minimum-length = #8 
s8\> s s s s\p\< s s s\! } >>


I know I could use silence and fractional note lengths, but that seems 
sloppy.


Also, why doesn't R1*1 work like R1*2 (by putting the 2 in position 
over the rest)? (rhetorical)  Yes, I have a solution for this too, but 
again, sloppy.


I'm confused as to what you want the final result to be, but as far as 
just centering a note, you could always do something like this:


\version "2.19.80"

{ c'1
  \once \override NoteColumn.X-offset = #3
  c'1
  c''
  c''
   }


That will indeed place the whole note 'centered' in the bar, see attached.

Can you describe what you're looking for in more detail please?

Thanks!


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


Re: Change the text within a volta

2017-12-29 Thread Wols Lists
On 29/12/17 22:32, nokel81 wrote:
> Yes, I tried using the raw tag, I guess it didn't work.
> 
> \omit Score.BarLine
> \repeat volta 3 {}
> \alternative {
>   {}
>   {
>   \undo \omit Score.BarLine
>   \bar "|"
>   f2
>   \bar "|"
>   }
>   {
>   f4( ees c) ees ees( f) f2 f
>   }
> }
> 
Not a minimal example, it won't compile on its own, but I think this
does what you're after. I have a couple of voltae, and there's different
text for them.

voiceMarkup =  {
s1*4 \bar "||" \mark \markup { \musicglyph #"scripts.segno" }
s1*15

\override Staff.VoltaBracket #'font-name = #"sans"
\set Score.repeatCommands = #'((volta "No repeat"))
{ s1 \bar "||" }
\set Score.repeatCommands = #'((volta #f) \text (volta "To Trio")
end-repeat)
{ s1 \bar "||" \mark \markup { \musicglyph #"scripts.ufermata" } }
\set Score.repeatCommands = #'((volta #f))

s1*16
{ \mark \markup { \musicglyph #"scripts.segno" } } \noBreak
\stopStaff \cadenzaOn s32 _\markup { \right-align "D.S. al Trio" }
s2 \cadenzaOff \startStaff
{ \mark \markup { "Trio" } }
s1*4 \bar "||"
s1*16
\repeat volta 2 {
s1*15 } \alternative { { s1 } { s1 _\markup { "D.C." } } }
}

Cheers,
Wol


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


Re: Change the text within a volta

2017-12-29 Thread nokel81
Yes, I tried using the raw tag, I guess it didn't work.

\omit Score.BarLine
\repeat volta 3 {}
\alternative {
{}
{
\undo \omit Score.BarLine
\bar "|"
f2
\bar "|"
}
{
f4( ees c) ees ees( f) f2 f
}
}



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

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


Re: Change the text within a volta

2017-12-29 Thread David Nalesnik
Hi,

On Fri, Dec 29, 2017 at 12:16 PM, nokel81  wrote:
> I currently have the following:
>

I see nothing here.  Could you include a short code example?

Thanks,
David

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


Re: include puzzlement

2017-12-29 Thread David Kastrup
Shane Brandes  writes:

> Thanks all, and Kieran that pattern will definitely work for future
> projects. Unfortunately that leaves me with unwinding, separating the
> music from the score definitions,  200 some such files for a current
> one to get it to work. I had anticipated that the whole bookpart thing
> simply encapsulated that bit of information in its own little section
> and would therefore work. That probably has to do with the idea that
> some years ago I used to simply copy each piece in line together and
> they would merrily create themselves then at some point the code
> operating the headers was change such that that no longer worked. I
> thought the whole bookpart was added to restore such functionality,
> but the underlying mechanism is oddly different and it must be to do
> with with who the lilypond does business and since I have learned
> anything other than basic and python not much beyond how it functions
> not that I could code my way out of a paper bag.

Frankly, talking your way out of a paper bag seems like a challenge
right now, too.  All this verbiage appears to indicate that LilyPond
changed for the worse at some point of time for your use pattern, but I
cannot make head nor tails of it.

-- 
David Kastrup

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


Re: include puzzlement

2017-12-29 Thread Shane Brandes
Thanks all, and Kieran that pattern will definitely work for future
projects. Unfortunately that leaves me with unwinding, separating the
music from the score definitions,  200 some such files for a current
one to get it to work. I had anticipated that the whole bookpart thing
simply encapsulated that bit of information in its own little section
and would therefore work. That probably has to do with the idea that
some years ago I used to simply copy each piece in line together and
they would merrily create themselves then at some point the code
operating the headers was change such that that no longer worked. I
thought the whole bookpart was added to restore such functionality,
but the underlying mechanism is oddly different and it must be to do
with with who the lilypond does business and since I have learned
anything other than basic and python not much beyond how it functions
not that I could code my way out of a paper bag. So David is probably
right in that I believed that each bookpart had its own scope, however
that is not a programming term I am familiar with.

regards,
Shane

On Fri, Dec 29, 2017 at 2:59 PM, David Kastrup  wrote:
> Shane Brandes  writes:
>
>> o.k. back to the include with book part problem. Here is my almost
>> minimal code example, which consists of files a.ly, b.ly and test.ly.
>> The two files compile alone correctly but when stuck in the bookpart
>> they go to pieces.
>
> Sigh.  Your original complaint was:
>
> O.k. having gone in circles trying to figure out the whole bookpart
> apparatus I discovered that the documentations statement that using
> include is the same as copying and pasting the include into a document
> is false if the include consists of a complete lilypond file. Is there
> a way around that?
>
> This has _nothing_ whatsoever to do with \include, it has to do with
> putting complete documents inside of a \bookpart .  Which does not allow
> for assignments, for example.
>
>> % bookpart test.ly
>>
>> \bookpart {\include "a.ly"}
>> \bookpart {\include "b.ly"}
>
> The problem is that bookparts (and books) don't have their own local
> variable scopes so you cannot do local assignments in them.  The
> expectation would be that they don't generally bleed through to outside,
> and indeed your usage pattern sort of demonstrates the expectation of
> such scoping.
>
> Of course, doing the same in Scheme just works in the global scope and
> thus bypasses this consideration anyway.
>
> --
> David Kastrup

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


Re: include puzzlement

2017-12-29 Thread Carl Sorensen

On 12/29/17, 12:35 PM, "Shane Brandes"  wrote:

wow. o.k. That does mean there is no simple way of maintaining vast
projects via tidy compartmentalization.

%--- file a.ly
\version "2.17.97"

aTitle = "a"




righteOne = \relative g' {
\clef "treble"
g8
}


righteTwo = \relative a' {

d2
}

lefteOne = \relative c' {
\clef "bass"
}

lefteTwo =  \relative a, {
\clef "bass"  r2

}


%--- file b.ly

\version "2.17.97"

  bTitle = "b"



rightTwo = \relative c'' {


r2
}

rightOne = \relative c'' {

  a2.
}

leftOne = \relative c' {

a2.
}

leftTwo = \relative c' {


}

pedal = \relative c {

c4 }

%  --- file scoreastruct.ly
\header{title = \aTitle}
\score {
  \new PianoStaff \with {
instrumentName = "Organ"
  } <<
\new Staff = "right"  << \righteOne \\ \righteTwo >>
\new Staff = "left"  { \clef bass << \lefteOne \\ \lefteTwo >> }
  >>
  \layout { }

}

% --- file scorebstruct.ly
\header{
  title = \bTitle
}

\score {
  <<
\new PianoStaff \with {
  instrumentName = "Organ"
} <<
  \new Staff = "right"  << \rightOne \\ \rightTwo >>
  \new Staff = "left"  { \clef bass << \leftOne \\ \leftTwo >> }
>>
\new Staff = "pedal"{ \clef bass \pedal }
  >>
  \layout { }

}

% --- file scorea.ly
\version "2.17.97"
\include "a.ly"
\include "scoreastruct.ly"

% -- file scoreb.ly
\version "2.17.97"
\include "b.ly"
\include "scorebstruct.ly"

% bookpart test.ly
\version "2.17.97"
\include "a.ly"
\include "b.ly"
\bookpart {
  \include "scoreastruct.ly"
}
\bookpart {
  \include "scorebstruct.ly"
}


Seems to work to me.

Carl


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


Re: Notehead Position

2017-12-29 Thread Ralph Palmer
On Fri, Dec 29, 2017 at 8:37 AM, Dave Higgins  wrote:

> Is there a way to center a whole notehead in the bar?
>
> << { c'1 } \new Dynamics { \override Hairpin #'minimum-length = #8 s8\> s
> s s s\p\< s s s\! } >>
>
> I know I could use silence and fractional note lengths, but that seems
> sloppy.
>
> Also, why doesn't R1*1 work like R1*2 (by putting the 2 in position over
> the rest)? (rhetorical)  Yes, I have a solution for this too, but again,
> sloppy.
> --
> Dave
>

Greetings, Dave -

Please try to be a little more clear about your problem:

The example above compiles, but it's not clear if the measure you want
changed is the first measure.

It helps to know your LilyPond version and your operating system.

It would also help to see an example (.jpg or .pdf, for example) of what
you are trying to achieve.

For a hint toward a possible solution, please see
http://lists.gnu.org/archive/html/lilypond-user/2005-04/msg00266.html
in the LilyPond Snippets Repository.
It's also possible that the OpenLilyLib might have a solution. Take a look
at
https://github.com/openlilylib/

Happy New Year,

Ralph

-- 
Ralph Palmer
Brattleboro, VT
USA
palmer.r.vio...@gmail.com
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: include puzzlement

2017-12-29 Thread David Kastrup
Shane Brandes  writes:

> o.k. back to the include with book part problem. Here is my almost
> minimal code example, which consists of files a.ly, b.ly and test.ly.
> The two files compile alone correctly but when stuck in the bookpart
> they go to pieces.

Sigh.  Your original complaint was:

O.k. having gone in circles trying to figure out the whole bookpart
apparatus I discovered that the documentations statement that using
include is the same as copying and pasting the include into a document
is false if the include consists of a complete lilypond file. Is there
a way around that?

This has _nothing_ whatsoever to do with \include, it has to do with
putting complete documents inside of a \bookpart .  Which does not allow
for assignments, for example.

> % bookpart test.ly
>
> \bookpart {\include "a.ly"}
> \bookpart {\include "b.ly"}

The problem is that bookparts (and books) don't have their own local
variable scopes so you cannot do local assignments in them.  The
expectation would be that they don't generally bleed through to outside,
and indeed your usage pattern sort of demonstrates the expectation of
such scoping.

Of course, doing the same in Scheme just works in the global scope and
thus bypasses this consideration anyway.

-- 
David Kastrup

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


Re: include puzzlement

2017-12-29 Thread Caagr98
On 12/29/17 20:26, Carl Sorensen wrote:
> Variables can only be defined at the top level.  See the Notation Reference 
> 3.1.4

That's not entirely true. You can define variables in \paper, \layout, and 
\midi blocks too.

Also, you could use the (ly:parser-define! k v) function inside a bookpart, 
though I don't think that would provide any kind of scoping.

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


Re: include puzzlement

2017-12-29 Thread Kieren MacMillan
p.s. While it's arguably less "simple", there's also Jan-Peter's amazing 
lilytemplate system…  =)

> On Dec 29, 2017, at 2:39 PM, Kieren MacMillan  
> wrote:
> 
> Hi Shane,
> 
>> wow. o.k. That does mean there is no simple way of
>> maintaining vast projects via tidy compartmentalization.
> 
> No… I do it all the time:
>  a_notes.ly
>  a_single_score.ly
>  b_notes.ly
>  b_single_score.ly
>  ab_double_score.ly
>  etc.
> 
> For example, "Robin Hood: The Legendary Musical Comedy" has 40 
> [current/active] cues (i.e., song, transition, underscore, etc.). So I have 
> 40 *_notes.ly files and four score files (Vocal/Choral Score, Piano/Vocal 
> Score, Piano/Conductor Score, and Full Score). For several of them, I also 
> have individual files (e.g., Generosity_vocalselections.ly).
> 
> Hope this helps!
> Kieren.


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


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


Re: include puzzlement

2017-12-29 Thread Kieren MacMillan
Hi Shane,

> wow. o.k. That does mean there is no simple way of
> maintaining vast projects via tidy compartmentalization.

No… I do it all the time:
  a_notes.ly
  a_single_score.ly
  b_notes.ly
  b_single_score.ly
  ab_double_score.ly
  etc.

For example, "Robin Hood: The Legendary Musical Comedy" has 40 [current/active] 
cues (i.e., song, transition, underscore, etc.). So I have 40 *_notes.ly files 
and four score files (Vocal/Choral Score, Piano/Vocal Score, Piano/Conductor 
Score, and Full Score). For several of them, I also have individual files 
(e.g., Generosity_vocalselections.ly).

Hope this helps!
Kieren.


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


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


Re: include puzzlement

2017-12-29 Thread Shane Brandes
wow. o.k. That does mean there is no simple way of maintaining vast
projects via tidy compartmentalization.

Thanks for the clarification.

Shane

On Fri, Dec 29, 2017 at 2:26 PM, Carl Sorensen  wrote:
>
>
> On 12/29/17, 12:17 PM, "Timothy Lanfear"  wrote:
>
> A bookpart cannot contain statements like
>
> music = { c'1 }
>
> Yes, this is true.  Variables can only be defined at the top level.  See the 
> Notation Reference 3.1.4
>
> Carl
>
>
>
> ___
> 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: include puzzlement

2017-12-29 Thread Carl Sorensen


On 12/29/17, 12:17 PM, "Timothy Lanfear"  wrote:

A bookpart cannot contain statements like

music = { c'1 }

Yes, this is true.  Variables can only be defined at the top level.  See the 
Notation Reference 3.1.4

Carl



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


Re: include puzzlement

2017-12-29 Thread Timothy Lanfear

A bookpart cannot contain statements like

music = { c'1 }

After the include processing, your file test.ly begins with something like:

\bookpart {
  music = { c'1 }
  \score { \music }
}

whereas, you should have

music = { c'1 }
\bookpart {
  \score { \music }
}

On 29/12/17 18:35, Shane Brandes wrote:

o.k. back to the include with book part problem. Here is my almost
minimal code example, which consists of files a.ly, b.ly and test.ly.
The two files compile alone correctly but when stuck in the bookpart
they go to pieces. I even tried it running lilypond-book as a tex file
which interestingly yields no page break but otherwise identically
incorrect.

%--- file a.ly
\version "2.17.97"

\header {
   title = "a"

}




righteOne = \relative g' {
 \clef "treble"
 g8
 }


righteTwo = \relative a' {

 d2
 }

lefteOne = \relative c' {
 \clef "bass"
 }

lefteTwo =  \relative a, {
 \clef "bass"  r2

 }


\score {
   \new PianoStaff \with {
 instrumentName = "Organ"
   } <<
 \new Staff = "right"  << \righteOne \\ \righteTwo >>
 \new Staff = "left"  { \clef bass << \lefteOne \\ \lefteTwo >> }
   >>
   \layout { }

}

%--- file b.ly

\version "2.17.97"

\header {

   title = "b"

}


\layout {
   \context {
 \Score
 \remove "Bar_number_engraver"
   }
}



rightTwo = \relative c'' {


r2
}

rightOne = \relative c'' {

   a2.
}

leftOne = \relative c' {

  a2.
}

leftTwo = \relative c' {


}

pedal = \relative c {

  c4 }

\score {
   <<
 \new PianoStaff \with {
   instrumentName = "Organ"
 } <<
   \new Staff = "right"  << \rightOne \\ \rightTwo >>
   \new Staff = "left"  { \clef bass << \leftOne \\ \leftTwo >> }
 >>
 \new Staff = "pedal"{ \clef bass \pedal }
   >>
   \layout { }

}

% bookpart test.ly

\bookpart {\include "a.ly"}
\bookpart {\include "b.ly"}



--
Timothy Lanfear, Bristol, UK.


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


Re: include puzzlement

2017-12-29 Thread Shane Brandes
o.k. back to the include with book part problem. Here is my almost
minimal code example, which consists of files a.ly, b.ly and test.ly.
The two files compile alone correctly but when stuck in the bookpart
they go to pieces. I even tried it running lilypond-book as a tex file
which interestingly yields no page break but otherwise identically
incorrect.

%--- file a.ly
\version "2.17.97"

\header {
  title = "a"

}




righteOne = \relative g' {
\clef "treble"
g8
}


righteTwo = \relative a' {

d2
}

lefteOne = \relative c' {
\clef "bass"
}

lefteTwo =  \relative a, {
\clef "bass"  r2

}


\score {
  \new PianoStaff \with {
instrumentName = "Organ"
  } <<
\new Staff = "right"  << \righteOne \\ \righteTwo >>
\new Staff = "left"  { \clef bass << \lefteOne \\ \lefteTwo >> }
  >>
  \layout { }

}

%--- file b.ly

\version "2.17.97"

\header {

  title = "b"

}


\layout {
  \context {
\Score
\remove "Bar_number_engraver"
  }
}



rightTwo = \relative c'' {


r2
}

rightOne = \relative c'' {

  a2.
}

leftOne = \relative c' {

 a2.
}

leftTwo = \relative c' {


}

pedal = \relative c {

 c4 }

\score {
  <<
\new PianoStaff \with {
  instrumentName = "Organ"
} <<
  \new Staff = "right"  << \rightOne \\ \rightTwo >>
  \new Staff = "left"  { \clef bass << \leftOne \\ \leftTwo >> }
>>
\new Staff = "pedal"{ \clef bass \pedal }
  >>
  \layout { }

}

% bookpart test.ly

\bookpart {\include "a.ly"}
\bookpart {\include "b.ly"}

On Fri, Dec 29, 2017 at 12:37 PM, Shane Brandes  wrote:
> Never mind that code does not function. Still trying to reduce the
> full files into minimal examples that both preserve the problem and
> compile correctly independently and then crash when included.
>
> Shane
>
> On Fri, Dec 29, 2017 at 11:05 AM, Shane Brandes  wrote:
>> O.k. after reducing things here is the problem that causes the snafu.
>> The independent files to be included all happen to have the same
>> structure where the score is defined and the voices called to a
>> variable. as in the following.
>>
>> altoVoice = \relative c' {
>>
>>   a
>> }
>>
>> \score {
>>   \new Staff \with {
>> instrumentName = "Treble"
>>   } { \altoVoice }
>>
>> so the result is as far as I can tell that after the first file which
>> we can call alto1.ly is included the second one, identical in
>> structure, lets call alto2.ly has called for the same input here when
>> the program looks around for the variable altoVoice it decides there
>> is an unrecognized string. Is there anyway around this bar renaming
>> all these variables into unique indentifiers? That would be possible
>> but definitely a time consuming drag.
>>
>> On Fri, Dec 29, 2017 at 3:20 AM, David Kastrup  wrote:
>>> Shane Brandes  writes:
>>>
 O.k. having gone in circles trying to figure out the whole bookpart
 apparatus I discovered that the documentations statement that using
 include is the same as copying and pasting the include into a document
 is false if the include consists of a complete lilypond file.
>>>
>>> Care to show a minimal example?
>>>
 Is there a way around that?
>>>
>>> First one needs to know what your problem is.
>>>
>>> --
>>> David Kastrup

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


Change the text within a volta

2017-12-29 Thread nokel81
I currently have the following:



However, I would like to be able to change the text within the volta since I
am not actually using it as a repeat but more of an option depending on the
calendar.



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

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


Re: getting paid for an include (I offer)

2017-12-29 Thread Werner LEMBERG
>> ???  Are you really trying to reactivate Neue Deutsche
>> Orgeltabulatur, three hundred years after it was abandonded?
> 
> There can be multiple reasons why one would do that: [...]

All of these are valid points.  However, it seems to me that he wants
to actually *add* features to this tablature, which I consider three
hundred years too late.  Similar to figured bass, Neue Deutsche
Orgeltabulatur can't handle more elaborated music, so there were
really good reasons to change to normal, modern notation.


Werner

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


Re: include puzzlement

2017-12-29 Thread Shane Brandes
Never mind that code does not function. Still trying to reduce the
full files into minimal examples that both preserve the problem and
compile correctly independently and then crash when included.

Shane

On Fri, Dec 29, 2017 at 11:05 AM, Shane Brandes  wrote:
> O.k. after reducing things here is the problem that causes the snafu.
> The independent files to be included all happen to have the same
> structure where the score is defined and the voices called to a
> variable. as in the following.
>
> altoVoice = \relative c' {
>
>   a
> }
>
> \score {
>   \new Staff \with {
> instrumentName = "Treble"
>   } { \altoVoice }
>
> so the result is as far as I can tell that after the first file which
> we can call alto1.ly is included the second one, identical in
> structure, lets call alto2.ly has called for the same input here when
> the program looks around for the variable altoVoice it decides there
> is an unrecognized string. Is there anyway around this bar renaming
> all these variables into unique indentifiers? That would be possible
> but definitely a time consuming drag.
>
> On Fri, Dec 29, 2017 at 3:20 AM, David Kastrup  wrote:
>> Shane Brandes  writes:
>>
>>> O.k. having gone in circles trying to figure out the whole bookpart
>>> apparatus I discovered that the documentations statement that using
>>> include is the same as copying and pasting the include into a document
>>> is false if the include consists of a complete lilypond file.
>>
>> Care to show a minimal example?
>>
>>> Is there a way around that?
>>
>> First one needs to know what your problem is.
>>
>> --
>> David Kastrup

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


Re: edition-editor usage

2017-12-29 Thread Mason Hock
Mason Hock:
> Urs Liska:
>>
>> Actually I do not see why any of this should be incompatible. Both 
>> page-layout and partial-compilation *use* the EE. Maybe it is a naming 
>> conflict somehow. 
> 
> Here's a reduced example of what I have. Can you spot what I'm doing wrong?
> 
> \version "2.19.80"
> \include "oll-core/package.ily"
> \loadPackage edition-engraver
> \loadPackage partial-compilation
> \loadModule page-layout.conditional-breaks
> \loadModule bezier.shapeII
> 
> \addEdition violinI
> \editionMod violinI 1 2/4 score.violinI.Voice \once \shapeII #'(()()(p
> 110 1.5)()) Slur
> \consistToContexts #edition-engraver Score.StaffGroup.Staff.Voice
> 
> % the problem persists whether or not the breakset has the same name as
> the edition
> \registerBreakSet violinI
> \setBreaks violinI page-breaks #'(56)
> \setBreaks violinI line-breaks #'(7 14 21 28 35 42 49)
> \applyConditionalBreaks violinI
> \setClipPage violinI 1
> 
> \score {
>   \new StaffGroup {
> <<
>   \new Staff \with { instrumentName = "Violin 1" \editionID violinI }
>   \relative c'' { c c c( d) \repeat unfold 252 c }
> 
>   \new Staff \with { instrumentName = "Violin 2" }
>   \relative c'' { \repeat unfold 256 c }
> >>
>   }
>   \layout {
> \context {
>   \Score
>   \editionID score % removing this line fixes conditional-breaks and
>% partial-compilation but breaks edition-engraver
> }
>   }
> }
> 

Urs,

Is there somewhere I can access your solution described here?

http://lilypondblog.org/2015/01/partially-compiling-a-lilypond-score/

It no longer appears to be in snippets or the deprecated openlilylib repo.

Thanks,

Mason

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


Re: fixed vertical spacing within staff-group

2017-12-29 Thread Malte Meyn



Am 29.12.2017 um 05:30 schrieb Eby Mani:

Hi,

How to set fixed vertical spacing within staff-group ?.


Hi,

please always give a minimal working (and compilable) code example that 
shows what you are doing currently.



I have tried the following in \layout { \context } section. Vertical spacing 
keep on varying if there are beams, ledger lines or cross-staff notation. Even 
tried with padding=#0. Without the StaffGrouper, spacing is somewhat ok(but i 
feel little more spacing is required), except the cross-staff part.

\override StaffGrouper.staff-staff-spacing.padding = #2
\override StaffGrouper.staff-staff-spacing.basic-distance = #6


Have a look at http://joramberger.de/files/LilypondSpacing.pdf Because 
you didn’t provide code, I cannot test, but I think, something like the 
following might work:


\override StaffGrouper.staff-staff-spacing.padding = #-inf.0
\override StaffGrouper.staff-staff-spacing.stretchability = 0
\override StaffGrouper.staff-staff-spacing.basic-distance = 10
\override StaffGrouper.staff-staff-spacing.minimum-distance = 10

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


Re: getting paid for an include (I offer)

2017-12-29 Thread Ali Cuota
Dear Karl, Werner and All,

Thanks Karl these are two points.

Also stretching the score is really a poit in concert (not mentionned
that another aproach of the matter is recommended from pedagogists). I
had a try with OO-calc and OO-writer, the score reduces to half of
traditional score, and more is even possible. This is huge. Vierne's
Toccata has 8 pages, these are 3 turns, quite difficult to manage. in
TAB this would be 4 letter-pages, that fits on the musik stand. No
turns.
Of course a musician can and should learn by heart, but the stressing
life doesnt allow to learn everything by heart. And I dont want to
work anymore with assistants.

For programming, I am definitely not the man. Thats why I would pay.

Anyway, the end of the year is at the door, so I wish all a good start in 2018.

Francois 

  http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_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_source=link_campaign=sig-email_content=webmail;
target="_blank" style="color: #4453ea;">www.avg.com 




2017-12-29 7:35 GMT-05:00, k...@aspodata.se :
> Werner:
> ...
>> ???  Are you really trying to reactivate Neue Deutsche Orgeltabulatur,
>> three hundred years after it was abandonded?
>
> There can be multiple reasons why one would do that:
>
> . the somewhat academic point in being able to do that
>
> . when transcribing things I've found that that is easier if I first
> can get something that looks similar with the piece I'm transcribing,
> and then convert it into something a performer would like
>
> . the notation suited the performers at that time (1550-1700), so
> there might be some value in beeing able to understand why they used it
> and beeing able to use it oneself, and for that end, beeing able to
> make a cleaner version of a source tabulature
>
> Regards,
> /Karl Hammar
>
> ---
> Aspö Data
> Lilla Aspö 148
> S-742 94 Östhammar
> Sweden
> +46 173 140 57
>
>
>
> ___
> 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: include puzzlement

2017-12-29 Thread Shane Brandes
O.k. after reducing things here is the problem that causes the snafu.
The independent files to be included all happen to have the same
structure where the score is defined and the voices called to a
variable. as in the following.

altoVoice = \relative c' {

  a
}

\score {
  \new Staff \with {
instrumentName = "Treble"
  } { \altoVoice }

so the result is as far as I can tell that after the first file which
we can call alto1.ly is included the second one, identical in
structure, lets call alto2.ly has called for the same input here when
the program looks around for the variable altoVoice it decides there
is an unrecognized string. Is there anyway around this bar renaming
all these variables into unique indentifiers? That would be possible
but definitely a time consuming drag.

On Fri, Dec 29, 2017 at 3:20 AM, David Kastrup  wrote:
> Shane Brandes  writes:
>
>> O.k. having gone in circles trying to figure out the whole bookpart
>> apparatus I discovered that the documentations statement that using
>> include is the same as copying and pasting the include into a document
>> is false if the include consists of a complete lilypond file.
>
> Care to show a minimal example?
>
>> Is there a way around that?
>
> First one needs to know what your problem is.
>
> --
> David Kastrup

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


Notehead Position

2017-12-29 Thread Dave Higgins

Is there a way to center a whole notehead in the bar?

<< { c'1 } \new Dynamics { \override Hairpin #'minimum-length = #8 s8\> 
s s s s\p\< s s s\! } >>


I know I could use silence and fractional note lengths, but that seems 
sloppy.


Also, why doesn't R1*1 work like R1*2 (by putting the 2 in position over 
the rest)? (rhetorical)  Yes, I have a solution for this too, but again, 
sloppy.

--
Dave

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


Guitar PMs - almost done

2017-12-29 Thread Neo Anderson
Dear All,
After plenty of tweaking (as I have found it's always the case) I've come up 
with quite a satisfying code (based on David Kastrup's one) for guitar palm 
mutes. Please check out the tiny example.

There are still two things I can't figure out, though, and I would be grateful 
if anyone could help me with them.

1. How to change the look of the extender lines (dashes)? I'd like them to be 
more dense or compact. The following code with various values won't make a 
difference.
    -\tweak bound-details.dash-fraction #0
    -\tweak bound-details.dash-period #0

2. The following code, setting both variables on the same "line",
    \override TextScript.staff-padding = #6
creates a padding for both text in a variable ("PM") and any other text 
attached to a note ("Aaa").
How to integrate the code into the said variable, so that the padding won't 
affect the text attached to notes? I tried 
    \override #'(staff-padding . 6)
but it doesn't do anything.

One thing to point out: there are two variables for PMs because "startPM" won't 
parse when it's at the beginning of the line or it won't work under a single 
note. At least I am not able to work it out.
%%

% START CODE
\version "2.18.2"

startPM = -\single\textSpannerDown
  -\tweak staff-padding #5.45
  -\tweak bound-details.left.text \markup \upright \fontsize #-3 "P.M."
  -\tweak bound-details.left.stencil-align-dir-y #0
  -\tweak bound-details.right.stencil-align-dir-y #0
  -\tweak bound-details.right.text \markup \upright \fontsize #-3 "|"
  -\tweak bound-details.right.attach-dir #2
  -\tweak bound-details.left.attach-dir #-2
  -\startTextSpan

stopPM = \stopTextSpan

PM = \markup  {
  \tiny \fontsize #-1 \halign #-0.5 "P.M."
}

\new Staff { 
  \clef "G_8" 
  \override TextScript.staff-padding = #6
  % Both PMs and "Aaa" are affected by padding
  e,_\PM^"Aaa" d f d_\PM |
  a g b, \startPM c |  
  g \stopPM d' e, \startPM f, \stopPM |
}

% END CODE

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


Re: scheme function generating multiple score

2017-12-29 Thread Gianmaria Lari
On 29 December 2017 at 12:28, Gianmaria Lari 
wrote:

>
>
> On 29 December 2017 at 11:26, Timothy Lanfear  wrote:
>
>> On 29/12/17 07:03, Gianmaria Lari wrote:
>>
>>> Sorry to bother but I'm unable to get out from this problem.
>>> This code generate two scores:
>>>
>>> \version "2.19.80"
>>>
>>> \score {
>>>   \transpose c d {c' d' e'}
>>>   \layout{}
>>> }
>>>
>>> \score {
>>>   \transpose c e {c' d' e'}
>>>   \layout{}
>>> }
>>>
>>> I tried to write a scheme function doing something similar:
>>>
>>> \version "2.19.80"
>>> myScore = #(define-scheme-function (music) (ly:music?) #{
>>>
>>> \score {
>>>   \transpose c d $music
>>>   \layout{}
>>> }
>>>
>>> \score {
>>>   \transpose c e $music
>>>   \layout{}
>>> }
>>>
>>> #})
>>>
>>> \myScore {c' d' e'}
>>>
>>> but when I try to compile I get this error
>>>
>>>
>>> error: syntax error, unexpected \score, expecting end of input
>>>
>>> \score {
>>>
>>>
>>> error: error in #{ ... #}
>>>
>>>
>>> Any suggestion?
>>> Thank you, Gianmaria
>>>
>>>
>> A function can only return a single item so you could wrap the two scores
>> in a book and then process the book.
>>
>> \version "2.19.80"
>>
>> myBook = #(define-scheme-function (music) (ly:music?) #{
>>   \book {
>> \score { \transpose c d $music \layout{} }
>> \score { \transpose c e $music \layout{} }
>>   }
>> #})
>>
>> mybook = #(myBook #{ { c' d' e' } #})
>> \mybook
>>
>>
>>
>>
>>
>> --
>> Timothy Lanfear, Bristol, UK.
>>
>>
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>
> oh, great! It was some weeks I was stuck with this issue. I thought the
> scheme function would simply copy everything inside the #{ ... #} replacing
> the variable.
>
> Thanks a lot Timothy!
>

Is it possible to avoid the two lines

mybook = #(myBook #{ { c' d' e' } #})
\mybook

and write directly something like

 myBook #{ { c' d' e' } #}

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


Re: getting paid for an include (I offer)

2017-12-29 Thread karl
Werner:
...
> ???  Are you really trying to reactivate Neue Deutsche Orgeltabulatur,
> three hundred years after it was abandonded?

There can be multiple reasons why one would do that:

. the somewhat academic point in being able to do that

. when transcribing things I've found that that is easier if I first
can get something that looks similar with the piece I'm transcribing,
and then convert it into something a performer would like

. the notation suited the performers at that time (1550-1700), so
there might be some value in beeing able to understand why they used it
and beeing able to use it oneself, and for that end, beeing able to
make a cleaner version of a source tabulature

Regards,
/Karl Hammar

---
Asp?? Data
Lilla Asp?? 148
S-742 94 ??sthammar
Sweden
+46 173 140 57



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


Re: scheme function generating multiple score

2017-12-29 Thread Gianmaria Lari
On 29 December 2017 at 11:26, Timothy Lanfear  wrote:

> On 29/12/17 07:03, Gianmaria Lari wrote:
>
>> Sorry to bother but I'm unable to get out from this problem.
>> This code generate two scores:
>>
>> \version "2.19.80"
>>
>> \score {
>>   \transpose c d {c' d' e'}
>>   \layout{}
>> }
>>
>> \score {
>>   \transpose c e {c' d' e'}
>>   \layout{}
>> }
>>
>> I tried to write a scheme function doing something similar:
>>
>> \version "2.19.80"
>> myScore = #(define-scheme-function (music) (ly:music?) #{
>>
>> \score {
>>   \transpose c d $music
>>   \layout{}
>> }
>>
>> \score {
>>   \transpose c e $music
>>   \layout{}
>> }
>>
>> #})
>>
>> \myScore {c' d' e'}
>>
>> but when I try to compile I get this error
>>
>>
>> error: syntax error, unexpected \score, expecting end of input
>>
>> \score {
>>
>>
>> error: error in #{ ... #}
>>
>>
>> Any suggestion?
>> Thank you, Gianmaria
>>
>>
> A function can only return a single item so you could wrap the two scores
> in a book and then process the book.
>
> \version "2.19.80"
>
> myBook = #(define-scheme-function (music) (ly:music?) #{
>   \book {
> \score { \transpose c d $music \layout{} }
> \score { \transpose c e $music \layout{} }
>   }
> #})
>
> mybook = #(myBook #{ { c' d' e' } #})
> \mybook
>
>
>
>
>
> --
> Timothy Lanfear, Bristol, UK.
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

oh, great! It was some weeks I was stuck with this issue. I thought the
scheme function would simply copy everything inside the #{ ... #} replacing
the variable.

Thanks a lot Timothy!
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: scheme function generating multiple score

2017-12-29 Thread Timothy Lanfear

On 29/12/17 07:03, Gianmaria Lari wrote:

Sorry to bother but I'm unable to get out from this problem.
This code generate two scores:

\version "2.19.80"

\score {
  \transpose c d {c' d' e'}
  \layout{}
}

\score {
  \transpose c e {c' d' e'}
  \layout{}
}

I tried to write a scheme function doing something similar:

\version "2.19.80"
myScore = #(define-scheme-function (music) (ly:music?) #{

\score {
  \transpose c d $music
  \layout{}
}

\score {
  \transpose c e $music
  \layout{}
}

#})

\myScore {c' d' e'}

but when I try to compile I get this error


error: syntax error, unexpected \score, expecting end of input

\score {


error: error in #{ ... #}


Any suggestion?
Thank you, Gianmaria



A function can only return a single item so you could wrap the two 
scores in a book and then process the book.


\version "2.19.80"

myBook = #(define-scheme-function (music) (ly:music?) #{
  \book {
    \score { \transpose c d $music \layout{} }
    \score { \transpose c e $music \layout{} }
  }
#})

mybook = #(myBook #{ { c' d' e' } #})
\mybook





--
Timothy Lanfear, Bristol, UK.


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


Re: include puzzlement

2017-12-29 Thread David Kastrup
Shane Brandes  writes:

> O.k. having gone in circles trying to figure out the whole bookpart
> apparatus I discovered that the documentations statement that using
> include is the same as copying and pasting the include into a document
> is false if the include consists of a complete lilypond file.

Care to show a minimal example?

> Is there a way around that?

First one needs to know what your problem is.

-- 
David Kastrup

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