Re: Snippet 888 string, was Re: Lyric centre-on-word / ignore-punctuation bug

2018-02-24 Thread David Wright
On Sat 24 Feb 2018 at 20:27:58 (-0700), madMuze wrote:
> >> What I haven't figured out is why there are two long dashes
> 
> As davidK pointed out, three dash forms are probably desired: the hyphen,
> the N-dash, and the M-dash.

I didn't see him mention the hyphen, but it's all present and correct,
just after the question mark.

> It does look like an extra M-dash at the
> beginning of your string (or is that some character code masquerading as a
> dash?).

No, it's a genuine long dash, sorry, em-dash.

While driving to the Met opera cinema this morning, it occurred to me
why the extra dash was present. It's there because, just like Harm's
typographer’s single quote, someone added it to the beginning of the
string thinking it wasn't there; but it already was—in disguise.

> The space is there, not for the dash, but (I believe) in case one
> might enter "lyricSyllable " in quotes and including a space. Having the
> space character in space-set thus causes the space width to be ignored on
> centering.

I would have thought one would want the space to be treated like
a letter. This snippet is designed to treat a string like spqr—
as if it was spqr (with respect to centering). If you go to the
bother of adding space to make "  spqr—" and then centre it as if
it were spqr, the space has achieved nothing. OTOH treating space
as a letter makes it centre like xxspqr, which pushes spqr rightwards.

> For what it’s worth, I use this string for space-set (in ASCII
> order, if I recall):
>   " !()*,-./:;<>?[]`{|}‚„…‹‘’“”–—› ¡«»¿"
> 
> The obsessively astute will notice a non-breaking space just before the
> inverted bang. One might include numerals, if one wanted a sloppy way to
> indicate stanzas. Since the tilde creates a lyric tie, it is probably better
> left out of space-set.
> 
> This is a lovely and much-appreciated procedure. So long as the space-set
> string could be customized, making this default behavior in a future version
> would indeed contribute to the progress of civilization.

Cheers,
David.

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


Re: Snippet 888 string, was Re: Lyric centre-on-word / ignore-punctuation bug

2018-02-24 Thread David Wright
On Sat 24 Feb 2018 at 16:59:37 (+0100), David Kastrup wrote:
> David Wright  writes:
> 
> > On Sat 24 Feb 2018 at 11:06:20 (+0100), David Kastrup wrote:
> >> Thomas Morley  writes:
> >> 
> >> > 2018-02-24 3:45 GMT+01:00 Kieren MacMillan 
> >> > :
> >> >> Hi all,
> >> >>
> >> >> When a lyric syllable begins with a typographer’s single quote
> >> >> (e.g., ’cause, ’ll, etc.), the "ignore-punctuation" hack doesn't
> >> >> work. Any hints on how to fix this would be appreciated.
> >> >>
> >> >> Thanks,
> >> >> Kieren.
> >> >>
> >> >> %%%  SNIPPET BEGINS
> >> >> \version "2.19"
> >> >>
> >> >
> >> > Only characters from `space-set' are respected by `center-on-word'.
> >> > Extend the given string with "’"
> >> >
> >> >> #(define space-set
> >> >>   (list->char-set
> >> >> (string->list "—.?-;,:“†‘’–— */()[]{}|<>!`~&…")))
> >> >
> >> > #(define space-set
> >> >   (list->char-set
> >> > (string->list "’—.?-;,:“†‘’–— */()[]{}|<>!`~&…")))
> >> >
> >> > works for me.
> >> 
> >> Doesn't really look like dealing sensibly with utf-8.
> >
> > AFAICT the string in the original snippet is
> >
> > —.?-;,:“”‘’–— */()[]{}|<>!`~&…
> 
> I was talking about the code,

I wouldn't know about the code: I'm not familiar with scheme.
The three lines quoted don't exactly look complicated, but I
wouldn't like to judge.

> not the string (which is garbled, sure).

Yes, I've never seen an ungarbled version posted, so I thought
I'd just look at it carefully and see if it was obvious what
it was meant to be. And, as it happened, it was.

> > What I haven't figured out is why there are two long dashes;
> 
> en-dash and em-dash are different code points.

My apologies for being so sloppy as to call an em-dash a long
dash, as opposed to the shorter en-dash. There are still two
of them, as shown by the marked line:

 821120131   1  –
 821220142   1  — ←
 821620181   1  ‘
 821720191   1  ’
 8220201c1   1  “
 8221201d1   1  ”
 823020261   1  …
Scanned 31 Unicode characters with 0 problems
$ 

I didn't bother to annotate the columns as I thought the 2 was
a bit obvious (apart from the fact that the recoded text has
two long dashes in it).

Cheers,
David.

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


Re: Snippet 888 string, was Re: Lyric centre-on-word / ignore-punctuation bug

2018-02-24 Thread madMuze
>> What I haven't figured out is why there are two long dashes

As davidK pointed out, three dash forms are probably desired: the hyphen,
the N-dash, and the M-dash. It does look like an extra M-dash at the
beginning of your string (or is that some character code masquerading as a
dash?). The space is there, not for the dash, but (I believe) in case one
might enter "lyricSyllable " in quotes and including a space. Having the
space character in space-set thus causes the space width to be ignored on
centering. For what it’s worth, I use this string for space-set (in ASCII
order, if I recall):
  " !()*,-./:;<>?[]`{|}‚„…‹‘’“”–—› ¡«»¿"

