Re: grace notes MIDI playback

2015-12-03 Thread David Wright
On Thu 03 Dec 2015 at 21:08:30 (+0100), David Kastrup wrote:
> David Wright  writes:
> 
> > On Sat 28 Nov 2015 at 06:23:00 (-0700), Gilberto Agostinho wrote:
> >> David Kastrup wrote
> >> > So how should this be rigged instead?  Nominal length, unless that would
> >> > swallow all of the following notelength or more?  And otherwise scale
> >> > down repeatedly by a factor of 2 until it doesn't?
> >> 
> >> That sounds like an excellent approach as appogiaturas should be played 
> >> with
> >> their nominal lengths. For instance, see the first bar of the original
> >> notation of Mozart's Alla Turca rondo:
> >> 
> >>  
> >> 
> >> It should be interpreted as:
> >> 
> >> 
> >>  
> >
> > That's not true for all appoggiaturas of that era, is it? I was
> > taught that c8 b4. would be performed as c4 b8 or even c4 b8-. which
> > would sound like c4 b16 r16 perhaps.
> >
> > Looking in learned texts, I've just come across one where
> > c8 b2 r2 is to be performed c2 b2 so that rest is gone.
> >
> > (c8 is an appoggiatura in all cases above.)
> 
> Man, that's just sick.

Sorry, I don't understand.

> Are there rules given in your learned texts about what to pick when?

Any "rules" (conventions might be a better word) of any particular
period (and locality) have to be modified by context, taste etc.
So I suspect you know the answer is no. It also depends on who you
read and who you talk to/take the advice of.

Cheers,
David.

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


Re: Introducing "LilyPond HTML Live Score"

2015-12-03 Thread Colin Campbell

On 15-11-29 11:08 AM, Mathieu Demange wrote:

Hello all,

I've been developing a tool which is at a very early stage now, but I 
humbly guess you should like the idea. Check this very simple page and 
click the "play" button (or you can click any note or rest).


http://www.mathieudemange.fr/lilypond-html-live-score-demo/

There's a public repository for the tool here :

https://gitlab.com/sigmate/lilypond-html-live-score

And the score used in the demo is a transcription I made which is a 
free score (CC-BY-SA) available on this repo :


https://gitlab.com/sigmate/transcription-pools-vibes-solo

Looking forward to hear your feedback!

Cheers,

Mathieu



Have you talked to Adam Spiers, lilypond-de...@adamspiers.org who did a 
similar thing a year or so ago?


Cheers,
Colin

--
I've learned that you shouldn't go through life with a catcher's mitt on both 
hands.
You need to be able to throw something back.
-Maya Angelou, poet (1928- )


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


Re: Marks and metronome marks per staff group

2015-12-03 Thread Kieren MacMillan
Hi,

This is easily accomplished through the use of a [custom] MarksLine or 
ScoreMarks context. Search the archives for numerous examples/snippets.

If you’re looking for a “one-click” solution, that’s definitely a feature 
request… and likely one that’s a long way down the developers’ To Do List.

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


Marks and metronome marks per staff group

2015-12-03 Thread thorne
Hi.  I am wondering about the issue referenced in a thread
on this list that I found from early 2012 [1], namely, the
question whether there is a way to have metronome and
other marks appear not only at the top of a full score, but
also (for example) above the first violin line (or whatever
is the top line of the strings, in a frenched score, or not
at all if all the strings are silent on that page).  I think
the question in the proper lingo is whether it is possible
to add or remove the relevant engravers in the staff group
context.  I've tried and had it not work.

One person in that thread said he was going to file a bug
report, so I thought maybe something had changed by now.  Is
there a way to accomplish this result now?

Just for context, an oft-cited reference at least in the
U.S. is the Modern Orchestra Lbrarian's Association "Music
Preparation Guidelines" document, which, on page 4, in the
second paragraph under the section titled "The Music," says:
"All tempo indications should appear above the top staff and
above the first violin line on each score page." [2]


[1] http://lists.gnu.org/archive/html/lilypond-user/2011-12/msg00395.html

[2] 
http://mola-inc.org/article/Music-Preparation-Guidelines-for-Orchestral-Music.pdf

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


Re: grace notes MIDI playback

2015-12-03 Thread Shane Brandes
Classical era Grace notes are taken out of the following note at their
full temporal value, unless flagged then they come before the beat.
Generally the most important thing is that in both classical era and
baroque music the value of the graces are an equal subdivision of the
tone so graced. Somewhere in the Romantic era that habit must have
gotten lost. It was always amusing to see students coming in
unprepared for the wrath that resulted in messing that little facet
up. Most amusing ever was the fellow who came in to teach a master
class and tried to "correct" some mordents in a slow movement in a
Bach partita. They were executed perfectly and the poor girl being
"corrected" was totally perplexed. So he finally sat down at the piano
and gave an example. The girl carefully explained to his chagrin how
they needed to be properly subdivided.


On Thu, Dec 3, 2015 at 3:18 PM, Gilberto Agostinho
 wrote:
> David Wright wrote
>> That's not true for all appoggiaturas of that era, is it?
>
> Well, with old music it's always tricky to find rules for these type of
> things, and to cater our MIDI output around it will lead to madness IMO. But
> I'd say it's quite safe to assume the meaning of contemporary appoggiaturas
> (this problem is similar to the accacciaturaL the modern is to be played as
> short as possible on the beat, but in old music this will vary wildly).
>
>
>> [they] suspends the principal note by taking away the time-value of the
>> appoggiatura prefixed to it
>
> From: https://en.wikipedia.org/wiki/Ornament_%28music%29#Appoggiatura
>
> For some of the old rules, see pp. 43--46 from
> https://books.google.cz/books?id=TMdf1SioFk4C&pg=PA44&dq=appoggiatura&hl=en&sa=X&redir_esc=y#v=onepage&q=appoggiatura&f=false
>
>
>
>
>
> --
> View this message in context: 
> http://lilypond.1069038.n5.nabble.com/grace-notes-MIDI-playback-tp184215p184435.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

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


Re: Can \barNumberCheck be set to error?

2015-12-03 Thread Urs Liska


Am 03.12.2015 um 23:34 schrieb thorne:
> Thank you.  I have changed the relevant bit to
>
>  (begin
>(ly:input-message (*location*) "")
>(ly:error "Barcheck failed got ~a expect ~a" cbn n)))
>
> which works, but is not very elegant.  This is the first time I've
> looked at the Internals documentation.  I didn't see anything like a
> "ly:input-error" function that I would have expected.  Is this the
> idiomatic way to send a location in the input file along with an error
> message?

I have written this function which I think is more idiomatic:

