Re: the sound of brushes

2015-04-09 Thread MarcM
if you share a sample, i can try on windows and mac



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/the-sound-of-brushes-tp174179p174292.html
Sent from the User mailing list archive at Nabble.com.

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


Re: \uppercase function

2015-04-09 Thread David Nalesnik
Hi Kieren,

On Thu, Apr 9, 2015 at 9:48 AM, Kieren MacMillan 
kieren_macmil...@sympatico.ca wrote:

 Hi all,

 I’m looking for an \uppercase function to use in Lilypond — this one
 (which I found somewhere, but can’t remember where now) doesn’t seem to
 work:

 \version 2.19

 #(define-markup-command (uppercase paper props markup-argument) (markup?)
 (interpret-markup paper (prepend-alist-chain 'case 'up props)
 markup-argument))

 \markup \uppercase “Test

 Any hints or solutions would be appreciated.


You are only using part of the code which I find here:
http://www.autoindustry536.bllog.opensubscriber.com/message/lilypond-de...@gnu.org/12807136.html


Note that the following will work with your simple example, though
\uppercase has to be directly before the markup:
#(define-markup-command (uppercase layout props markup-argument)
   (markup?)
   (interpret-markup layout props
 (string-upcase (markup-string markup-argument


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


Re: \uppercase function

2015-04-09 Thread David Nalesnik
On Thu, Apr 9, 2015 at 10:31 AM, David Nalesnik david.nales...@gmail.com
wrote:



 Note that the following will work with your simple example, though
 \uppercase has to be directly before the markup:


I meant in case you do something like:

\markup \bold \italic \uppercase Test

The \uppercase needs to be the last command issued.

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


Re: Scheme coding: 'number' cases vs 'string' cases

2015-04-09 Thread Paul Morris
Schneidy wrote
 What am I missing?

Hi Pierre,

case doesn't work with strings, so you'd need to use cond instead.

Cheers,
-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Scheme-coding-number-cases-vs-string-cases-tp174287p174294.html
Sent from the User mailing list archive at Nabble.com.

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


Re: Function to add a drone staff?

2015-04-09 Thread Paul Morris
Gilles Sadowski wrote
 Is there a way (i.e. a function) to automatically add a staff for a
 bagpipe's drone note(s)?

Hi, Here's a start, a function to change all the pitches of a melody to a
given pitch.  Not tested on real music... (Since you only want the drone
notes in midi maybe you don't need to deal with chords, which makes the
coding simpler.)

HTH,
-Paul

Hat tip to David Kastrup for this example:
https://lists.gnu.org/archive/html/lilypond-user/2012-03/msg00621.html

%%% 

dronify =
#(define-music-function (parser location drone melody)
   (ly:pitch? ly:music?)
   (map-some-music
(lambda (m)
  (and (ly:pitch? (ly:music-property m 'pitch))
   (begin
(set! (ly:music-property m 'pitch) drone)
m)))
melody)
   melody)

melody = \relative f' {
  c4 r c8 d8 r4
  g2 r4 b4
}


  \melody
  \dronify g' \melody
  \dronify g \melody




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Function-to-add-a-drone-staff-tp174261p174278.html
Sent from the User mailing list archive at Nabble.com.

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


Re: Hymns and justified lyrics

2015-04-09 Thread David Nalesnik
Hi David,

On Thu, Apr 9, 2015 at 9:32 AM, David B. Stocker notesetters...@gmail.com
wrote:

 Hello LilyPonders,

 I have a client who is working on a hymnal, and they would like for the
 beginning of the lines of verses to be left justified. The best way I can
 see to do this, from a visual standpoint, is to make the longest syllable
 on the first note of each line centered like it normally is, and then
 left-align all the others to that syllable.

 Please see the attached minimal example.

 First, I want to know whether it is possible to automate this behavior
 with LilyPond (I think it is).

 And next, I'd like it if someone would point me in the direction of how to
 achieve this. My sense is that it is going to require some
 function-writing. I'm not a programmer (at all, really), but I'm not
 opposed to learning how to do this. Actually, I've been meaning to learn
 how to extend and modify some aspects of LilyPond for my own projects and
 doing so for a client-project is the best excuse I might have for jumping
 in.

 Also, it's something that may be useful for other users as well, so at the
 very least it should be included in the LSR, and maybe made available for
 everyone in a future release.

 I'm also open to collaboration on this, if anyone else is interested.

 So, my hunch is that I'm going to write a function that queries the value
 of the left edge of the centered syllable in one verse, and then calculates
 the amount of offset to apply to the syllables at the same point in other
 verses on a case-by-case basis.

 1) where can I start with learning this sort of tinkering, and 2) does
 anyone have other functions that behave in a similar way (fetching a value,
 making a calculation, and then applying it somewhere else) that I could
 study to figure out how I might do this?


You can find a function here which I believe does what you want:

http://www.mail-archive.com/lilypond-user%40gnu.org/msg81870.html

It's been a while, but it looks like you add \tagIt at the line beginning,
to any of the verses,  This will center the lines based on the longest word
and left-justify, regardless of the verse to which you attach the \tagIt.

Attached is the relevant code with your example.

Of course it would be great to automate this so you wouldn't have to worry
about line breaks, and possibly that could be done here.

Hope this helps,
David

P.S.  I see the following message in the above thread:
http://www.mail-archive.com/lilypond-user%40gnu.org/msg81941.html
Possibly you could request the code from the poster.
\version 2.17.17

%%

#(define (define-grob-property symbol type? description)
  (if (not (equal? (object-property symbol 'backend-doc) #f))
  (ly:error (_ symbol ~S redefined) symbol))

  (set-object-property! symbol 'backend-type? type?)
  (set-object-property! symbol 'backend-doc description)
  symbol)

#(map
  (lambda (x)
(apply define-grob-property x))

  `(
(tagged ,boolean? is this grob marked?)
(syllables ,array? the lyric syllables at a timestep)
  ))



#(define (Lyric_text_align_engraver ctx)
If the property 'tagged is set, collect all lyric syllables at that
timestep in the grob-array `syllables'
  (let ((syl '()))
(make-engraver
 (acknowledgers
  ((lyric-syllable-interface trans grob source)
   (set! syl (cons grob syl
 ((stop-translation-timestep trans)
  (if (any (lambda (x) (eq? #t (ly:grob-property x 'tagged)))
   syl)
  (for-each
(lambda (x)
   (for-each
 (lambda (y)
   (ly:pointer-group-interface::add-grob x 'syllables y))
 syl))
syl))
  (set! syl '())

#(define (X-offset-callback grob)
  (let* ((target (ly:grob-object grob 'syllables))
 (target
   (if (ly:grob-array? target)
   (ly:grob-array-list target)
   '(
(if (pair? target)
(let ((longest
(car
  (sort target
(lambda (x y)
  ( (interval-length
   (ly:stencil-extent
 (grob-interpret-markup
   grob (ly:grob-property x 'text))
 X))
 (interval-length
   (ly:stencil-extent
 (grob-interpret-markup
   grob (ly:grob-property y 'text))
 X
  (if (eq? grob longest)
  ; if our grob has the longest syllable, return its default
  ; value for 'X-offset
  (ly:self-alignment-interface::aligned-on-x-parent grob)
  (ly:grob-property longest 'X-offset)))
(ly:self-alignment-interface::aligned-on-x-parent grob
 
tagIt = \once \override Lyrics.LyricText 

Re: Function to add a drone staff?

2015-04-09 Thread Paul Morris
Sven Axelsson-3 wrote
 Intersting. I have never tried to generate midi output for bagpipe
 music. I suspect grace notes are not handled well. But in regards to
 the dronification, all of the music, both melody and drone, should be
 played legato. Is that also something that could be set up easily with
 a music function?

Yes, I think so, although I'm not sure exactly how to do it off the top of
my head.

Below is a simpler version of dronify and a way to get both drone notes in
one voice by using this automatic octaves snippet:
http://lsr.di.unimi.it/LSR/Item?id=445

Cheers,
-Paul



dronify =
#(define-music-function (parser location drone melody)
   (ly:pitch? ly:music?)
   (music-map
(lambda (m)
  (if (ly:pitch? (ly:music-property m 'pitch))
  (ly:music-set-property! m 'pitch drone))
  m)
melody))

#(define (octave-up m t)
   (let* ((octave (1- t))
  (new-note (ly:music-deep-copy m))
  (new-pitch (ly:make-pitch
  octave
  (ly:pitch-notename (ly:music-property m 'pitch))
  (ly:pitch-alteration (ly:music-property m 'pitch)
 (set! (ly:music-property new-note 'pitch) new-pitch)
 new-note))

#(define (octavize-chord elements t)
   (cond ((null? elements) elements)
 ((eq? (ly:music-property (car elements) 'name) 'NoteEvent)
  (cons (car elements)
(cons (octave-up (car elements) t)
  (octavize-chord (cdr elements) t
 (else (cons (car elements) (octavize-chord (cdr elements ) t)

#(define (octavize music t)
   (if (eq? (ly:music-property music 'name) 'EventChord)
   (ly:music-set-property! music 'elements (octavize-chord
(ly:music-property music
'elements) t)))
   music)

makeOctaves = #(define-music-function (parser location arg mus) (integer?
ly:music?)
 (music-map (lambda (x) (octavize x arg)) (event-chord-wrap!
mus)))

melody = \relative f' {
  c4 r c8 d8 r4
  g2 r4 b4
}


  \melody
  \makeOctaves #1 \dronify g \melody




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Function-to-add-a-drone-staff-tp174261p174293.html
Sent from the User mailing list archive at Nabble.com.

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


Re: \uppercase function

2015-04-09 Thread Kieren MacMillan
Hi David,

 you could just as easily write the following:
 
 \header {
  myTitle = #myOtherTitle
  title = \markup {
from \italic #(string-upcase myTitle)
  }
 }

Yes, but at that point, why not just write

 \header {
   title = “MY OTHER TITLE
 }

??  ;)

Here’s the concrete use-case:
1. I have musical theatre pieces with (naturally enough) title case titles, 
such as “My Lucky Day”.
2. When they’re included in the Piano/Conductor score (or other score from the 
regular performance materials), the title should remain in title case.
3. When they’re included in a songbook, I’m trying to show the title in the the 
expected format, which is all-caps (cf. modern Warner-Chappell imprints), e.g., 
“MY LUCKY DAY”.
4. I want to accomplish this entirely in the stylesheets, and not have to have 
two different ways of inputting the title in the code/content.

It seems odd to me that it’s so convoluted a process — and apparently so 
different, depending on whether it’s a string or a property.  =\

Thanks,
Kieren.

___

Kieren MacMillan, composer
www:  http://www.kierenmacmillan.info
email:  i...@kierenmacmillan.info


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


Function to add a drone staff?

2015-04-09 Thread Gilles

Hi.

Is there a way (i.e. a function) to automatically add a
staff for a bagpipe's drone note(s)?
Up to now, I was adding a staff by hand (with a tag so it
would not appear on the printed score).   But it is more
complicated than it could be since the drone does not change,
plays along the melody and stop at rests.

Here is how the code currently looks like:
---CUT---
melodyNotes = \relative c'' {
  % ...
}

droneNotes = \relative c'' {
  g g'2~ |
  g g'2~ |
  % and so on...
  g g'2 |
}

bagpipeOneStaff = \new Staff {
  \set Staff.instrumentName = \markup \column { Bagpipe I }
  
\new Voice {
  \set midiInstrument = oboe
  \set midiMinimumVolume = #0.6
  \set midiMaximumVolume = #0.7
  \clef G
  \melodyNotes
}
\new Voice {
  \set midiInstrument = accordion
  \set midiMinimumVolume = #0.2
  \set midiMaximumVolume = #0.3
  \tag #'no-layout {
\droneNotes
  }
}
  
}
---CUT---
[Thus, whenever there are changes in melodyNotes, the droneNotes
must also be modified...]

So, an idea would be to use the function in order to
automatically add the drone voice (second voice in the
above excerpt) with the MIDI settings, and tag, as
parameters.
Hence, the above would become:

---CUT---
melodyNotes = \relative c'' {
  % ...
}

melody = \new Voice {
  \set midiInstrument = oboe
  \set midiMinimumVolume = #0.6
  \set midiMaximumVolume = #0.7
  \clef G
  \melodyNotes
}

bagpipeStaff = \new Staff {
  \set Staff.instrumentName = \markup \column { Bagpipe I }
  
\melody
% I don't know what is legal syntax for the parameters 
specification...

\makeDrone #'no-layout g g' #'accordeon #0.2 #0.3 \melody
  
}
---CUT---

Does that make sense?


Best regards,
Gilles


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


Re:Problem with \break command

2015-04-09 Thread Peter Toye
Abraham,

Thanks very much. That works nicely.


All the best,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \uppercase function

2015-04-09 Thread David Nalesnik
Kieren,

On Thu, Apr 9, 2015 at 10:37 AM, Kieren MacMillan 
kieren_macmil...@sympatico.ca wrote:

 Hi David,

  You are only using part of the code which I find here:
 http://www.autoindustry536.bllog.opensubscriber.com/message/lilypond-de...@gnu.org/12807136.html

 Yes! That was it. Thanks for the link.

  Note that the following will work with your simple example, though
 \uppercase has to be directly before the markup:
  #(define-markup-command (uppercase layout props markup-argument)
 (markup?)
 (interpret-markup layout props
   (string-upcase (markup-string markup-argument

 My issue is the same as in that 2009 post:

 \uppercase \fromproperty #’header:title

 fails. Any thoughts on how to fix that?


Nicholas's \simple function requires a string, and mine requires that we be
able to get at the string within a markup argument.   Ordinarily, getting
the string wouldn't be a problem.   Not so with the markup returned by the
fromproperty command: the function markup-string won't work here.

Nevertheless, we can easily get the title string by referring to the
variable myTitle:

\version 2.19

#(define-markup-command (uppercase paper props markup-argument)
   (markup?)
   Make the markup uppercase.
  Syntax: \\uppercase \string\
   (interpret-markup paper (prepend-alist-chain 'case 'up props)
 markup-argument))

#(define-markup-command (simple paper props str) (string?)
   Depending on the `case' property, may change the case
of the string before interpreting it.
   (let ((text-case (chain-assoc-get 'case props 'normal)))
 (interpret-markup paper props
   (case text-case
 ((up) (string-upcase str))
 ((down) (string-downcase str))
 ;; TODO: small caps, capitalized text, etc
 (else str)


\header {
  myTitle = myTitle
  title = \markup {
from \uppercase \simple #myTitle
  }
}
\markup {
  \null
}

%%%
Though you could just as easily write the following:

\header {
  myTitle = #myOtherTitle
  title = \markup {
from \italic #(string-upcase myTitle)
  }
}
\markup {
  \null
}

%%%

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


Re: Problem with \break command

2015-04-09 Thread Simon Albrecht

Am 09.04.2015 um 17:30 schrieb Peter Toye:

Re: Problem with \break command Simon,

Thanks - it gets somewhere.

The
\set Timing.defaultBarType = 
command with which Abraham came up gets rid of the gaps.

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


Re: \uppercase function

2015-04-09 Thread Kieren MacMillan
Hi David,

 you could just as easily write the following:
 
 \header {
   myTitle = #myOtherTitle
   title = \markup {
 from \italic #(string-upcase myTitle)
   }
 }

Yes, but at that point, why not just write

  \header {
title = “MY OTHER TITLE
  }

??  ;)

Here’s the concrete use-case:
1. I have musical theatre pieces with (naturally enough) title case titles, 
such as “My Lucky Day”.
2. When they’re included in the Piano/Conductor score (or other score from the 
regular performance materials), the title should remain in title case.
3. When they’re included in a songbook, I’m trying to show the title in the the 
expected format, which is all-caps (cf. modern Warner-Chappell imprints), e.g., 
“MY LUCKY DAY”.
4. I want to accomplish this entirely in the stylesheets, and not have to have 
two different ways of inputting the title in the code/content.

It seems odd to me that it’s so convoluted a process — and apparently so 
different, depending on whether it’s a string or a property.  =\

Thanks,
Kieren.

___

Kieren MacMillan, composer
www:  http://www.kierenmacmillan.info
email:  i...@kierenmacmillan.info


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


Re: Double clef when using cueDuringWithClef with a simultaneous clef change

2015-04-09 Thread Reinhold Kainhofer

Hi all,
Sorry for the noise, I have now figured it out myself: The cue clef 
after the cue notes is actually not a CueClef grob, but a CueEndClef. 
Once this is clear, using \once\omit Staff.CueEndClef works perfectly 
fine to hide the cue end clef (example attached).


Best regards,
Reinhold

Am 2015-04-09 um 13:45 schrieb Reinhold Kainhofer:

Hi all,
I have a piece, where the Fagotto part is written in tenor clef and 
after some measures rests switches to bass clef. Now, when I use 
\cueDuringWithClef to cue other instruments during those rests, the 
end of the cue notes will display two clefs: one to revert the cue 
clef (smaller) and one to make the actual clef change. Attached is a 
minimal example.


I have tried everything, like \hide CueClef etc, but I have not found 
any way to prevent the second cue clef (to unset the treble cue clef) 
from appearing...


Any idea how I can suppress the bass cue clef in this example?

Thanks a lot,
Reinhold



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



--
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://www.kainhofer.com/
 * Open Tools, Software Development, http://www.open-tools.net/
 * Edition Kainhofer, Music Publisher, http://www.edition-kainhofer.com/

\version 2.18.2

ObMusic = \relative c'' { c2 c | c c | c c | c c }
\addQuote Ob \ObMusic

\relative c { \clef tenor d1  | R1 | \cueDuringWithClef #Ob #UP treble { R1 \once\omit Staff.CueEndClef } | \clef bass c1 }



cue-during-with-clef.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problem with \break command

2015-04-09 Thread Peter Toye
Simon,

Thanks - it gets somewhere. 

The reason for the extra braces was that it's a cut-down tiny version of a 
more complex score with polyphony.

Best regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

-
Thursday, April 9, 2015, 4:15:26 PM, you wrote:


Hello,

the problem seems to be that the Bar_engraver takes part in triggering the clef 
on the new line, so without it no clef is printed. I tried to come up with a 
workaround, omitting the bar lines, but it has a major drawback: it still 
leaves some space for the omitted bar lines, which I can’t explain nor 
circumvent: all the overrides I tried had no effect. Anybody else?
Some other remarks:
It might make sense to make the context modifications (\remove) in a \layout 
environment also, such as to get more legible code. For the same reason, always 
store your music in variables, as explained in the Learning Manual. And: the {} 
around each music line aren’t necessary.

HTH, Simon

Am 09.04.2015 um 16:49 schrieb Peter Toye:
\version 2.18.2

\language english

\layout {
 ragged-right  = ##t
}

\score {

 \new Staff \with {
   \remove Bar_number_engraver
   \remove Time_signature_engraver
   \remove Bar_engraver

 }
 
 \new Voice \with {
   \remove Stem_engraver
 }
 
 \relative c {
   \key c \major
   \clef bass
   
   { g4_5 a_4 b_3 c_2 d_1  }
   \break

   {  g,4 a g a b a b a }
   \break
   
   {g4 af g af bf a bf a } 

 }

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


Re: Staff Spacing

2015-04-09 Thread Kieren MacMillan
Hi Chris,

 Can you give me an example of how to use the \editionEngraver or show me 
 where it is in the documentation?

https://github.com/openlilylib/openlilylib/tree/master/editorial-tools/edition-engraver

Hope this helps!
Kieren.
___

Kieren MacMillan, composer
www:  http://www.kierenmacmillan.info
email:  i...@kierenmacmillan.info


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


Re: \uppercase function

2015-04-09 Thread David Nalesnik
On Thu, Apr 9, 2015 at 11:48 AM, David Nalesnik david.nales...@gmail.com
wrote:



HTH  Who knows what HTHm stands for.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problem with \break command

2015-04-09 Thread Simon Albrecht

Hello,

the problem seems to be that the Bar_engraver takes part in triggering 
the clef on the new line, so without it no clef is printed. I tried to 
come up with a workaround, omitting the bar lines, but it has a major 
drawback: it still leaves some space for the omitted bar lines, which I 
can’t explain nor circumvent: all the overrides I tried had no effect. 
Anybody else?

Some other remarks:
It might make sense to make the context modifications (\remove) in a 
\layout environment also, such as to get more legible code. For the same 
reason, always store your music in variables, as explained in the 
Learning Manual. And: the {} around each music line aren’t necessary.


HTH, Simon

Am 09.04.2015 um 16:49 schrieb Peter Toye:

\version 2.18.2

\language english

\layout {
 ragged-right  = ##t
}

\score {

 \new Staff \with {
   \remove Bar_number_engraver
   \remove Time_signature_engraver
   \remove Bar_engraver

 }

 \new Voice \with {
   \remove Stem_engraver
 }

 \relative c {
   \key c \major
   \clef bass

   { g4_5 a_4 b_3 c_2 d_1  }
   \break

   {  g,4 a g a b a b a }
   \break

   {g4 af g af bf a bf a }

 }

}


\version 2.18.2

\language english

\layout {
  ragged-right  = ##t
}

break = { \break \bar  }

mus = \relative c {
  \key c \major
  \clef bass

  g4_5 a_4 b_3 c_2 d_1
  \break

  g,4 a g a b a b a
  \break

  g4 af g af bf a bf a
}

\score {
  \mus
  \layout {
\context {
  \Staff
  \remove Bar_number_engraver
  \remove Time_signature_engraver
  %\remove Bar_engraver
  \omit BarLine
  %\override BarLine.space-alist.next-note = 0
  %\override BarLine.gap = 0
  %\override BarLine.extra-spacing-height = #'(-inf.0 . +inf.0)
  %\override BarLine.break-align-anchor = 0
}
\context {
  \Voice
  \remove Stem_engraver
}
  }
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Scheme coding: 'number' cases vs 'string' cases

2015-04-09 Thread David Nalesnik
On Thu, Apr 9, 2015 at 12:48 PM, tisimst tisimst.lilyp...@gmail.com wrote:

 Pierre,

 Following Paul's advice, here's working code (which you probably already
 figured out, but just for the record). Note that you must use equal? for
 comparisons since it's the only one suited for strings:


You could also use the string-specific string=?

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


Shape function

2015-04-09 Thread Andrew Bernard
Where can I find the code for the \shape function mentioned in this list
about 2013?

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


Re: Problem with \break command

2015-04-09 Thread tisimst
Peter,

Here's what I've done that works nicely, but requires a slight manual
intervention (changes/additions in *BOLD*):

1. DON'T remove Bar_engraver because Clefs can only be printed after a bar
line (even an invisible one, like with \bar )
2. Set Timing.defaultBarType =  which correctly keeps the hidden barline
from taking up space, but still allows clefs to be printed at the beginning
of each system
3. Manually put \bar  before each \break or \pageBreak since you are
ALWAYS mid-measure without barlines. I usually put this in my own variable
like myBreak = { \bar  \break } to keep typing to a minimum.

%-- SNIP --

\version 2.18.2
\language english

\layout {
 ragged-right  = ##t
}

*myBreak = { \bar  \break }*
*myPageBreak = { \bar  \pageBreak }*

\score {
 \new Staff \with {
   \remove Bar_number_engraver
   \remove Time_signature_engraver
   *%\remove Bar_engraver*
 } \new Voice \with {
 \remove Stem_engraver
   } \relative c {
   *\set Timing.defaultBarType = *
   \key c \major
   \clef bass
   { g4_5 a_4 b_3 c_2 d_1  }
   *\myBreak*
   {  g,4 a g a b a b a }
   *\myBreak*
   {g4 af g af bf a bf a }
 }
}

%-- SNIP --

HTH,
Abraham

On Thu, Apr 9, 2015 at 8:50 AM, Peter Toye [via Lilypond] 
ml-node+s1069038n174273...@n5.nabble.com wrote:

 I'm trying to typeset some finger patterns for exercises and don't want
 bar numbers or barlines. This works fine for the first line, but after a
 \break command to force a new line for the next pattern the clef isn't
 shown.

 Obviously I'm doing something wrong, but as a relative Lilypond newbie who
 hasn't used it for a year, I can't work out what. Can some kind soul please
 help?

 \version 2.18.2

 \language english

 \layout {
  ragged-right  = ##t
 }

 \score {

  \new Staff \with {
\remove Bar_number_engraver
\remove Time_signature_engraver
\remove Bar_engraver

  }

  \new Voice \with {
\remove Stem_engraver
  }

  \relative c {
\key c \major
\clef bass

{ g4_5 a_4 b_3 c_2 d_1  }
\break

{  g,4 a g a b a b a }
\break

{g4 af g af bf a bf a }

  }

 }

 Regards,

 Peter
 [hidden email] http:///user/SendEmail.jtp?type=nodenode=174273i=0
 www.ptoye.com
 ___
 lilypond-user mailing list
 [hidden email] http:///user/SendEmail.jtp?type=nodenode=174273i=1
 https://lists.gnu.org/mailman/listinfo/lilypond-user


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://lilypond.1069038.n5.nabble.com/Problem-with-break-command-tp174273.html
  To start a new topic under User, email ml-node+s1069038n...@n5.nabble.com
 To unsubscribe from Lilypond, click here
 http://lilypond.1069038.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=2code=dGlzaW1zdC5saWx5cG9uZEBnbWFpbC5jb218Mnw4MzU3Njg3MDU=
 .
 NAML
 http://lilypond.1069038.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Problem-with-break-command-tp174273p174277.html
Sent from the User mailing list archive at Nabble.com.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Scheme coding: 'number' cases vs 'string' cases

2015-04-09 Thread Thomas Morley
2015-04-09 18:36 GMT+02:00 Pierre Perol-Schneider
pierre.schneider.pa...@gmail.com:
 Hi List, hi Schemers,

 I'm currently working on finding new tools to ease drawings with the 'path'
 command.
 I already found some nice ones that helped me to create new drawings and
 enhanced old snippets.
 That's what I've done here: http://lsr.di.unimi.it/LSR/Item?id=904

 However, I'm not satisfied with the code I'm using there; here's roughly how
 it's working:

 \version 2.18.2

 %% hereunder works fine:
 #(define-markup-command (smiley layout props smiley-choice)
   (number?)
   (interpret-markup layout props
 (case smiley-choice
   ((1)
 #{
\markup A
 #})
   ((2)
 #{
\markup smile
 #})
   (else
 #{
\markup
\null
 #})
   )))

 %% Test:
 \markup\column {
   \smiley #1
   \smiley #2
   \smiley #10
 }

 %% But I think It would be much better to use:
 #(define-markup-command (smiley-string layout props smiley-choice)
   (string?)
   (interpret-markup layout props
 (case smiley-choice
   ((A)
 #{
\markup A
 #})
   ((:))
 #{
\markup smile
 #})
   (else
 #{
\markup
\null
 #})
   )))

 %% Test:
 \markup\column {
   \smiley-string #A
   \smiley-string #:)
   \smiley-string #none
 }

 %%% ... does not work though.

 What am I missing?

 Thank you in advance,
 Cheers,
 Pierre



See this recent thread on -devel
http://lilypond.1069038.n5.nabble.com/banter-style-from-chord-names-jazz-ly-broken-case-problem-td174207.html

Cheers,
  Harm

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


Problem with \break command

2015-04-09 Thread Peter Toye
I'm trying to typeset some finger patterns for exercises and don't want bar 
numbers or barlines. This works fine for the first line, but after a \break 
command to force a new line for the next pattern the clef isn't shown.

Obviously I'm doing something wrong, but as a relative Lilypond newbie who 
hasn't used it for a year, I can't work out what. Can some kind soul please 
help?

\version 2.18.2

\language english

\layout {
  ragged-right  = ##t
}

\score {

  \new Staff \with {
\remove Bar_number_engraver
\remove Time_signature_engraver
\remove Bar_engraver
 
  }
  
  \new Voice \with {
\remove Stem_engraver
  }
  
  \relative c {
\key c \major
\clef bass

{ g4_5 a_4 b_3 c_2 d_1  }
\break

{  g,4 a g a b a b a }  
\break

{g4 af g af bf a bf a } 

  }

}

Regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Double clef when using cueDuringWithClef with a simultaneous clef change

2015-04-09 Thread Cynthia Karl

 Message: 5
 Date: Thu, 09 Apr 2015 13:45:39 +0200
 From: Reinhold Kainhofer reinh...@kainhofer.com
 To: LilyPond User Mailinglist lilypond-user@gnu.org
 Subject: Double clef when using cueDuringWithClef with a simultaneous
   clefchange
 Message-ID: 5523.7040...@kainhofer.com
 Content-Type: text/plain; charset=utf-8; Format=flowed
 
 Hi all,
 I have a piece, where the Fagotto part is written in tenor clef and 
 after some measures rests switches to bass clef. Now, when I use 
 \cueDuringWithClef to cue other instruments during those rests, the end 
 of the cue notes will display two clefs: one to revert the cue clef 
 (smaller) and one to make the actual clef change. Attached is a minimal 
 example.
 
 I have tried everything, like \hide CueClef etc, but I have not found 
 any way to prevent the second cue clef (to unset the treble cue clef) 
 from appearing...
 
 Any idea how I can suppress the bass cue clef in this example?

Why not switch to the bass clef at the beginning of the measures of rests 
rather than at the end?

 
 Thanks a lot,
 Reinhold
 
 -- 
 --
 Reinhold Kainhofer, reinh...@kainhofer.com, http://www.kainhofer.com/
  * Open Tools, Software Development, http://www.open-tools.net/
  * Edition Kainhofer, Music Publisher, http://www.edition-kainhofer.com/
 


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


Re: \uppercase function

2015-04-09 Thread Kieren MacMillan
Hi David,

 You are only using part of the code which I find here: 
 http://www.autoindustry536.bllog.opensubscriber.com/message/lilypond-de...@gnu.org/12807136.html

Yes! That was it. Thanks for the link.

 Note that the following will work with your simple example, though \uppercase 
 has to be directly before the markup:
 #(define-markup-command (uppercase layout props markup-argument)
(markup?)
(interpret-markup layout props
  (string-upcase (markup-string markup-argument

My issue is the same as in that 2009 post:

\uppercase \fromproperty #’header:title

fails. Any thoughts on how to fix that?

Thanks,
Kieren.

___

Kieren MacMillan, composer
www:  http://www.kierenmacmillan.info
email:  i...@kierenmacmillan.info


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


Hymns and justified lyrics

2015-04-09 Thread David B. Stocker

Hello LilyPonders,

I have a client who is working on a hymnal, and they would like for the 
beginning of the lines of verses to be left justified. The best way I 
can see to do this, from a visual standpoint, is to make the longest 
syllable on the first note of each line centered like it normally is, 
and then left-align all the others to that syllable.


Please see the attached minimal example.

First, I want to know whether it is possible to automate this behavior 
with LilyPond (I think it is).


And next, I'd like it if someone would point me in the direction of how 
to achieve this. My sense is that it is going to require some 
function-writing. I'm not a programmer (at all, really), but I'm not 
opposed to learning how to do this. Actually, I've been meaning to learn 
how to extend and modify some aspects of LilyPond for my own projects 
and doing so for a client-project is the best excuse I might have for 
jumping in.


Also, it's something that may be useful for other users as well, so at 
the very least it should be included in the LSR, and maybe made 
available for everyone in a future release.


I'm also open to collaboration on this, if anyone else is interested.

So, my hunch is that I'm going to write a function that queries the 
value of the left edge of the centered syllable in one verse, and then 
calculates the amount of offset to apply to the syllables at the same 
point in other verses on a case-by-case basis.


1) where can I start with learning this sort of tinkering, and 2) does 
anyone have other functions that behave in a similar way (fetching a 
value, making a calculation, and then applying it somewhere else) that I 
could study to figure out how I might do this?


Again, I have no idea, so let me know if I'm way off base here.

Thanks,

David

\version 2.18.2


\paper {

%line-width = 10\in

indent = 0\in

ragged-right = ##t

}


%% Default LilyPond beginning-of-line lyric alignment and spacing


\score {

\new Staff 

\new Voice = hymn {

\relative c'' {

\partial 2 a4 a \bar |

}

}

\new Lyrics \lyricsto hymn {

with my

}

\new Lyrics \lyricsto hymn {

through the

}

\new Lyrics \lyricsto hymn {

praise the

}

\new Lyrics \lyricsto hymn {

bless -- ed

}



}


%% Left justifying the first syllable in each verse results in funky 
note spacing



syllableLeft = { \once \override LyricText.self-alignment-X = #LEFT }


\score {

\new Staff 

\new Voice = hymn {

\relative c'' {

\partial 2 a4 a \bar |

}

}

\new Lyrics \lyricsto hymn {

\syllableLeft with my

}

\new Lyrics \lyricsto hymn {

\syllableLeft through the

}

\new Lyrics \lyricsto hymn {

\syllableLeft praise the

}

\new Lyrics \lyricsto hymn {

\syllableLeft bless -- ed

}



}


%% Left justifying syllables to the longest syllable by hand is 
time-consuming, inaccurate, and not persistent


%% if a different lyric font is chosen later


\score {

\new Staff 

\new Voice = hymn {

\relative c'' {

\partial 2 a4 a \bar |

}

}

\new Lyrics \lyricsto hymn {

\once \override LyricText.self-alignment-X = #1 with my

}

\new Lyrics \lyricsto hymn {

through the

}

\new Lyrics \lyricsto hymn {

\once \override LyricText.self-alignment-X = #0.35 praise the

}

\new Lyrics \lyricsto hymn {

\once \override LyricText.self-alignment-X = #0.8 bless -- ed

}



}




\version 2.18.2

\paper {
  %line-width = 10\in
  indent = 0\in
  ragged-right = ##t
}

%% Default LilyPond beginning-of-line lyric alignment and spacing

\score {
  \new Staff 
\new Voice = hymn {
  \relative c'' {
\partial 2 a4 a \bar |
  }
}
\new Lyrics \lyricsto hymn {
  with my
}
\new Lyrics \lyricsto hymn {
  through the
}
\new Lyrics \lyricsto hymn {
  praise the
}
\new Lyrics \lyricsto hymn {
  bless -- ed
}
  
}

%% Left justifying the first syllable in each verse results in funky note spacing

syllableLeft = { \once \override LyricText.self-alignment-X = #LEFT }

\score {
  \new Staff 
\new Voice = hymn {
  \relative c'' {
\partial 2 a4 a \bar |
  }
}
\new Lyrics \lyricsto hymn {
  \syllableLeft with my
}
\new Lyrics \lyricsto hymn {
  \syllableLeft through the
}
\new Lyrics \lyricsto hymn {
  \syllableLeft praise the
}
\new Lyrics \lyricsto hymn {
  \syllableLeft bless -- ed
}
  
}

%% Left justifying syllables to the longest syllable by hand is time-consuming, inaccurate, and not persistent
%% if a different lyric font is chosen later

\score {
  \new Staff 
\new Voice = hymn {
  \relative c'' {
\partial 2 a4 a \bar |
  }
}
\new Lyrics \lyricsto hymn {
  \once \override LyricText.self-alignment-X = #1 with my
}
\new Lyrics \lyricsto hymn {
  through the
}
\new Lyrics \lyricsto hymn {
  \once \override LyricText.self-alignment-X = #0.35 praise the
}
\new Lyrics \lyricsto hymn {
  \once \override LyricText.self-alignment-X = #0.8 bless 

Superimposing notes

2015-04-09 Thread Andrew Bernard
To superimpose two notes on top of each for a complex grace note structure, I 
have done the following, using multiple voices and shifts. When I use this 
technique inside my large complex score, the notes I am trying to superimpose 
push each other away as north pole to north pole magnets. What override may I 
be missing? In general, how to superimpose notes - precisely the opposite of 
avoiding collisions.

\version 2.19.18

treble = \relative c'' {
}

bass = \relative c' {
  \clef bass
  \time 1/4

  
    {
      s4
      \acciaccatura {
        \stemUp
        \bar 
        \once \override Beam.positions = #'(5 . 5)

        \once \override NoteHead.X-offset = #-3
        \once \override Stem.X-offset = #-2
        \once \hide NoteHead
        \once \hide Accidental
        cis,8[ \slurUp
        \change Staff = treble \stemDown
        a''8 a g'8]
        \once \override Staff.BarLine.transparent = ##f
        \bar |
        \change Staff = bass
      }
    }
    \new Voice {
      \voiceThree
      \change Staff = treble
      s4
      \grace { g'8 }
    }
    \new Voice {
      \voiceTwo
      \stemUp
      \tuplet 7/8 {ees,,,32  b16 g'16. cis32 } |
    }
  

  \stemUp
  \once \override NoteHead.X-offset = #12
  \once \override Stem.X-offset = #13.2

  cis32
  s4
}

\score {
  \new PianoStaff
  
    \new Staff = treble \with {
    }
    { \treble }

    \new Staff = bass \with {
    }
    { \bass }
  

  \layout {
    \context {
      \Score
      \accidentalStyle Score.dodecaphonic

      proportionalNotationDuration = #(ly:make-moment 1/48)
      \override SpacingSpanner.uniform-stretching = ##t
      \override Score.SpacingSpanner.strict-note-spacing = ##t

    }
  }
}


Andrew



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


Scheme coding: 'number' cases vs 'string' cases

2015-04-09 Thread Pierre Perol-Schneider
Hi List, hi Schemers,

I'm currently working on finding new tools to ease drawings with the 'path'
command.
I already found some nice ones that helped me to create new drawings and
enhanced old snippets.
That's what I've done here: http://lsr.di.unimi.it/LSR/Item?id=904

However, I'm not satisfied with the code I'm using there; here's roughly
how it's working:

\version 2.18.2

%% hereunder works fine:
#(define-markup-command (smiley layout props smiley-choice)
  (number?)
  (interpret-markup layout props
(case smiley-choice
  ((1)
#{
   \markup A
#})
  ((2)
#{
   \markup smile
#})
  (else
#{
   \markup
   \null
#})
  )))

%% Test:
\markup\column {
  \smiley #1
  \smiley #2
  \smiley #10
}

%% But I think It would be much better to use:
#(define-markup-command (smiley-string layout props smiley-choice)
  (string?)
  (interpret-markup layout props
(case smiley-choice
  ((A)
#{
   \markup A
#})
  ((:))
#{
   \markup smile
#})
  (else
#{
   \markup
   \null
#})
  )))

%% Test:
\markup\column {
  \smiley-string #A
  \smiley-string #:)
  \smiley-string #none
}

%%% ... does not work though.

What am I missing?

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


Re: Scheme coding: 'number' cases vs 'string' cases

2015-04-09 Thread Pierre Perol-Schneider
Thank you all very much!!
I'll keep your precious advices in my scheme-tool-box.

@Harm: I'll take a deeper look in 'list' and its associations

@Paul: you're wright, that's exactly what I was missing.

@Abraham: I'll use your snippet!

@David: I'll use 'string=?' since I never used it before, better for my
memory.

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


Re: Function to add a drone staff?

2015-04-09 Thread Sven Axelsson
On 9 April 2015 at 17:27, Paul Morris p...@paulwmorris.com wrote:
 Gilles Sadowski wrote
 Is there a way (i.e. a function) to automatically add a staff for a
 bagpipe's drone note(s)?

 Hi, Here's a start, a function to change all the pitches of a melody to a
 given pitch.  Not tested on real music... (Since you only want the drone
 notes in midi maybe you don't need to deal with chords, which makes the
 coding simpler.)

 HTH,
 -Paul

 Hat tip to David Kastrup for this example:
 https://lists.gnu.org/archive/html/lilypond-user/2012-03/msg00621.html

 %%%

 dronify =
 #(define-music-function (parser location drone melody)
(ly:pitch? ly:music?)
(map-some-music
 (lambda (m)
   (and (ly:pitch? (ly:music-property m 'pitch))
(begin
 (set! (ly:music-property m 'pitch) drone)
 m)))
 melody)
melody)

 melody = \relative f' {
   c4 r c8 d8 r4
   g2 r4 b4
 }

 
   \melody
   \dronify g' \melody
   \dronify g \melody




 --
 View this message in context: 
 http://lilypond.1069038.n5.nabble.com/Function-to-add-a-drone-staff-tp174261p174278.html
 Sent from the User mailing list archive at Nabble.com.

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

Intersting. I have never tried to generate midi output for bagpipe
music. I suspect grace notes are not handled well. But in regards to
the dronification, all of the music, both melody and drone, should be
played legato. Is that also something that could be set up easily with
a music function?

I'm the maintainer of Lilypond's bagpipe mode, by the way.

-- 
Sven Axelsson
++[+
-].+..+.+.-.+...
+++.-.++..++.++....

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


Re: Staff Spacing

2015-04-09 Thread Chris Trahan
Kieren,

Thanks. I've never used GitHub. I created an account but don't see how to
download the files. When I right-click and save as, I get the html code.

Chris

On Thu, Apr 9, 2015 at 9:54 AM, Kieren MacMillan 
kieren_macmil...@sympatico.ca wrote:

 Hi Chris,

  Can you give me an example of how to use the \editionEngraver or show me
 where it is in the documentation?


 https://github.com/openlilylib/openlilylib/tree/master/editorial-tools/edition-engraver

 Hope this helps!
 Kieren.
 ___

 Kieren MacMillan, composer
 www:  http://www.kierenmacmillan.info
 email:  i...@kierenmacmillan.info


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


how to prevent natural sign?

2015-04-09 Thread Jinsong Zhao

Hi there,

I don't want the natural sign to be displayed. However, I don't find a 
way to do so.


Many thanks!

Regards,
Jinsong

\version 2.19.18
\relative c'' {
  \clef treble
% \set Staff.extraNatural = ##f
 r4  g bes  r  g b 
}




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


Re: Scheme coding: 'number' cases vs 'string' cases

2015-04-09 Thread tisimst
Pierre,

Following Paul's advice, here's working code (which you probably already
figured out, but just for the record). Note that you must use equal? for
comparisons since it's the only one suited for strings:

%-- SNIP --

#(define-markup-command (smiley-string layout props smiley-choice)
  (string?)
  (interpret-markup layout props
(cond
  ((equal? smiley-choice A)
#{
   \markup A
#})
  ((equal? smiley-choice :))
#{
   \markup smile
#})
  (else
#{
   \markup
   \null
#})
  )))

%% Test:
\markup\column {
  \smiley-string #A
  \smiley-string #:)
  \smiley-string #none
}

%-- SNIP --

- Abraham

On Thu, Apr 9, 2015 at 11:40 AM, Paul Morris [via Lilypond] 
ml-node+s1069038n174294...@n5.nabble.com wrote:

  Schneidy wrote
 What am I missing?

 Hi Pierre,

 case doesn't work with strings, so you'd need to use cond instead.

 Cheers,
 -Paul

 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://lilypond.1069038.n5.nabble.com/Scheme-coding-number-cases-vs-string-cases-tp174287p174294.html
  To start a new topic under User, email ml-node+s1069038n...@n5.nabble.com
 To unsubscribe from Lilypond, click here
 http://lilypond.1069038.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=2code=dGlzaW1zdC5saWx5cG9uZEBnbWFpbC5jb218Mnw4MzU3Njg3MDU=
 .
 NAML
 http://lilypond.1069038.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Scheme-coding-number-cases-vs-string-cases-tp174287p174295.html
Sent from the User mailing list archive at Nabble.com.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: box around notes

2015-04-09 Thread Klaus Blum
Hi David, 


David Nalesnik-2 wrote
 I hope that one day this will be trouble-free!

I didn't know that things can get that complicated when diving deep into a
lily pond... ;-)

David Nalesnik-2 wrote
 How did you arrive at 1?

Well, I just took some insane value to get above anything else...

David Nalesnik-2 wrote
 Something somewhere has calculated vertical spacing too early, and this
 messes up the positioning of the Beam grob.
 
 The problem is in the stencil callback for Box, which in your version is
 set to the same function as MusicBoxer.  When you request information
 about
 Y-extent, the function ly:relative-group-extent triggers vertical spacing
 routines before LilyPond is ready.  She must determine line breaks before
 the final stamp is put on the vertical aspect.
 
 I believe what is needed is a pure callback for Y-extent, so that
 LilyPond can make a safe estimate (i.e., without side effects) to use for
 purposes of line-breaking.  

If there is a way to have a separate callback, just to return an estimate
for Y-extent, IMO it would be okay just to return '(0 . 0) because the boxes
don't need to avoid collision with anything. (Just making LilyPond believe
the boxes have no Y-extent maybe could also prevent them pushing away the
dynamics...) 
But if that means not to use ly:relative-group-extent at all, things really
start to get unpleasant... 
In that case, I'd just introduce a user-settable property for Y-extent
instead of hard-coding. At least, the X-extent would be automatic. Maybe
I'll try that in the evening.

David Nalesnik-2 wrote
 You can read about purity here:
 http://lilypond.org/doc/v2.19/Documentation/contributor/understanding-pure-properties

Yeah, always open to new challenges, even if understanding this will be a
task for a lifetime... I'll be back in a few years. ;-)  
Seriously, I'll give it a try. 

David Nalesnik-2 wrote
 Hope this helps somewhat!

Definitely!

Cheers, 
Klaus




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/box-around-notes-tp35581p174286.html
Sent from the User mailing list archive at Nabble.com.

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


Re: \uppercase function

2015-04-09 Thread David Nalesnik
On Thu, Apr 9, 2015 at 3:02 PM, Kieren MacMillan 
kieren_macmil...@sympatico.ca wrote:

 Hi David,

  you could just as easily write the following:
 
  \header {
   myTitle = #myOtherTitle
   title = \markup {
 from \italic #(string-upcase myTitle)
   }
  }

 Yes, but at that point, why not just write

  \header {
title = “MY OTHER TITLE
  }

 ??  ;)


This might prove the least labor-intensive solution :)



 Here’s the concrete use-case:
 1. I have musical theatre pieces with (naturally enough) title case
 titles, such as “My Lucky Day”.
 2. When they’re included in the Piano/Conductor score (or other score from
 the regular performance materials), the title should remain in title case.
 3. When they’re included in a songbook, I’m trying to show the title in
 the the expected format, which is all-caps (cf. modern Warner-Chappell
 imprints), e.g., “MY LUCKY DAY”.
 4. I want to accomplish this entirely in the stylesheets, and not have to
 have two different ways of inputting the title in the code/content.

 It seems odd to me that it’s so convoluted a process — and apparently so
 different, depending on whether it’s a string or a property.  =\


To make the title uppercase we have to work with it as a string.  I can't
extract the string from the \markup \fromproperty #'header:title statement,
presumably because header:title hasn't even been defined yet:

\header {
  title = myTitle
  title = \markup \fromproperty #'header:title
  #(format #t ~%is header:title defined? ~a~%~% (defined? 'header:title))
}
\markup {
  \null
}

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


Re: how to prevent natural sign?

2015-04-09 Thread David Nalesnik
Hi,

On Thu, Apr 9, 2015 at 9:10 AM, Jinsong Zhao jsz...@yeah.net wrote:

 Hi there,

 I don't want the natural sign to be displayed. However, I don't find a way
 to do so.

 Many thanks!

 Regards,
 Jinsong

 \version 2.19.18
 \relative c'' {
   \clef treble
 % \set Staff.extraNatural = ##f
  r4  g bes  r  g b 
 }



You could do something like:

\version 2.19.17
\relative c'' {
  \clef treble
  % \set Staff.extraNatural = ##f
  r4  g bes  r \once \omit Accidental  g  b 
}

However, I wonder if you doing this as part of a more contemporary
accidental style.  In that case, you should see:

http://www.lilypond.org/doc/v2.19/Documentation/notation/displaying-pitches#automatic-accidentals

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


Double clef when using cueDuringWithClef with a simultaneous clef change

2015-04-09 Thread Reinhold Kainhofer

Hi all,
I have a piece, where the Fagotto part is written in tenor clef and 
after some measures rests switches to bass clef. Now, when I use 
\cueDuringWithClef to cue other instruments during those rests, the end 
of the cue notes will display two clefs: one to revert the cue clef 
(smaller) and one to make the actual clef change. Attached is a minimal 
example.


I have tried everything, like \hide CueClef etc, but I have not found 
any way to prevent the second cue clef (to unset the treble cue clef) 
from appearing...


Any idea how I can suppress the bass cue clef in this example?

Thanks a lot,
Reinhold

--
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://www.kainhofer.com/
 * Open Tools, Software Development, http://www.open-tools.net/
 * Edition Kainhofer, Music Publisher, http://www.edition-kainhofer.com/

\version 2.18.2

ObMusic = \relative c'' { c2 c | c c | c c | c c }
\addQuote Ob \ObMusic

\relative c { \clef tenor d1  | R1 | \cueDuringWithClef #Ob #UP treble { R1 } | \clef bass c1 }



cue-during-with-clef.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Shape function

2015-04-09 Thread Mark Knoop
At 19:16 on 09 Apr 2015, Andrew Bernard wrote:
Where can I find the code for the \shape function mentioned in this
list about 2013?

\shape is in Lilypond

Documentation/notation/modifying-shapes.html

\shapeII is in openlilylib

https://github.com/openlilylib/openlilylib/tree/master/notation-snippets/shaping-bezier-curves


-- 
Mark Knoop

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


Re: how to prevent natural sign?

2015-04-09 Thread David Nalesnik
On Thu, Apr 9, 2015 at 9:21 AM, David Nalesnik david.nales...@gmail.com
wrote:

 Hi,

 On Thu, Apr 9, 2015 at 9:10 AM, Jinsong Zhao jsz...@yeah.net wrote:

 Hi there,

 I don't want the natural sign to be displayed. However, I don't find a
 way to do so.

 Many thanks!

 Regards,
 Jinsong

 \version 2.19.18
 \relative c'' {
   \clef treble
 % \set Staff.extraNatural = ##f
  r4  g bes  r  g b 
 }



 You could do something like:

 \version 2.19.17
 \relative c'' {
   \clef treble
   % \set Staff.extraNatural = ##f
   r4  g bes  r \once \omit Accidental  g  b 
 }

 However, I wonder if you doing this as part of a more contemporary
 accidental style.  In that case, you should see:


 http://www.lilypond.org/doc/v2.19/Documentation/notation/displaying-pitches#automatic-accidentals



Though the question is whether the second note on the third staff line is
meant to be a B-flat, and thus wouldn't require a flat in ordinary
notation...  In that case you need to write bes again instead of b.

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


\uppercase function

2015-04-09 Thread Kieren MacMillan
Hi all,

I’m looking for an \uppercase function to use in Lilypond — this one (which I 
found somewhere, but can’t remember where now) doesn’t seem to work:

\version 2.19

#(define-markup-command (uppercase paper props markup-argument) (markup?)
(interpret-markup paper (prepend-alist-chain 'case 'up props) markup-argument))

\markup \uppercase “Test

Any hints or solutions would be appreciated.

Thanks,
Kieren.
___

Kieren MacMillan, composer
www:  http://www.kierenmacmillan.info
email:  i...@kierenmacmillan.info


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