The obsessively astute will notice a non-breaking space just before the
inverted bang. One might include numerals, if one wanted a sloppy way to
indicate stanzas. Since the tilde creates a lyric tie, it is probably better
left out of space-set.

This is a lovely and much-appreciated procedure. So long as the space-set
string could be customized, making this default behavior in a future version
would indeed contribute to the progress of civilization.

davidC



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

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


Re: LilyPond/LaTeX template for Anglican chant

2018-02-24 Thread Karlin High

On 2/24/2018 5:27 PM, Michael Gerdau wrote:

I have yet to convince myself that I want to use LaTeX though.


I've never yet done a major project with any sort of TeX. But I am 
considering it. Here's the biggest selling point for me:


Donald Knuth, "The Future of TeX and METAFONT"
https://www.tug.org/TUGboat/tb11-4/tb30knut.pdf

"I strongly believe that an unchanging system has great value, even 
though it is axiomatic that any complex system can be improved. 
Therefore I believe that it is unwise to make further "improvements" to 
the systems called TEX and METAFONT. Let us regard these systems as 
fixed points, which should give the same results 100 years from now that 
they produce today."


If it wasn't for that, I'd settle for "permanent beginner" status 
regarding TeX. The developers of the SQLite database have a similar 
statement - something about the databases we create with it today should 
be readable by our grandchildren.


To me, the "durability" of many recent development platforms seems 
terrible. Software promoted as THE FUTURE today, with implied 
disparagement of anyone not embracing it, might well have its originator 
actively trying to kill it off within 5 years.




Developer: "The new environment has some features I really like, but is 
missing a few other things I completely depend on."


Provider: "Those missing features will be added in future releases."

(Time passes)

Developer: "Are the missing features available yet?"

Provider: "Actually, we have an exciting new product to tell you about! 
We've completely re-imagined everything again."




Okay, back to topic. I've never had much exposure to Anglican chant 
before. I found the Wikipedia article and a few recordings, and I can 
see it has great possibilities. What would be good "demo" pieces for 
people who've never heard Anglican chant before?

--
Karlin High
Missouri, USA

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


Re: LilyPond/LaTeX template for Anglican chant

2018-02-24 Thread Michael Gerdau
Hi David,

> One of the differences with the way I do psalms is that I make more of> the 
> pointing characters into mnemonic "active" characters:> % * for a
breath.> % | for a barline.> % ¬ for a double barline.> % _ for a dot.>
% † for a (posh) dagger.> % ¶ for a paragraph mark (looks after the
spacing for \P).> (Using ¬ (not) for a double barline is because they're
printed where's> there's  not  a break at the half-verse.)> Obviously I
have shortcuts like AltGr-P for these characters. (¬ is> on GB
keybords.)> > Attached is source with its PDF to give you the idea. The>
transposition of the second chant is automatically done by a python>
preprocessor that spots the @ in the source. (Sorry I don't have>
permission to publish that chant.)
The obvious benefit of this is that entering the pointing is clearly a
lot less effort than with the approach I'm using though I'm missing the
tuplet brackets. The other details w/r to indentation etc. probably
could be tackled.

I have yet to convince myself that I want to use LaTeX though.

Thanks for sharing, kind regards,
Michael
-- 
 Michael Gerdau   email: m...@qata.de
 GPG-keys available on request or at public keyserver



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


Re: Multiple staffs