test =
#(define-void-function (expected got)(integer? integer?)
   (let*
((loc (ly:input-file-line-char-column (*location*) ))
 (locstring
  (format "~a:~a:~a" (first loc) (second loc) (third loc
   (ly:error (format "Barcheck failed in ~a. Got ~a, expected ~a"
locstring expected got

\test 5 4

which you could adapt and include into your code.
Maybe it can be improved so the link to the source also works. Right now
this seems to look for the file "

fatal error: Barcheck failed in
/home/uliska/Aktuell/lily-bugs/barcheck-error/barcheck-error.ly"

Actually I think having the option to have barcheck failures cause
errors instead of warning would be a nice thing for LilyPond.

HTH Urs



>
>
> On Wed, Dec 2, 2015 at 11:39 PM, David Kastrup  wrote:
>> thorne  writes:
>>
>>> I am just wondering if there is any way to set only \barNumberCheck to
>>> generate an error instead of a warning.
>>>
>>> I am using a Makefile to handle a project.  I am using \barNumberCheck
>>> on every bar on every part.  It is convenient to have Lilypond error
>>> any time a bar number check fails so that the render fails and I know
>>> right away.
>>>
>>> I tried doing -dwarning-as-error, which works, but then makes the
>>> render fail any time anything generates a warning, which is probably
>>> not something I can have.
>>>
>>> Or, is there a better approach in general?
>> \barNumberCheck is defined in ly/music-functions-init.ly.  It's less
>> than a dozen lines.  Just copy that definition and replace the call to
>> ly:input-warning with something else.
>>
>> --
>> David Kastrup
>
>

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


Re: Can \barNumberCheck be set to error?

2015-12-03 Thread thorne
Thank you.  I have changed the relevant bit to

 (begin
   (ly:input-message (*location*) "")
   (ly:error "Barcheck failed got ~a expect ~a" cbn n)))

which works, but is not very elegant.  This is the first time I've
looked at the Internals documentation.  I didn't see anything like a
"ly:input-error" function that I would have expected.  Is this the
idiomatic way to send a location in the input file along with an error
message?


On Wed, Dec 2, 2015 at 11:39 PM, David Kastrup  wrote:
> thorne  writes:
>
>> I am just wondering if there is any way to set only \barNumberCheck to
>> generate an error instead of a warning.
>>
>> I am using a Makefile to handle a project.  I am using \barNumberCheck
>> on every bar on every part.  It is convenient to have Lilypond error
>> any time a bar number check fails so that the render fails and I know
>> right away.
>>
>> I tried doing -dwarning-as-error, which works, but then makes the
>> render fail any time anything generates a warning, which is probably
>> not something I can have.
>>
>> Or, is there a better approach in general?
>
> \barNumberCheck is defined in ly/music-functions-init.ly.  It's less
> than a dozen lines.  Just copy that definition and replace the call to
> ly:input-warning with something else.
>
> --
> David Kastrup



-- 
þ

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


Re: accidentals for just intonation

2015-12-03 Thread Graham Breed

On 03/12/15 12:11, N. Andrew Walsh wrote:


If your system requires only a range in cents to determine which accidental
to use, that should be easy to calculate and apply. If it requires only the
prime factors of the ratios, that should be easy, too. If it's some mixture
of them, that works as well. And for all of them, it should be possible to
output something different to different instrumental parts, as needed.


Prime factorization to control the accidentals wasn't easy when I looked 
at it.  The only information available when the accidental was chosen is 
the pitch-difference, so that's what I used.  There are ways 
communicating, though, like choosing different accidental sets according 
to the factors or building the accidental string recursively.  Maybe 
it's easier with new versions of Lilypond and improved documentation.  I 
did this a while ago and learned the internals as I went along.  I 
welcome assistance from more experienced Lilypond-Schemers, and if it's 
going to be re-implemented from scratch, at least my code's there as an 
example of what can work.



Graham




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


Re: grace notes MIDI playback

2015-12-03 Thread Gilberto Agostinho
David Wright wrote
> That's not true for all appoggiaturas of that era, is it?

Well, with old music it's always tricky to find rules for these type of
things, and to cater our MIDI output around it will lead to madness IMO. But
I'd say it's quite safe to assume the meaning of contemporary appoggiaturas
(this problem is similar to the accacciaturaL the modern is to be played as
short as possible on the beat, but in old music this will vary wildly).


> [they] suspends the principal note by taking away the time-value of the
> appoggiatura prefixed to it

From: https://en.wikipedia.org/wiki/Ornament_%28music%29#Appoggiatura

For some of the old rules, see pp. 43--46 from
https://books.google.cz/books?id=TMdf1SioFk4C&pg=PA44&dq=appoggiatura&hl=en&sa=X&redir_esc=y#v=onepage&q=appoggiatura&f=false





--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/grace-notes-MIDI-playback-tp184215p184435.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: grace notes MIDI playback

2015-12-03 Thread David Kastrup
David Wright  writes:

> On Sat 28 Nov 2015 at 06:23:00 (-0700), Gilberto Agostinho wrote:
>> David Kastrup wrote
>> > So how should this be rigged instead?  Nominal length, unless that would
>> > swallow all of the following notelength or more?  And otherwise scale
>> > down repeatedly by a factor of 2 until it doesn't?
>> 
>> That sounds like an excellent approach as appogiaturas should be played with
>> their nominal lengths. For instance, see the first bar of the original
>> notation of Mozart's Alla Turca rondo:
>> 
>>  
>> 
>> It should be interpreted as:
>> 
>> 
>>  
>
> That's not true for all appoggiaturas of that era, is it? I was
> taught that c8 b4. would be performed as c4 b8 or even c4 b8-. which
> would sound like c4 b16 r16 perhaps.
>
> Looking in learned texts, I've just come across one where
> c8 b2 r2 is to be performed c2 b2 so that rest is gone.
>
> (c8 is an appoggiatura in all cases above.)

Man, that's just sick.  Are there rules given in your learned texts
about what to pick when?

-- 
David Kastrup

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


Re: grace notes MIDI playback

2015-12-03 Thread David Wright
On Sat 28 Nov 2015 at 06:23:00 (-0700), Gilberto Agostinho wrote:
> David Kastrup wrote
> > So how should this be rigged instead?  Nominal length, unless that would
> > swallow all of the following notelength or more?  And otherwise scale
> > down repeatedly by a factor of 2 until it doesn't?
> 
> That sounds like an excellent approach as appogiaturas should be played with
> their nominal lengths. For instance, see the first bar of the original
> notation of Mozart's Alla Turca rondo:
> 
>  
> 
> It should be interpreted as:
> 
>  

That's not true for all appoggiaturas of that era, is it? I was
taught that c8 b4. would be performed as c4 b8 or even c4 b8-. which
would sound like c4 b16 r16 perhaps.

Looking in learned texts, I've just come across one where
c8 b2 r2 is to be performed c2 b2 so that rest is gone.

(c8 is an appoggiatura in all cases above.)

Cheers,
David.

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


Re: parameters in lyrics?

2015-12-03 Thread David Nalesnik
On Thu, Dec 3, 2015 at 11:04 AM, David Nalesnik 
wrote:

>
>
> On Thu, Dec 3, 2015 at 10:54 AM, David Nalesnik 
> wrote:
>
>> Hi,
>>
>> On Thu, Dec 3, 2015 at 10:35 AM, Urs Liska  wrote:
>>
>>>
>>>
> Maybe I'm missing something, but wouldn't the following suffice?
>
>
OK, sorry for the noise...I see that it's the positioning problem of the
revert vs. the bracketing function...

I'm awake now :)

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


Re: parameters in lyrics?

2015-12-03 Thread David Nalesnik
On Thu, Dec 3, 2015 at 10:54 AM, David Nalesnik 
wrote:

> Hi,
>
> On Thu, Dec 3, 2015 at 10:35 AM, Urs Liska  wrote:
>
>>
>>
>> Am 03.12.2015 um 17:30 schrieb Graham King:
>>
>> On Thu, 2015-12-03 at 17:12 +0100, Urs Liska wrote:
>>
>>
>>
>> Am 03.12.2015 um 17:10 schrieb Graham King:
>>
>> On Thu, 2015-12-03 at 16:57 +0100, Urs Liska wrote:
>>
>> Ah, forgot: the ending function would also have to be written before the
>> syllable, so
>>
>> Three \foo deaf and \bar blind mice are \foobar alive.
>>
>> should return
>>
>> Three [deaf and blind] mice are [alive]
>>
>> Uh, no.  I'd like it to return
>> Three [deaf and] blind mice are [alive]
>>
>> That's the bit I'm struggling with.
>>
>>
>> You can't do that (I think). But I don't see a problem with writing the
>> function before the syllable.
>> Or what am I missing?
>>
>> I've got a lot of music with
>>
>> foo = \override LyricText.font-shape = #'italic
>> bar = \revert LyricText.font-shape
>>
>> and I'd like to redefine foo and bar to replace the italics with
>> [bracketed text].  And to switch between italics and brackets easily.
>>
>>
>> To achieve that it doesn't matter if the function is placed before or
>> after the syllable.
>> Your function has to merge the syllable with the surrounding (be it a
>> bracket or an \override) anyway, so you can handle the pre-/postfix issue
>> within the function itself.
>>
>> But as I wrote in another reply (with full code example) I don't know how
>> to mix music and lyrics inside that function. But surely someone else can
>> help with that.
>>
>>
> This looks too hideous to be the right way, but...
>

 Yes, my sense was right

Maybe I'm missing something, but wouldn't the following suffice?

\version "2.19.21"

start =
#(define-scheme-function (parser location syllable)(markup?)
   (format "[~a" syllable))

start = \override LyricText.color = #red

end =
#(define-scheme-function (parser location syllable)(markup?)
   (format "~a]" syllable))

end = \revert LyricText.color

wrap =
#(define-scheme-function (parser location syllable)(markup?)
   (format "[~a]" syllable))

wrap = \once \override LyricText.color = #red

theNotes = {
  \relative { e''1 d c d e }
}

theWords = \lyricmode {
  Three \start blind \end mice are \wrap alive
}

\score
{
  \new StaffGroup
  <<
\new Voice = "voice" \theNotes
\new Lyrics \lyricsto "voice" \theWords
  >>
}

(Just comment out the definitions you don't want.)

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


Re: parameters in lyrics?

2015-12-03 Thread David Nalesnik
Hi,

On Thu, Dec 3, 2015 at 10:35 AM, Urs Liska  wrote:

>
>
> Am 03.12.2015 um 17:30 schrieb Graham King:
>
> On Thu, 2015-12-03 at 17:12 +0100, Urs Liska wrote:
>
>
>
> Am 03.12.2015 um 17:10 schrieb Graham King:
>
> On Thu, 2015-12-03 at 16:57 +0100, Urs Liska wrote:
>
> Ah, forgot: the ending function would also have to be written before the
> syllable, so
>
> Three \foo deaf and \bar blind mice are \foobar alive.
>
> should return
>
> Three [deaf and blind] mice are [alive]
>
> Uh, no.  I'd like it to return
> Three [deaf and] blind mice are [alive]
>
> That's the bit I'm struggling with.
>
>
> You can't do that (I think). But I don't see a problem with writing the
> function before the syllable.
> Or what am I missing?
>
> I've got a lot of music with
>
> foo = \override LyricText.font-shape = #'italic
> bar = \revert LyricText.font-shape
>
> and I'd like to redefine foo and bar to replace the italics with
> [bracketed text].  And to switch between italics and brackets easily.
>
>
> To achieve that it doesn't matter if the function is placed before or
> after the syllable.
> Your function has to merge the syllable with the surrounding (be it a
> bracket or an \override) anyway, so you can handle the pre-/postfix issue
> within the function itself.
>
> But as I wrote in another reply (with full code example) I don't know how
> to mix music and lyrics inside that function. But surely someone else can
> help with that.
>
>
This looks too hideous to be the right way, but...

 \version "2.19.21"

start =
#(define-scheme-function (parser location syllable)(markup?)
   (format "[~a" syllable))

start =
#(define-scheme-function (parser location)()
   (ly:parser-include-string "\\override LyricText.color = #red"))

end =
#(define-scheme-function (parser location syllable)(markup?)
   (format "~a]" syllable))

end =
#(define-scheme-function (parser location syllable)(markup?)

   (ly:parser-include-string "\\revert LyricText.color")
   syllable)


