Re: Tags in Lyrics

2014-10-31 Thread Noeck
Hi Harm,

Am 26.10.2014 um 13:38 schrieb Joram:
 Thanks for all your responses. I will try the \ext functions as soon as
 I have a recent version of LP available.

Perfect, thanks!

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


Re: Tags in Lyrics

2014-10-26 Thread Joram
Thanks for all your responses. I will try the \ext functions as soon as 
I have a recent version of LP available.


In the current piece I ended up having separate lyrics for each voice as 
there are too many polyphonic parts with different lyrics. But this 
functions seem helpful for other pieces.


Joram

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


Re: Tags in Lyrics

2014-10-26 Thread Simon Albrecht

Thanks Harm, that does what I wanted to:
The voice named in the function argument gets an extender line, a tag is 
computed for all other voices and these don’t get an extender line, but 
only the syllable which serves as a second argument to the function.


Kudos, Simon

Am 26.10.2014 um 01:10 schrieb Thomas Morley:

2014-10-25 14:46 GMT+02:00 Simon Albrecht simon.albre...@mail.de:

Am 24.10.2014 um 21:48 schrieb Thomas Morley:


2014-10-24 21:19 GMT+02:00 Simon Albrecht simon.albre...@mail.de:
[...]

I tried to, but somehow an
extender line inside a music function body gives a syntax error and I’ve
got
no clue how to circumvent that. You’ll find the current function
attached.
Can anyone help, please?

No attachment ;)

Always the same mistakes… sorry ;-/
Yours, Simon

I'm not sure what you're aiming for, though I made your function work so far:


\version 2.19.12

\paper { ragged-right = ##f }

ext =
#(define-scheme-function (parser location voice syl) (symbol? ly:music?)
   (let* ((s? (eq? voice 'S))
  (a? (eq? voice 'A))
  (t? (eq? voice 'T))
  (b? (eq? voice 'B))
  (others (cond
(s? '(A T B))
(a? '(S T B))
(t? '(S A B))
(b? '(S A T)

  #{
\tag $voice
  $(let* ((dur (ly:music-property syl 'duration))
  (txt (ly:music-property syl 'text))
  (lyr (make-lyric-event txt dur)))
(ly:music-set-property! lyr 'articulations
(list (make-music 'ExtenderEvent)))
lyr)
\tag $others $syl
  #}))

music =

\new Voice = mel
\relative c' { c( d) e f }

%% works both:
\addlyrics { \ext A Will it work? }
%\new Lyrics \lyricsto mel {
%\ext A
%Will it work?
%  }

\keepWithTag A \music
\keepWithTag B \music


HTH,
   Harm



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


Re: Tags in Lyrics

2014-10-25 Thread Simon Albrecht

Am 24.10.2014 um 21:48 schrieb Thomas Morley:

2014-10-24 21:19 GMT+02:00 Simon Albrecht simon.albre...@mail.de:
[...]

I tried to, but somehow an
extender line inside a music function body gives a syntax error and I’ve got
no clue how to circumvent that. You’ll find the current function attached.
Can anyone help, please?

No attachment ;)

Always the same mistakes… sorry ;-/
Yours, Simon
\version 2.19.12

ext = #(define-music-function (parser location voice syl) (symbol? ly:music?)
 (let*
  ((s? (eq? voice 'S))
   (a? (eq? voice 'A))
   (t? (eq? voice 'T))
   (b? (eq? voice 'B))
   (others (cond (s? '(A T B))
 (a? '(S T B))
 (t? '(S A B))
 (b? '(S A T)
  #{ \lyricmode { \tag $voice { $syl __ }
 \tag $others $syl } #}))

music =  { c( d) e f }
   \addlyrics { \ext A Will it work? } 

\keepWithTag A \music
\keepWithTag B \music___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Tags in Lyrics

2014-10-25 Thread Thomas Morley
2014-10-25 14:46 GMT+02:00 Simon Albrecht simon.albre...@mail.de:
 Am 24.10.2014 um 21:48 schrieb Thomas Morley:

 2014-10-24 21:19 GMT+02:00 Simon Albrecht simon.albre...@mail.de:
 [...]

 I tried to, but somehow an
 extender line inside a music function body gives a syntax error and I’ve
 got
 no clue how to circumvent that. You’ll find the current function
 attached.
 Can anyone help, please?

 No attachment ;)

 Always the same mistakes… sorry ;-/
 Yours, Simon

I'm not sure what you're aiming for, though I made your function work so far:


\version 2.19.12

\paper { ragged-right = ##f }

ext =
#(define-scheme-function (parser location voice syl) (symbol? ly:music?)
  (let* ((s? (eq? voice 'S))
 (a? (eq? voice 'A))
 (t? (eq? voice 'T))
 (b? (eq? voice 'B))
 (others (cond
   (s? '(A T B))
   (a? '(S T B))
   (t? '(S A B))
   (b? '(S A T)

 #{
   \tag $voice
 $(let* ((dur (ly:music-property syl 'duration))
 (txt (ly:music-property syl 'text))
 (lyr (make-lyric-event txt dur)))
   (ly:music-set-property! lyr 'articulations
   (list (make-music 'ExtenderEvent)))
   lyr)
   \tag $others $syl
 #}))

music =

\new Voice = mel
\relative c' { c( d) e f }

%% works both:
\addlyrics { \ext A Will it work? }
%\new Lyrics \lyricsto mel {
%\ext A
%Will it work?
%  }



\keepWithTag A \music
\keepWithTag B \music


HTH,
  Harm

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


Re: Tags in Lyrics

2014-10-24 Thread Simon Albrecht

Hello Noeck, hello everybody,

at least you can save a lot of typing from v2.18 on:

Am 24.10.2014 um 09:25 schrieb Noeck:

Hi,

when I write choir pieces I like to have one song text for all voices
and to use tags.

Often, the differences are only whether there is an extender line or not
\tag A Where __ \tag S \tag T \tag B Where bla bla ...

\tag A Where __ \tag S.T.B Where bla bla …

Or you write a music function to wrap this. I tried to, but somehow an 
extender line inside a music function body gives a syntax error and I’ve 
got no clue how to circumvent that. You’ll find the current function 
attached. Can anyone help, please?


Yours, Simon

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


Re: Tags in Lyrics

2014-10-24 Thread Thomas Morley
2014-10-24 21:19 GMT+02:00 Simon Albrecht simon.albre...@mail.de:
[...]
 I tried to, but somehow an
 extender line inside a music function body gives a syntax error and I’ve got
 no clue how to circumvent that. You’ll find the current function attached.
 Can anyone help, please?

No attachment ;)

-Harm

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