2018-02-24 Thread Karlin High

On 2/24/2018 5:05 PM, J Martin Rushton wrote:

I'm trying to set a composition which starts with a single instrument
before bringing in the whole ensemble.  I don't want to break it up into
multiple scores because I want the midi to play through as a single
performance.


Does each instrument get its own staff? Have a look at this snippet:

http://lsr.di.unimi.it/LSR/Item?id=307
--
Karlin High
Missouri, USA

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


Re: Multiple staffs

2018-02-24 Thread David Kastrup
J Martin Rushton  writes:

> I'm trying to set a composition which starts with a single instrument
> before bringing in the whole ensemble.  I don't want to break it up into
> multiple scores because I want the midi to play through as a single
> performance.
>
> I've tried many ways to do this with little success.  The latest attempt
> was (copied from the learning manual, §A.4.5) :
>
>
> \score {
>   <<
> \new Voice = "SoloVoice" << introPart >>
> \new Staff <<
>   \new Voice = "SopranoVoice" << \descantRecorderPart >>
>   \new Voice = "BassVoice" << \tenorRecorderPart >>
> >>
>   >>
>   \layout { }
>   \midi {
> \tempo 4=60
>   }
> }
>
> but this errors at the first voice complaining that introPart is not a
> note name.  IntroPart is actually:
>
> introPart = \new Staff \with {
>   instrumentName = "Tenor"
>   midiInstrument = "recorder"
> } { \clef treble \intro }

No, it isn't.  It is a word.  You are confusing introPart and \introPart
here.

> I've also tried:
>
> \score {
>\introPart
> <<
>   \descantRecorderPart
>   \tenorRecorderPart
> >>
>   \layout { }
>   \midi {
> \tempo 4=60
>   }
> }
>
> which errors with "Spurious expression in \score" <<

Well, yes.  Now you write \introPart (which _is_ a music expression) and
follow it with << ... >>, another music expression.

> I've also tried every variant of the last form that I can think of.  Can
> anyone point me in the right direction?

The first one is fine, but the reference to introPart (as opposed to the
definition) needs to start with a backslash.

-- 
David Kastrup

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


Multiple staffs

2018-02-24 Thread J Martin Rushton
I'm trying to set a composition which starts with a single instrument
before bringing in the whole ensemble.  I don't want to break it up into
multiple scores because I want the midi to play through as a single
performance.

I've tried many ways to do this with little success.  The latest attempt
was (copied from the learning manual, §A.4.5) :


\score {
  <<
\new Voice = "SoloVoice" << introPart >>
\new Staff <<
  \new Voice = "SopranoVoice" << \descantRecorderPart >>
  \new Voice = "BassVoice" << \tenorRecorderPart >>
>>
  >>
  \layout { }
  \midi {
\tempo 4=60
  }
}

but this errors at the first voice complaining that introPart is not a
note name.  IntroPart is actually:

introPart = \new Staff \with {
  instrumentName = "Tenor"
  midiInstrument = "recorder"
} { \clef treble \intro }

I've also tried:

\score {
   \introPart
<<
  \descantRecorderPart
  \tenorRecorderPart
>>
  \layout { }
  \midi {
\tempo 4=60
  }
}

which errors with "Spurious expression in \score" <<

I've also tried every variant of the last form that I can think of.  Can
anyone point me in the right direction?



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


extract and print all the items after duration from ly:music