wrap =
#(define-scheme-function (parser location syllable)(markup?)
   (format "[~a]" syllable))

wrap =
#(define-scheme-function (parser location) ()
   (ly:parser-include-string "\\once \\override LyricText.color = #red"))

theNotes = {
  \relative { e''1 d c d e }
}

theWords = \lyricmode {
  Three \start blind \end mice are \wrap alive
}

\score
{
  \new StaffGroup
  <<
\new Voice = "voice" \theNotes
\new Lyrics \lyricsto "voice" \theWords
  >>
}

%%

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


Re: parameters in lyrics?

2015-12-03 Thread Urs Liska


Am 03.12.2015 um 17:30 schrieb Graham King:
> On Thu, 2015-12-03 at 17:12 +0100, Urs Liska wrote:
>>
>>
>> Am 03.12.2015 um 17:10 schrieb Graham King:
>>
>>> On Thu, 2015-12-03 at 16:57 +0100, Urs Liska wrote:
 Ah, forgot: the ending function would also have to be written
 before the syllable, so

 Three \foo deaf and \bar blind mice are \foobar alive.

 should return

 Three [deaf and blind] mice are [alive]

>>> Uh, no.  I'd like it to return
>>> Three [deaf and] blind mice are [alive]
>>>
>>> That's the bit I'm struggling with.
>>
>> You can't do that (I think). But I don't see a problem with writing
>> the function before the syllable.
>> Or what am I missing?
> I've got a lot of music with
>
> foo = \override LyricText.font-shape = #'italic
> bar = \revert LyricText.font-shape
>
> and I'd like to redefine foo and bar to replace the italics with
> [bracketed text].  And to switch between italics and brackets easily.

To achieve that it doesn't matter if the function is placed before or
after the syllable.
Your function has to merge the syllable with the surrounding (be it a
bracket or an \override) anyway, so you can handle the pre-/postfix
issue within the function itself.

But as I wrote in another reply (with full code example) I don't know
how to mix music and lyrics inside that function. But surely someone
else can help with that.

Urs

> Apologies: I should have made that clear at the top of the thread.
>
> I might just have to redefine the syntax altogether, so that I can say
> something like:
> Three \foo { deaf and blind } mice.
> Going quiet for a bit while I think about that...
>
>
> ___
> 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: LyricText center-on-word breaks lyricMelismaAlignment