2018-02-24 Thread Paolo Prete
Hello,
how can I extract and print all the items ( \mp and slur)  after the duration 
parameter in the function below?Thanks.
%%%
identityFunction = #(define-music-function (parser location note) (ly:music?)  
(let    ((mypitch (ly:music-property note 'pitch '()))     (myduration 
(ly:music-property note 'duration '(#{$mypitch $myduration #}))
{  \identityFunction c' 4\mp( e'4)}

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


Re: LilyPond/LaTeX template for Anglican chant

2018-02-24 Thread Gregrs

Hi David,

On Mon, Feb 19, 2018 at 08:17:38PM -0600, David Wright wrote:

One of the differences with the way I do psalms is that I make more of 
the pointing characters into mnemonic "active" characters


Thanks. I didn't know about active characters but they seem like a good 
way to make the input easier to type and more readable.


Best wishes,
Greg

--
Twitter: @gregrs_uk
PGP key ID: 64907C8A
Fingerprint: EBD1 077F CCDD 841E A505 3FAA D2E8 592E 6490 7C8A



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


Re: Snippet 888 string, was Re: Lyric centre-on-word / ignore-punctuation bug

2018-02-24 Thread Kieren MacMillan
Hi David(s),

>>> Doesn't really look like dealing sensibly with utf-8.
> I was talking about the code, not the string

There's no question it doesn’t handle UTF-8 sensibly: I had to avoid using it 
for a score a few weeks ago in which I was using a Ukrainian glyph ("backwards 
R").

I would very much appreciate it if Lilypond — via snippet or "base code" — had 
an option to automagically centre lyrics on the "letter" portions (which may 
change with language/alphabet, I suppose).

Best,
Kieren.


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


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


Re: Snippet 888 string, was Re: Lyric centre-on-word / ignore-punctuation bug

2018-02-24 Thread David Kastrup
David Wright  writes:

> On Sat 24 Feb 2018 at 11:06:20 (+0100), David Kastrup wrote:
>> Thomas Morley  writes:
>> 
>> > 2018-02-24 3:45 GMT+01:00 Kieren MacMillan :
>> >> Hi all,
>> >>
>> >> When a lyric syllable begins with a typographer’s single quote
>> >> (e.g., ’cause, ’ll, etc.), the "ignore-punctuation" hack doesn't
>> >> work. Any hints on how to fix this would be appreciated.
>> >>
>> >> Thanks,
>> >> Kieren.
>> >>
>> >> %%%  SNIPPET BEGINS
>> >> \version "2.19"
>> >>
>> >
>> > Only characters from `space-set' are respected by `center-on-word'.
>> > Extend the given string with "’"
>> >
>> >> #(define space-set
>> >>   (list->char-set
>> >> (string->list "—.?-;,:“†‘’–— */()[]{}|<>!`~&…")))
>> >
>> > #(define space-set
>> >   (list->char-set
>> > (string->list "’—.?-;,:“†‘’–— */()[]{}|<>!`~&…")))
>> >
>> > works for me.
>> 
>> Doesn't really look like dealing sensibly with utf-8.
>
> AFAICT the string in the original snippet is
>
> —.?-;,:“”‘’–— */()[]{}|<>!`~&…

I was talking about the code, not the string (which is garbled, sure).

> What I haven't figured out is why there are two long dashes;

en-dash and em-dash are different code points.

-- 
David Kastrup

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


Snippet 888 string, was Re: Lyric centre-on-word / ignore-punctuation bug

2018-02-24 Thread David Wright
On Sat 24 Feb 2018 at 11:06:20 (+0100), David Kastrup wrote:
> Thomas Morley  writes:
> 
> > 2018-02-24 3:45 GMT+01:00 Kieren MacMillan :
> >> Hi all,
> >>
> >> When a lyric syllable begins with a typographer’s single quote
> >> (e.g., ’cause, ’ll, etc.), the "ignore-punctuation" hack doesn't
> >> work. Any hints on how to fix this would be appreciated.
> >>
> >> Thanks,
> >> Kieren.
> >>
> >> %%%  SNIPPET BEGINS
> >> \version "2.19"
> >>
> >
> > Only characters from `space-set' are respected by `center-on-word'.
> > Extend the given string with "’"
> >
> >> #(define space-set
> >>   (list->char-set
> >> (string->list "—.?-;,:“†‘’–— */()[]{}|<>!`~&…")))
> >
> > #(define space-set
> >   (list->char-set
> > (string->list "’—.?-;,:“†‘’–— */()[]{}|<>!`~&…")))
> >
> > works for me.
> 
> Doesn't really look like dealing sensibly with utf-8.

AFAICT the string in the original snippet is

—.?-;,:“”‘’–— */()[]{}|<>!`~&…

What I haven't figured out is why there are two long dashes; perhaps
someone added the one at the beginning because they couldn't see
the one in the middle. And why the space after the latter?

The following gives the hex in case this message is garbled.

$ ucount.py /tmp/the-string 
   10   a1   1  LF  
   32  201   1  SPC 
   33  211   1  !   
   38  261   1  &   
   40  281   1  (   
   41  291   1  )   
   42  2a1   1  *   
   44  2c1   1  ,   
   45  2d1   1  -   
   46  2e1   1  .   
   47  2f1   1  /   
   58  3a1   1  :   
   59  3b1   1  ;   
   60  3c1   1  <   
   62  3e1   1  >   
   63  3f1   1  ?   
   91  5b1   1  [   
   93  5d1   1  ]   
   96  601   1  `   
  123  7b1   1  {   
  124  7c1   1  |   
  125  7d1   1  }   
  126  7e1   1  ~   
 821120131   1  –   
 821220142   1  —   
 821620181   1  ‘   
 821720191   1  ’   
 8220201c1   1  “   
 8221201d1   1  ”   
 823020261   1  …   
Scanned 31 Unicode characters with 0 problems
$ 

Cheers,
David.
—.?-;,:“”‘’–— */()[]{}|<>!`~&…
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Breath or articulation mark between two beamed eighth or sixteenth notes

2018-02-24 Thread Joe Srednicki
Thanks. This works. I apologize. I was putting the breathe command outside the 
brackets for the beam, which caused an error. If I follow your example, the 
result is perfect.

Thanks again

> On Feb 23, 2018, at 10:34 PM, Kieren MacMillan 
>  wrote:
> 
> Hi Joe,
> 
>> I am working on organ music. Lily pond does not allow a breath mark beamed 
>> eighth or sixteenth notes.
> 
> Not sure what you mean:
> 
> \version "2.19"
> \layout { ragged-right = ##f line-width = 2\in }
> { c''8[ \breathe f'] }
> 
> That seems to work for me. Does it not work for you?
> 
> Thanks,
> Kieren.
> 
> 
> Kieren MacMillan, composer
> ‣ website: www.kierenmacmillan.info
> ‣ email: i...@kierenmacmillan.info
> 


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


Re: Lyric centre-on-word / ignore-punctuation bug

2018-02-24 Thread David Kastrup
Thomas Morley  writes:

> 2018-02-24 3:45 GMT+01:00 Kieren MacMillan :
>> Hi all,
>>
>> When a lyric syllable begins with a typographer’s single quote
>> (e.g., ’cause, ’ll, etc.), the "ignore-punctuation" hack doesn't
>> work. Any hints on how to fix this would be appreciated.
>>
>> Thanks,
>> Kieren.
>>
>> %%%  SNIPPET BEGINS
>> \version "2.19"
>>
>
> Only characters from `space-set' are respected by `center-on-word'.
> Extend the given string with "’"
>
>> #(define space-set
>>   (list->char-set
>> (string->list "—.?-;,:“†‘’–— */()[]{}|<>!`~&…")))
>
> #(define space-set
>   (list->char-set
> (string->list "’—.?-;,:“†‘’–— */()[]{}|<>!`~&…")))
>
> works for me.