2015-12-03 Thread Thomas Morley
2015-11-12 6:11 GMT+01:00 Kieren MacMillan :
> Hi all,
>
> It seems that, when using the very useful center-on-word function 
> (), setting lyricMelimsaAlignment 
> to anything other than integer values (including #LEFT, etc.) fails.
>
> Fixing the snippet is definitely beyond my Scheme-fu…
> Any help would be appreciated.
>
> Thanks,
> Kieren.
> 



Hi Kieren,

below an improved and extended version of the snippet.
Should be possible to use override/set for self-alignment-X and
lyricMelimsaAlignment as you like now.
If no drawbacks happened, I'll put it in LSR soon, replacing the older one.

Btw, this snippet has the same problems as the engraver in this thread:
http://lilypond.1069038.n5.nabble.com/aligning-melisma-and-non-melisma-lyrics-across-staves-in-the-same-system-td184122.html
- multiple stencils are created and thrown away
- how to compare strings and markups


\version "2.18.2" %% and higher

#(define space-set
  (list->char-set
(string->list "—.?-;,:“”‘’–— */()[]{}|<>!`~&…")))

#(define (width grob text)
  (let* ((X-extent
   (ly:stencil-extent (grob-interpret-markup grob text) X)))
   (if (interval-empty? X-extent)
   0
   (cdr X-extent

#(define (center-on-word grob)
  (let* ((text (ly:grob-property-data grob 'text))
 (syllable (markup->string text))
 (word-position
   (if (string-skip syllable space-set)
   (string-skip syllable space-set)
   0))
 (word-end
   (if (string-skip-right syllable space-set)
   (+ (string-skip-right syllable space-set) 1)
   (string-length syllable)))
 (preword (substring syllable 0 word-position))
 (word (substring syllable word-position word-end))
 (preword-width (width grob preword))
 (word-width (width grob (if (string-null? syllable) text word)))
 (note-column (ly:grob-parent grob X))
 (note-column-extent (ly:grob-extent note-column note-column X))
 (note-column-width (interval-length note-column-extent)))

  (-
(*
  (/ (- note-column-width word-width) 2)
  (1+ (ly:grob-property-data grob 'self-alignment-X)))
preword-width)))

%% For general use take this this layout-setting
%% In the example below the override is applied to selected Lyrics only
%%
%\layout {
%  \context {
%\Lyrics
%\override LyricText #'X-offset = #center-on-word
%  }
%}

melody = \relative c' {
  c4
  d e f |
  c d
  e( f)
  g1 \bar"|."
}

lyr = \lyricmode {
  \set stanza = "1. "
  Do, ““Re, Mi, Fa, Do, Re,
  %\once \set Score.lyricMelismaAlignment = #4.5
  "...mimifa,"
  \markup \bold Sol—
}

lyrA = \lyricmode {
  \set stanza = "2. "
  “Do Re, Mi, Fa, Do, Re,
  mimifa...
  Sol!”
}

lyrControl = \lyricmode{
  \set stanza = "Control: "
  \revert LyricText.X-offset
  Do Re Mi Fa Do Re mimifa Sol
}

\score {
  \new Staff <<
\new Voice = "voice" \melody
\new Lyrics = "testI"
  \with { \override LyricText.X-offset = #center-on-word }
  \lyricsto "voice" \lyr
\new Lyrics = "testII"
  \with { \override LyricText.X-offset = #center-on-word }
  \lyricsto "voice" \lyrA
%% The control-voice omits the override
\new Lyrics = "control"
  \lyricsto "voice" \lyrControl
  >>
  \layout {
\context {
  \Score
  lyricMelismaAlignment = #-0.6
}
  }
}


HTH,
  Harm

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


Re: parameters in lyrics?

2015-12-03 Thread Graham King
On Thu, 2015-12-03 at 17:12 +0100, Urs Liska wrote:

> 
> 
> 
> Am 03.12.2015 um 17:10 schrieb Graham King:
> 
> > 
> > On Thu, 2015-12-03 at 16:57 +0100, Urs Liska wrote:
> > 
> > > Ah, forgot: the ending function would also have to be written
> > > before the syllable, so
> > > 
> > > Three \foo deaf and \bar blind mice are \foobar alive.
> > > 
> > > should return
> > > 
> > > Three [deaf and blind] mice are [alive]
> > > 
> > 
> > Uh, no.  I'd like it to return
> > Three [deaf and] blind mice are [alive]
> > 
> > That's the bit I'm struggling with. 
> 
> 
> You can't do that (I think). But I don't see a problem with writing
> the function before the syllable.
> Or what am I missing?

I've got a lot of music with

foo = \override LyricText.font-shape = #'italic
bar = \revert LyricText.font-shape

and I'd like to redefine foo and bar to replace the italics with
[bracketed text].  And to switch between italics and brackets easily.
Apologies: I should have made that clear at the top of the thread.

I might just have to redefine the syntax altogether, so that I can say
something like:
Three \foo { deaf and blind } mice.
Going quiet for a bit while I think about that...
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Music Blocks Software and LilyPond Integration

2015-12-03 Thread Devin
Hi,

I have been working with Walter Bender of Sugar Labs to create
web-based, free software (AGPL) for students to explore music's
fundamental concepts in a visual programming environment (fork of Turtle
Blocks).

I have put the software up at http://www.musicblocks.net and you can try
a stable version of the software at http://play.musicblocks.net.

This software is relevant to lilypond because we aim to have it be
integrated with lilypond software. Currently, it is able to export a
music blocks creation to a simple lilypond file (well-featured, but not
fully-featured), and we plan for it to be able to import lilypond code
as well. Lilypond has been very good for this project, because the code
is text-based and relatively simple to generate from Music Blocks' code
(much appreciation for all the hard work!)

The reason I am reaching out to this list is because, SugarLabs will be
participating in Google Code-in this year (begins Dec 7th) and I may
have questions for the group. May I ask questions related to code-syntax
and integration on this mailing list?

I also wanted to let Lilypond users know about this project, as it might
become a sensible access-point for introducing young and new users to
lilypond since Music Blocks is a reasonably good GUI front-end to
generating Lilypond notation.

Thank you!
Devin
---
www.devinulibarri.com
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertically centering a song text.

2015-12-03 Thread David Wright
On Thu 03 Dec 2015 at 07:32:44 (+0100), David Kastrup wrote:
> tisimst  writes:
> 
> > \skip in the Lyrics context is necessary for skipping beats without
> > creating a melisma (which can be manually created with a single underscore
> > for each beat in the melisma). I'm not sure why it's insensitive to the
> > number after it. I have wondered the same thing, but that's the way it
> > works at the moment.
> 
> Because the whole point of \addlyrics/\lyricsto is to ignore durations
> and instead take items one-by-one irrespective of their length?

Agreed. For that reason, I would avoid using \skip 8 for the purpose
described; it's confusing to add wrong information into your LP source.

My workaround used to be to define an invisibledot as
\lyricmode { \once \override LyricText.font-size = #-19 "." }
for the first "syllable" followed by _ _ _ (less typing).

When I discovered that NBSP is treated like any other character,
I switched to using \nbsp (also followed by _ _ _) where
nbsp = \markup \char ##x00A0

So we end up in the example with:

nbsp = \markup \char ##x00A0
skipFour = \repeat unfold 4 \lyricmode { \nbsp }

or even

skipFour = \lyricmode { \nbsp _ _ _ }

(Just in case it's not obvious, you can't start your blanked-out
lyrics with _ because it will make LP try to do "extender processing"
on the previous syllable.)

> > Outside the Lyrics context in normal note entry, it is sensitive to
> > the number.

On which basis, I'd also criticise it because, at the point of definition,

skipFour = \repeat unfold 4 { \skip 8 }

does *not* indicate that it's only going to be used in a Lyrics context,
so the "8" *appears* to have an unwarranted significance at this time.

> You can write Lyrics perfectly well without \addlyrics/\lyricsto and
> durations both of syllables and skips and other musical material will be
> heeded.

... which AFAIK is the only way to handle folding/unfolding of
Lyrics repeats.

Cheers,
David.

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


Re: parameters in lyrics?

2015-12-03 Thread Urs Liska


Am 03.12.2015 um 17:10 schrieb Graham King:
> On Thu, 2015-12-03 at 16:57 +0100, Urs Liska wrote:
>> Ah, forgot: the ending function would also have to be written before
>> the syllable, so
>>
>> Three \foo deaf and \bar blind mice are \foobar alive.
>>
>> should return
>>
>> Three [deaf and blind] mice are [alive]
>>
> Uh, no.  I'd like it to return
> Three [deaf and] blind mice are [alive]
>
> That's the bit I'm struggling with.

You can't do that (I think). But I don't see a problem with writing the
function before the syllable.
Or what am I missing?

>
> ___
> 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: parameters in lyrics?

2015-12-03 Thread Graham King
On Thu, 2015-12-03 at 16:57 +0100, Urs Liska wrote:

> Ah, forgot: the ending function would also have to be written before
> the syllable, so
> 
> Three \foo deaf and \bar blind mice are \foobar alive.
> 
> should return
> 
> Three [deaf and blind] mice are [alive]
> 

Uh, no.  I'd like it to return
Three [deaf and] blind mice are [alive]

That's the bit I'm struggling with.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: parameters in lyrics?

2015-12-03 Thread Urs Liska


Am 03.12.2015 um 16:57 schrieb Urs Liska:
>
>
> Am 03.12.2015 um 16:24 schrieb Urs Liska:
>>
>>
>> Am 03.12.2015 um 16:19 schrieb Graham King:
>>> On Thu, 2015-12-03 at 15:12 +0100, Urs Liska wrote:


 Am 03.12.2015 um 15:04 schrieb Graham King:

> I'm trying to enclose some lyrics within square brackets but, for
> reasons too tedious to trouble the list with*, I'd like to
> parameterise the brackets using the \foo and \fooEnd constructs in
> the following pseudocode.  Is there a way to do this without
> causing "[" and "]" to be set as separate syllables?
>
> hopefully,
> -- Graham

 HTH:

 \version "2.19.21"

 theNotes = {
   \relative { e''1 d c }
 }

 brack =
 #(define-scheme-function (parser location syllable)(string?)
(format "[~a]" syllable))

 theWords = \lyricmode {
   Three \brack blind mice,
 }

 \score
 {
 \new StaffGroup
 <<
 \new Voice = "voice" \theNotes
 \new Lyrics \lyricsto "voice" \theWords
 >>
 }


 Urs
>>>
>>> Thanks Urs. 
>>>
>>> I'm hoping to preserve the  \prefixOperator bunch of text
>>> \postfixOperator syntax, so that the operator definition can be
>>> swapped simply for other things that use that syntax, such as:
>>> foo = \override LyricText.color = #red
>>> fooEnd = \revert LyricText.color
>>>
>>> I could adapt your suggestion if I could think of a way to feed the
>>> previous syllable of underlay to \fooEnd
>>
>> So you need a way to also say
>>
>> Three \start deaf and blind \end mice
>>
>> to give you
>> Three [deaf and blind] mice
>> ?
>>
>> Then you simply need three functions:
>> \foo (= start)
>> \bar (= end)
>> \foobar (for a single syllable).
>>
>> I think you can adjust my proposal for start/end-only situations easily.
>
> Ah, forgot: the ending function would also have to be written before
> the syllable, so
>
> Three \foo deaf and \bar blind mice are \foobar alive.
>
> should return
>
> Three [deaf and blind] mice are [alive]
>
> Urs


So, for your original request this should work:

\version "2.19.21"

start =
#(define-scheme-function (parser location syllable)(markup?)
   (format "[~a" syllable))

end =
#(define-scheme-function (parser location syllable)(markup?)
   (format "~a]" syllable))

wrap =
#(define-scheme-function (parser location syllable)(markup?)
   (format "[~a]" syllable))

theNotes = {
  \relative { e''1 d c d e }
}

theWords = \lyricmode {
  Three \start blind \end mice are \wrap alive
}

\score
{
\new StaffGroup
<<
\new Voice = "voice" \theNotes
\new Lyrics \lyricsto "voice" \theWords
>>
}

But when you also want to do other stuff like coloring it won't because
I don't know how to write a function that returns an override (a music
expression) *and* a string (for the lyrics) at the same time.

Although this must be pretty standard functionality, I think ...
>>
>> Urs
>>>
>>>
>>>
>>> ___
>>> lilypond-user mailing list
>>> lilypond-user@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>>
>>
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
>
>
> ___
> 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: How Beautiful Upon the Mountains by Stainer

2015-12-03 Thread Brian Barker

At 15:18 03/12/2015 +, Gregory Citarella wrote:
Hello: is there any way I can get a pdf of the choir anthem that I 
see on you tube of How Beautiful upon the mountains by John Stainer. 
I see it was done by someone using lilypond.org


https://github.com/jrmhaig/music/blob/9b6f04207762999dcd273fd93f8f74658f1c5d97/Stainer/HowBeautifulUponTheMountains/HowBeautifulUponTheMountains.pdf
(or http://tinyurl.com/pgbu4d2 ).

Click Raw to download the PDF. You must satisfy yourself about 
copyright issues.


Brian Barker  



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


Re: How Beautiful Upon the Mountains by Stainer

2015-12-03 Thread Sam Bivens

Hi Gregory,

As Chris pointed out, it's (partially) up on CPDL. You might try 
contacting some of the editors on 
http://www2.cpdl.org/wiki/index.php/How_beautiful_upon_the_mountains_%28John_Stainer%29 
to see if they'd be willing to share any of their scores with you. I see 
Andrew Crookall, for instance, has withdrawn his score from the website, 
but I don't know if it's SATB or not.


You could also try contacting the owner of the YouTube link you sent out.

Best of luck,

Sam


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


Re: parameters in lyrics?

2015-12-03 Thread Urs Liska


Am 03.12.2015 um 16:24 schrieb Urs Liska:
>
>
> Am 03.12.2015 um 16:19 schrieb Graham King:
>> On Thu, 2015-12-03 at 15:12 +0100, Urs Liska wrote:
>>>
>>>
>>> Am 03.12.2015 um 15:04 schrieb Graham King:
>>>
 I'm trying to enclose some lyrics within square brackets but, for
 reasons too tedious to trouble the list with*, I'd like to
 parameterise the brackets using the \foo and \fooEnd constructs in
 the following pseudocode.  Is there a way to do this without
 causing "[" and "]" to be set as separate syllables?

 hopefully,
 -- Graham
>>>
>>> HTH:
>>>
>>> \version "2.19.21"
>>>
>>> theNotes = {
>>>   \relative { e''1 d c }
>>> }
>>>
>>> brack =
>>> #(define-scheme-function (parser location syllable)(string?)
>>>(format "[~a]" syllable))
>>>
>>> theWords = \lyricmode {
>>>   Three \brack blind mice,
>>> }
>>>
>>> \score
>>> {
>>> \new StaffGroup
>>> <<
>>> \new Voice = "voice" \theNotes
>>> \new Lyrics \lyricsto "voice" \theWords
>>> >>
>>> }
>>>
>>>
>>> Urs
>>
>> Thanks Urs. 
>>
>> I'm hoping to preserve the  \prefixOperator bunch of text
>> \postfixOperator syntax, so that the operator definition can be
>> swapped simply for other things that use that syntax, such as:
>> foo = \override LyricText.color = #red
>> fooEnd = \revert LyricText.color
>>
>> I could adapt your suggestion if I could think of a way to feed the
>> previous syllable of underlay to \fooEnd
>
> So you need a way to also say
>
> Three \start deaf and blind \end mice
>
> to give you
> Three [deaf and blind] mice
> ?
>
> Then you simply need three functions:
> \foo (= start)
> \bar (= end)
> \foobar (for a single syllable).
>
> I think you can adjust my proposal for start/end-only situations easily.

Ah, forgot: the ending function would also have to be written before the
syllable, so

Three \foo deaf and \bar blind mice are \foobar alive.

should return

Three [deaf and blind] mice are [alive]

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

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


Re: How Beautiful Upon the Mountains by Stainer

2015-12-03 Thread Chris Yate
Sorry, I see that's an arrangement for ATB

On 3 December 2015 at 15:44, Chris Yate  wrote:

> It's available at CPDL, did you look there?
>
> http://www1.cpdl.org/wiki/images/7/7e/How_beautiful_upon_the_Mountain.pdf
>
>
> On 3 December 2015 at 15:18, Gregory Citarella <
> gregory.citare...@gmail.com> wrote:
>
>> Hello:  is there anyway I can get a pdf of the choir anthem that I see on
>> you tube of How Beautiful upon the mountains by John Stainer.  I see it
>> was
>> done by someone using lilypond.org
>>
>> This is the url I am referring to:
>>
>> https://www.youtube.com/watch?v=H5wCy3v3Xyg
>>
>> I am the Minister of Music at Zion Episcopal church in Wappingers Falls
>> NY /
>> USA.  I have a score in 4/2 meter.  I see this one is in 4/4 meter.  It
>> looks better in 4/4.
>>
>> I appreciate whatever you can do to help me.  My choir is singing this
>> anthem at Christmas.
>>
>> Peace...
>>
>> Gregory
>>
>>
>> ___
>> 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: How Beautiful Upon the Mountains by Stainer

2015-12-03 Thread Chris Yate
It's available at CPDL, did you look there?

http://www1.cpdl.org/wiki/images/7/7e/How_beautiful_upon_the_Mountain.pdf


On 3 December 2015 at 15:18, Gregory Citarella 
wrote:

> Hello:  is there anyway I can get a pdf of the choir anthem that I see on
> you tube of How Beautiful upon the mountains by John Stainer.  I see it was
> done by someone using lilypond.org
>
> This is the url I am referring to:
>
> https://www.youtube.com/watch?v=H5wCy3v3Xyg
>
> I am the Minister of Music at Zion Episcopal church in Wappingers Falls NY
> /
> USA.  I have a score in 4/2 meter.  I see this one is in 4/4 meter.  It
> looks better in 4/4.
>
> I appreciate whatever you can do to help me.  My choir is singing this
> anthem at Christmas.
>
> Peace...
>
> Gregory
>
>
> ___
> 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: parameters in lyrics?

2015-12-03 Thread Urs Liska


Am 03.12.2015 um 16:19 schrieb Graham King:
> On Thu, 2015-12-03 at 15:12 +0100, Urs Liska wrote:
>>
>>
>> Am 03.12.2015 um 15:04 schrieb Graham King:
>>
>>> I'm trying to enclose some lyrics within square brackets but, for
>>> reasons too tedious to trouble the list with*, I'd like to
>>> parameterise the brackets using the \foo and \fooEnd constructs in
>>> the following pseudocode.  Is there a way to do this without causing
>>> "[" and "]" to be set as separate syllables?
>>>
>>> hopefully,
>>> -- Graham
>>
>> HTH:
>>
>> \version "2.19.21"
>>
>> theNotes = {
>>   \relative { e''1 d c }
>> }
>>
>> brack =
>> #(define-scheme-function (parser location syllable)(string?)
>>(format "[~a]" syllable))
>>
>> theWords = \lyricmode {
>>   Three \brack blind mice,
>> }
>>
>> \score
>> {
>> \new StaffGroup
>> <<
>> \new Voice = "voice" \theNotes
>> \new Lyrics \lyricsto "voice" \theWords
>> >>
>> }
>>
>>
>> Urs
>
> Thanks Urs. 
>
> I'm hoping to preserve the  \prefixOperator bunch of text
> \postfixOperator syntax, so that the operator definition can be
> swapped simply for other things that use that syntax, such as:
> foo = \override LyricText.color = #red
> fooEnd = \revert LyricText.color
>
> I could adapt your suggestion if I could think of a way to feed the
> previous syllable of underlay to \fooEnd

So you need a way to also say

Three \start deaf and blind \end mice

to give you
Three [deaf and blind] mice
?

Then you simply need three functions:
\foo (= start)
\bar (= end)
\foobar (for a single syllable).

I think you can adjust my proposal for start/end-only situations easily.

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

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


How Beautiful Upon the Mountains by Stainer

2015-12-03 Thread Gregory Citarella
Hello:  is there anyway I can get a pdf of the choir anthem that I see on
you tube of How Beautiful upon the mountains by John Stainer.  I see it was
done by someone using lilypond.org

This is the url I am referring to:

https://www.youtube.com/watch?v=H5wCy3v3Xyg

I am the Minister of Music at Zion Episcopal church in Wappingers Falls NY /
USA.  I have a score in 4/2 meter.  I see this one is in 4/4 meter.  It
looks better in 4/4.

I appreciate whatever you can do to help me.  My choir is singing this
anthem at Christmas.

Peace...

Gregory


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


Re: parameters in lyrics?

2015-12-03 Thread Graham King
On Thu, 2015-12-03 at 15:12 +0100, Urs Liska wrote:

> 
> 
> 
> Am 03.12.2015 um 15:04 schrieb Graham King:
> 
> > 
> > I'm trying to enclose some lyrics within square brackets but, for
> > reasons too tedious to trouble the list with*, I'd like to
> > parameterise the brackets using the \foo and \fooEnd constructs in
> > the following pseudocode.  Is there a way to do this without causing
> > "[" and "]" to be set as separate syllables?
> > 
> > hopefully,
> > -- Graham
> 
> 
> HTH:
> 
> \version "2.19.21"
> 
> theNotes = {
>   \relative { e''1 d c }
> }
> 
> brack = 
> #(define-scheme-function (parser location syllable)(string?)
>(format "[~a]" syllable))
> 
> theWords = \lyricmode {
>   Three \brack blind mice,
> }
> 
> \score
> {
> \new StaffGroup
> <<
> \new Voice = "voice" \theNotes
> \new Lyrics \lyricsto "voice" \theWords
> >>
> }
> 
> 
> Urs


Thanks Urs.  

I'm hoping to preserve the  \prefixOperator bunch of text
\postfixOperator syntax, so that the operator definition can be swapped
simply for other things that use that syntax, such as:
foo = \override LyricText.color = #red
fooEnd = \revert LyricText.color

I could adapt your suggestion if I could think of a way to feed the
previous syllable of underlay to \fooEnd

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


Re: accidentals for just intonation

2015-12-03 Thread Urs Liska


Am 01.12.2015 um 15:56 schrieb Paul Morris:
>> On Dec 1, 2015, at 5:38 AM, Urs Liska  wrote:
>>
>> You have a rather small number of individual components (vertical,
>> horizontal and diagonal elements) that can all represented by a
>> postscript path. A function should be able to determine from the input
>> ratio which of these elements have to be combined and then generate the
>> appropriate path and eventually use that to replace Accidental.stencil.
> Yep, sounds like a matter of creating path stencils for each component part, 
> as static unchanging building blocks, and then have a function that 
> dynamically combines these stencils to produce the accidental needed for a 
> given note.  Combining stencils in different ways is simpler than producing a 
> path on the fly, so that will make things easier.

This is definitely better than creating the full path from scratch.

>
> I have done this kind of thing by creating an SVG with Inkscape and then 
> opening the SVG file in a text editor where I can copy the path coordinates.  
> Then I can paste those coordinates into a LilyPond include file, in a 
> procedure that produces a path stencil.  (With some tedious back and forth to 
> get the scaling right.)  Then that stencil is available to use by LilyPond.  
>
> For Clairnote music notation I have code that replaces accidental signs with 
> custom accidentals[0] that might be helpful to look at.  It combines a dot 
> stencil with a line stencil, so no paths are needed.  However, I also use 
> path coordinates to create whole note glyphs, so there’s an example of that 
> as well.  That code is available here:
>
> http://clairnote.org/software/
>
> [0] http://clairnote.org/accidental-signs/
>
>> How these paths can be created is something I won't be of much help, but
>> if you get to the point where you have very concrete necessities you'll
>> surely be able to get help by others with more experience in that.
> There are several ways to create a stencil from a path.  Search the LSR for 
> “path” for two different ways in addition to the \path markup command.  The 
> most recent development version of LilyPond (2.19.x) also has a 
> make-path-stencil function that combines the benefits of the two ways 
> documented on the LSR without their drawbacks, so I prefer to use that unless 
> I’m supporting LilyPond 2.18. 

This was what I vaguely recalled. Andrew should definitely look into
that as we have already decided not to support 2.18 for the whole
contemporary notation library idea. There are just too many substantial
improvements in 2.19, and the target group (advanced and daring
composers) can be expected to install and use the development version.

Urs


>
> -Paul
>


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


Re: accidentals for just intonation

2015-12-03 Thread Urs Liska


Am 03.12.2015 um 13:11 schrieb N. Andrew Walsh:
> The point of this project is that it should be possible to specify a
> library file for each of these different systems, that each might be
> able to extract different information from the scripting that Urs is
> doing, and apply the accidentals correctly. 
>

Yes, the idea is to tell LilyPond: This pitch is a 13/11 ratio over d,
and then choose an appropriate display mode through simply configuration
switches. This should *not* be exclusive for one mode of display but a
rather modular approach where one can easily add other systems.
For (a contrived) example: If someone had the idea asking someone with a
19th-tone trumpet (dividing the octave in 19 equal steps) to play a
piece that is conceived as ratios LilyPond should be able to determine
the proper "step" in that system and write the remaining cent deviation
next to it. This invented composer should take the trouble adding the
necessary calculations for the specific system, but our LilyPond library
should (then) already provide the necessary building blocks to make that
as easy as possible.

Urs



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


Re: parameters in lyrics?

2015-12-03 Thread Urs Liska


Am 03.12.2015 um 15:04 schrieb Graham King:
> I'm trying to enclose some lyrics within square brackets but, for
> reasons too tedious to trouble the list with*, I'd like to
> parameterise the brackets using the \foo and \fooEnd constructs in the
> following pseudocode.  Is there a way to do this without causing "["
> and "]" to be set as separate syllables?
>
> hopefully,
> -- Graham

HTH:

\version "2.19.21"

theNotes = {
  \relative { e''1 d c }
}

brack =
#(define-scheme-function (parser location syllable)(string?)
   (format "[~a]" syllable))

theWords = \lyricmode {
  Three \brack blind mice,
}

\score
{
\new StaffGroup
<<
\new Voice = "voice" \theNotes
\new Lyrics \lyricsto "voice" \theWords
>>
}


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


parameters in lyrics?

2015-12-03 Thread Graham King
I'm trying to enclose some lyrics within square brackets but, for
reasons too tedious to trouble the list with*, I'd like to parameterise
the brackets using the \foo and \fooEnd constructs in the following
pseudocode.  Is there a way to do this without causing "[" and "]" to be
set as separate syllables?

hopefully,
-- Graham
* it has to do with differentiating lyrics in renaissance music: black,
coloured, or editorial.

\version "2.19.21"

foo = "["
fooEnd = "]"

theNotes = {
  \relative { e''1 d c }
}

theWords = \lyricmode { 
  Three \foo blind \fooEnd mice,
}

\score
{
\new StaffGroup
<<
\new Voice = "voice" \theNotes
\new Lyrics \lyricsto "voice" \theWords
>>
} 

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


Re: Request for tiny Finale/Sibelius snippets

2015-12-03 Thread Urs Liska


Am 03.12.2015 um 13:21 schrieb Phil Holmes:
> - Original Message - From: "Urs Liska" 
> To: "lilypond-user" 
> Sent: Thursday, December 03, 2015 12:12 PM
> Subject: Request for tiny Finale/Sibelius snippets
>
>
>> Hello Sibelius/Finale users out there,
>>
>> could someone please send me the default result of
>>
>> {
>>  \key g \major
>>  \repeat unfold 3 { ais16 e' ais' e' }
>> }
>>
>> as a PDF file?
>>
>> I would like to compare their approach to optical spacing with
>> LilyPond's.
>>
>> Thank you
>> Urs
>
> Turns out it's not easy to do in Sibelius - it has a great love of
> justified right music.  Could we use multiple bars?

Yes, no problem. All I need is these notes spaced out naturally, I'll
cut it out with Gimp anyway.
So yes, you can add as many empty bars as to do a proper line break.

Urs

>
> -- 
> Phil Holmes


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


Re: Request for tiny Finale/Sibelius snippets

2015-12-03 Thread Phil Holmes
- Original Message - 
From: "Urs Liska" 

To: "lilypond-user" 
Sent: Thursday, December 03, 2015 12:12 PM
Subject: Request for tiny Finale/Sibelius snippets



Hello Sibelius/Finale users out there,

could someone please send me the default result of

{
 \key g \major
 \repeat unfold 3 { ais16 e' ais' e' }
}

as a PDF file?

I would like to compare their approach to optical spacing with LilyPond's.

Thank you
Urs


Turns out it's not easy to do in Sibelius - it has a great love of justified 
right music.  Could we use multiple bars?


--
Phil Holmes 



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


Re: Request for tiny Finale/Sibelius snippets

2015-12-03 Thread Phil Holmes
- Original Message - 
From: "Urs Liska" 

To: "lilypond-user" 
Sent: Thursday, December 03, 2015 12:12 PM
Subject: Request for tiny Finale/Sibelius snippets



Hello Sibelius/Finale users out there,

could someone please send me the default result of

{
 \key g \major
 \repeat unfold 3 { ais16 e' ais' e' }
}

as a PDF file?

I would like to compare their approach to optical spacing with LilyPond's.

Thank you
Urs


I can do Sibelius and will do it off list.

--
Phil Holmes 



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


Request for tiny Finale/Sibelius snippets

2015-12-03 Thread Urs Liska
Hello Sibelius/Finale users out there,

could someone please send me the default result of

{
  \key g \major
  \repeat unfold 3 { ais16 e' ais' e' }
}

as a PDF file?

I would like to compare their approach to optical spacing with LilyPond's.

Thank you
Urs

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


Re: accidentals for just intonation

2015-12-03 Thread N. Andrew Walsh
Thank you for the links. As I said above, I have significant objections to
a system of accidentals for just intonation that are based on cents
deviations from equal temperament. They're legitimate objections, and it's
outside of the scope of this thread to discuss them (I find, unfortunately,
that attachments to one system or another tend to be deeply personal, and
it's not my desire to provoke discussions that will invariably turn
unnecessarily … heated). The point of this project is that it should be
possible to specify a library file for each of these different systems,
that each might be able to extract different information from the scripting
that Urs is doing, and apply the accidentals correctly.

If your system requires only a range in cents to determine which accidental
to use, that should be easy to calculate and apply. If it requires only the
prime factors of the ratios, that should be easy, too. If it's some mixture
of them, that works as well. And for all of them, it should be possible to
output something different to different instrumental parts, as needed.

To answer ciconia's question as well: Partch used a tabulature notation
most of the time (ie, "strike this key, producing the ratio x/y"). It makes
it very practical to play his instruments (which are almost all
percussion), but extremely difficult to figure out how the music sounded
with access to them. Young wrote his scores (when he wrote them at all)
giving numbers for the primes. such that the scores are almost entirely
text. I'm not sure how he notated "The Well-Tuned Piano," or even if he
ever did, since it's on a pre-tuned piano and always improvised by him
personally.

Cheers,

A

On Wed, Dec 2, 2015 at 10:26 PM, Graham Breed  wrote:

> From: "N. Andrew Walsh"
>> To: lilypond-user
>>
>
> If you've been watching the OpenLilyLib repository, you'll see that Urs has
>> been working on a set of tools for rendering music in just intonation. He
>> (quite modestly) says that it isn't ready for production, but there are
>> already some impressive things it can do: for one, the interface allows to
>> input a fraction and get back a nearest-semitone pitch with a deviation in
>> cents*automatically*, which is something the commercial programs don't
>> offer in any way (every composer I know who works with JI just inputs text
>> entries manually for every note, with no change in, for example, MIDI
>> output for ability to handle transpositions).
>>
>
> I haven't been watching that ... I don't know what it is.  But it sounds
> similar to my Sagittal support.  Latest code here, works for me but
> something broken on Windows:
>
> https://bitbucket.org/x31eq/microlily
>
> It's possible to turn off the Sagittal accidentals to get output using
> standard accidentals, given essentially the AFMM output.  I don't remember
> if I ever got that working though.  You have to specify the staff position
> as well as the ratio.
>
> I'd like to be able to put these into Lily, and Urs tells me it can be done
>> by calling a draw function to draw a path. I can relatively easily make up
>> some paths with Inkscape and save them as SVGs, but is there a better way
>> to do this? The NR describes (here:
>>
>> http://lilypond.org/doc/v2.19/Documentation/notation/formatting-text#graphic-notation-inside-markup
>> )
>> the means to include eps files into a markup, which presumably could be
>> used to replace the accidental.
>>
>> There are some potential complicating factors here. First, the accidentals
>> I use change depending on the prime factorization of the ratio involved:
>> for example, the ratio 9/8 (a type of whole tone) would comprise two of
>> the
>> symbol for 3 (because "9/8" is really "(3*3)/8" ), which means that Urs'
>> interface for JI ratios would need an add-on to do prime factorization of
>> the ratios (which is also computationally intensive, even for relatively
>> simple numbers) or a means to encode ratios as lists of primes that are
>> then calculated to return the value in cents (that is, do the process in
>> reverse, starting from "(3*3)/8" and getting 9/8, which might be easier to
>> do).
>>
>
> I've thought about this with respect to the Extended Helmholtz-JI
> notation, for which there are already fonts that would work with my
> system.  Generating accidentals from pitches is problematic, and would
> really mean generating your gamut in advance, with some implied equal
> temperament that doesn't give any ambiguity, and the accidentals would
> disappear if you exceed that gamut.
>
> Another idea is for commands to add the accidental glyphs, and also do the
> correct pitch shift.  I think this was prototyped without the pitch
> shifting (so ignoring MIDI output) before I implemented my Sagittal
> approach.  Where it's problematic to get tuning and display working
> together, you can define separate functions for the "midi" and "score"
> blocks.
>
> Another idea I had, though, is to shove annotations into the list
> describing each note.  (I th

Re: Vertically centering a song text.

2015-12-03 Thread David Kastrup
Simon Albrecht  writes:

> On 03.12.2015 07:32, David Kastrup wrote:
>> tisimst  writes:
>>
>>> >\skip in the Lyrics context is necessary for skipping beats without
>>> >creating a melisma (which can be manually created with a single underscore
>>> >for each beat in the melisma). I'm not sure why it's insensitive to the
>>> >number after it. I have wondered the same thing, but that's the way it
>>> >works at the moment.
>> Because the whole point of \addlyrics/\lyricsto is to ignore durations
>> and instead take items one-by-one irrespective of their length?
>>
>
> One _might_ do
>
> %%%
> \version "2.19.32"
>
> % modified from ly/music-functions-init.ly
> skip =
> #(define-music-function (dur) ((ly:duration? (ly:make-duration 2)))
>   (_i "Skip forward by @var{dur}.")
>   (make-music 'SkipMusic
>   'duration dur))
>
> <<
>   { 4 2 4 }
>   \addlyrics { test \skip \default test }
>>>
> %%%
>
> but it doesn’t make much of a difference. (It would if \skip\default
> would inherit a duration just like a note with implicit duration; is
> that possible via make-music?)

I consider it likely that

skip =
#(define-music-function (dur) ((ly:duration?))
  (_i "Skip forward by @var{dur}.")
  (make-music 'SkipMusic
  'duration (or dur (ly:music-property #{ s #} 'duration

would do something like that, but it seems like a really bad idea.

-- 
David Kastrup

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


Re: Vertically centering a song text.

2015-12-03 Thread Simon Albrecht

On 03.12.2015 07:32, David Kastrup wrote:

tisimst  writes:


>\skip in the Lyrics context is necessary for skipping beats without
>creating a melisma (which can be manually created with a single underscore
>for each beat in the melisma). I'm not sure why it's insensitive to the
>number after it. I have wondered the same thing, but that's the way it
>works at the moment.

Because the whole point of \addlyrics/\lyricsto is to ignore durations
and instead take items one-by-one irrespective of their length?



One _might_ do

%%%
\version "2.19.32"

% modified from ly/music-functions-init.ly
skip =
#(define-music-function (dur) ((ly:duration? (ly:make-duration 2)))
  (_i "Skip forward by @var{dur}.")
  (make-music 'SkipMusic
  'duration dur))

<<
  { 4 2 4 }
  \addlyrics { test \skip \default test }
>>
%%%

but it doesn’t make much of a difference. (It would if \skip\default 
would inherit a duration just like a note with implicit duration; is 
that possible via make-music?)


Yours, Simon

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