Doesn't really look like dealing sensibly with utf-8.

-- 
David Kastrup

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


Re: Lyric centre-on-word / ignore-punctuation bug

2018-02-24 Thread Thomas Morley
2018-02-24 3:45 GMT+01:00 Kieren MacMillan :
> Hi all,
>
> When a lyric syllable begins with a typographer’s single quote (e.g., ’cause, 
> ’ll, etc.), the "ignore-punctuation" hack doesn't work. Any hints on how to 
> fix this would be appreciated.
>
> Thanks,
> Kieren.
>
> %%%  SNIPPET BEGINS
> \version "2.19"
>

Only characters from `space-set' are respected by `center-on-word'.
Extend the given string with "’"

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

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

works for me.

Cheers,
  Harm

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


scheme function returning two scores

2018-02-24 Thread Gianmaria Lari
The following very simple code generate 4 scores: two layout scores and two
midi scores.

\version "2.19.81"

music = {\repeat percent 2 {c' d' e' f'}}
\score { \music \layout{}}
\score { \unfoldRepeats \music \midi{}}

music = {\repeat percent 2 {g c' c' c'}}
\score { \music \layout{}}
\score { \unfoldRepeats \music \midi{}}


I would like to write the same more concisely like this:

\version "2.19.81"

myScore = #(define-scheme-function (music) (ly:music?) #{
  \score { $music \layout{} }
  \score { \unfoldRepeats $music \midi{}}
#})

\myScore {\repeat percent 2 {c' d' e' f'}}
\myScore {\repeat percent 2 {g c' c' c'}}

But I get the error

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

\score { \unfoldRepeats $music \midi{}}


The issue is clear but I have no idea how I can fix it. Any suggestion?

Thank you, g.


P.S. Instead of returning two score, I tried myScore to return a "\book"
containing two score but this also didn't work.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user