Re: Text centralized above a TextSpan

2015-09-23 Thread Simon Albrecht

On 23.09.2015 01:20, David Kastrup wrote:

Simon Albrecht  writes:


I made an essay on a simpler input interface, which redefines
\startTextSpan as a music function. That would be much preferable at
least in my eyes. What do you think?
(I hope there wouldn’t be any merge conflicts here…)
However, I’m having a problem with this syntax: the attached file
gives lots of

"text-spanner-inner-text-lyric-mode.ly:615:5: error: wrong type for
argument 3.  Expecting music, found #>
   c1
 \startTextSpan \lyricmode { ral -- len -- tan -- do }"

upon compiling. And I don’t know what my mistake would be…

It's the last line before %%% EXAMPLES where you enter some strange
recursion.  You probably should first save the old value of
\startTextSpan in some differently named variable and use that.  But
really: reusing an existing command name is a bad idea to start with.



I think it’s eventually a good idea to replace the definition of 
\startTextSpan, firstly because it’s the most convenient sort of 
interface for this custom function. And secondly: _Any_ sensible use of 
text spanners now requires a quite complicated \override, even most 
common cases:

%%%
\relative {
  \override TextSpanner.bound-details.left.text = "rit."
  b'1\startTextSpan
  e,\stopTextSpan
}
%%%
Being able to input the same as
%%%
\relative {
  b'1\startTextSpan \lyricmode { rit. }
  e,\stopTextSpan
}
%%%
would be a huge improvement IMO.
I think it’s not often that one only needs a text to end the spanner, so
\startTextSpan \lyricmode { "" -- "back to normal" }
would be acceptable.

Drawback: it’s impossible to provide backward compatibility then, isn’t it?

But you were right and storing the default value in an extra variable 
solved the problem. I overlooked that I was introducing a recursion 
instead of redefining a variable. Thanks.


Yours, Simon

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


‘new text-spanner’ development

2015-09-23 Thread Simon Albrecht

Hello,

as the other thread was becoming a monster, I start up a new one.
I’ve now got a version of text-span-spread.ly, as I call it, and it 
compiles now. However, a new problem appeared, which I assume has to do 
with variable scope and seems to be over my head: The first call to the 
\startTextSpan music function sets the texts for _all_ the subsequent 
calls. Even more suspiciously, the tweak to font-shape in line 725 
(ugh…) is also applied to all these instances.
I’m sorry to call for help so soon again, but I just don’t have enough 
experience and background to troubleshoot this with any degree of 
efficiency. Any hints are welcome! :-)


Yours, Simon
\version "2.19.27"
%%% Main author: David Nalesnik
%%% modifications by Simon Albrecht
%%% version: 0.2.1
%% CUSTOM GROB PROPERTIES

% Taken from http://www.mail-archive.com/lilypond-user%40gnu.org/msg97663.html
% (Paul Morris)

% function from "scm/define-grob-properties.scm" (modified)
#(define (cn-define-grob-property symbol type?)
   (set-object-property! symbol 'backend-type? type?)
   (set-object-property! symbol 'backend-doc "custom grob property")
   symbol)

% For internal use.
#(cn-define-grob-property 'text-spanner-stencils list?)

% user interface
#(cn-define-grob-property 'text-spanner-line-count number-list?)

% How much space between line and object to left and right?
% Default is '(0.0 . 0.0).
#(cn-define-grob-property 'line-X-offset number-pair?)

% Vertical shift of connector line, independenf of texts.
#(cn-define-grob-property 'line-Y-offset number?)

#(define (get-text-distribution text-list line-extents)
   ;; Given a list of texts and a list of line extents, attempt to
   ;; find a decent line distribution.  The goal is to put more texts
   ;; on longer lines, while ensuring that first and last lines are texted.
   ;; TODO: ideally, we should consider extents of text, rather than
   ;; simply their number.
   (let* ((line-count (length line-extents))
  (text-count (length text-list))
  (line-lengths
   (map (lambda (line) (interval-length line))
 line-extents))
  (total-line-len (apply + line-lengths))
  (exact-per-line
   (map (lambda (line-len)
  (* text-count (/ line-len total-line-len)))
 line-lengths))
  ;; First and last lines can't be untexted.
  (adjusted
   (let loop ((epl exact-per-line) (idx 0) (result '()))
 (if (null? epl)
 result
 (if (and (or (= idx 0)
  (= idx (1- line-count)))
  (< (car epl) 1))
 (loop (cdr epl) (1+ idx)
   (append result (list 1.0)))
 (loop (cdr epl) (1+ idx)
   (append result (list (car epl)

 ;; The idea is to raise the "most roundable" line's count, then the
 ;; "next most roundable," and so forth, until we account for all texts.
 ;; Everything else is rounded down (except those lines which need to be
 ;; bumped up to get the minimum of one text), so we shouldn't exceed our
 ;; total number of texts.
 ;; TODO: Need a promote-demote-until-flush to be safe, unless this is
 ;; mathematically sound!
 (define (promote-until-flush result)
   (let* ((floored (map floor result))
  (total (apply + floored)))

 (if (>= total text-count)
 (begin
  ;(format #t "guess: ~a~%~%~%" result)
  floored)
 (let* ((decimal-amount
 (map (lambda (x) (- x (floor x))) result))
(maximum (apply max decimal-amount))
(max-location
 (list-index
  (lambda (x) (= x maximum))
  decimal-amount))
(item-to-bump (list-ref result max-location)))
   ;(format #t "guess: ~a~%" result)
   (list-set! result max-location (1+ (floor item-to-bump)))
   (promote-until-flush result)

 (let ((result (map inexact->exact
 (promote-until-flush adjusted
   (if (not (= (apply + result) text-count))
   ;; If this doesn't work, discard, triggering crude
   ;; distribution elsewhere.
   '()
   result

#(define (get-broken-connectors grob text-distribution connectors)
   "Modify @var{text-distribution} to reflect line breaks.  Return a list
of lists of booleans representing whether to draw a connecting line
between successive texts."
   ;; The variable 'connectors' holds a list of booleans representing whether
   ;; a line will be drawn between two successive texts.  This function
   ;; transforms the list of booleans into a list of lists of booleans
   ;; which reflects line breaks and the additional lines which must be drawn.
   ;;
   ;; Given an input of '(#t #t #f)
   ;;
   ;;'((#t#t

Re: ‘new text-spanner’ development

2015-09-23 Thread David Kastrup
Simon Albrecht  writes:

> Hello,
>
> as the other thread was becoming a monster, I start up a new one.
> I’ve now got a version of text-span-spread.ly, as I call it, and it
> compiles now. However, a new problem appeared, which I assume has to
> do with variable scope and seems to be over my head: The first call to
> the \startTextSpan music function sets the texts for _all_ the
> subsequent calls. Even more suspiciously, the tweak to font-shape in
> line 725 (ugh…) is also applied to all these instances.
> I’m sorry to call for help so soon again, but I just don’t have enough
> experience and background to troubleshoot this with any degree of
> efficiency. Any hints are welcome! :-)

Well, I don't know who is responsible for this particular idiom
encountered frequently in here, but the following open-coded loop is
both opaque and inefficient (namely O(n^2) as _appending_ to a list is
an O(n) operation):

extractLyricEventInfo =
#(define-scheme-function (lst) (ly:music?)
   "Given a music expression @var{lst}, return a list of pairs.  The
@code{car} of each pair is the text of any @code{LyricEvent}, and the
@code{cdr} is a boolean representing presence or absence of a hyphen
associated with that @code{LyricEvent}."
   ;; TODO: include duration info, skips?
   (let ((grist (extract-named-music lst '(LyricEvent
 (let mill ((grist grist) (flour '()))
   (if (null? grist)
   flour
   (let* ((text (ly:music-property (car grist) 'text))
  (hyphen (extract-named-music (car grist) 'HyphenEvent))
  (hyphen? (not (null? hyphen
 (mill (cdr grist)
   (append flour (list (cons text hyphen?)

Open-coded, you are much better off writing:

   (let ((grist (extract-named-music lst '(LyricEvent
 (let mill ((grist grist) (flour '()))
   (if (null? grist)
   (reverse! flour)
   (let* ((text (ly:music-property (car grist) 'text))
  (hyphen (extract-named-music (car grist) 'HyphenEvent))
  (hyphen? (not (null? hyphen
 (mill (cdr grist)
   (cons (cons text hyphen?) flour))

Since cons is O(1) and the final reverse! O(n) is only done once, you
arrive at O(n) for all.  But why open-code in the first place?

  (map (lambda (elt)
 (let* ((text (ly:music-property elt 'text))
(hyphen (extract-named-music elt 'HyphenEvent))
(hyphen? (pair? hyphen)))
(cons text hyphen)))
   (extract-named-music lst 'LyricEvent)))

For something that is one-on-one, this is far more transparent.  And
even for something that is one-to-some (namely resulting in possibly 0,
1, or more elements), (append-map (lambda (elt) ...) ...) tends to be
much clearer.


-- 
David Kastrup

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


Re: ‘new text-spanner’ development

2015-09-23 Thread David Nalesnik
On Wed, Sep 23, 2015 at 6:54 AM, David Kastrup  wrote:

[...]


>
> Well, I don't know who is responsible for this particular idiom
> encountered frequently in here,



That would be me


> but the following open-coded loop is
> both opaque and inefficient (namely O(n^2) as _appending_ to a list is
> an O(n) operation):
>
> extractLyricEventInfo =
> #(define-scheme-function (lst) (ly:music?)
>"Given a music expression @var{lst}, return a list of pairs.  The
> @code{car} of each pair is the text of any @code{LyricEvent}, and the
> @code{cdr} is a boolean representing presence or absence of a hyphen
> associated with that @code{LyricEvent}."
>;; TODO: include duration info, skips?
>(let ((grist (extract-named-music lst '(LyricEvent
>  (let mill ((grist grist) (flour '()))
>(if (null? grist)
>flour
>(let* ((text (ly:music-property (car grist) 'text))
>   (hyphen (extract-named-music (car grist) 'HyphenEvent))
>   (hyphen? (not (null? hyphen
>  (mill (cdr grist)
>(append flour (list (cons text hyphen?)
>
> Open-coded, you are much better off writing:
>
>(let ((grist (extract-named-music lst '(LyricEvent
>  (let mill ((grist grist) (flour '()))
>(if (null? grist)
>(reverse! flour)
>(let* ((text (ly:music-property (car grist) 'text))
>   (hyphen (extract-named-music (car grist) 'HyphenEvent))
>   (hyphen? (not (null? hyphen
>  (mill (cdr grist)
>(cons (cons text hyphen?) flour))
>
> Since cons is O(1) and the final reverse! O(n) is only done once, you
> arrive at O(n) for all.  But why open-code in the first place?
>
>   (map (lambda (elt)
>  (let* ((text (ly:music-property elt 'text))
> (hyphen (extract-named-music elt 'HyphenEvent))
> (hyphen? (pair? hyphen)))
> (cons text hyphen)))
>(extract-named-music lst 'LyricEvent)))
>
> For something that is one-on-one, this is far more transparent.  And
> even for something that is one-to-some (namely resulting in possibly 0,
> 1, or more elements), (append-map (lambda (elt) ...) ...) tends to be
> much clearer.
>
>
OK, thanks!  Will update accordingly.

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


Labeling harmony using Roman numerals from a blind user

2015-09-23 Thread Daniel Contreras
Hello everyone,
Does anyone know the best way to input harmony labels such as II V I etc? Any 
help or suggestions would be much appreciated.

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


Compiling Nenuvar Editions (was: Re: lilypond-user Digest, Vol 154, Issue 123)

2015-09-23 Thread Simon Albrecht

Hi Michael,

please always edit the subject line when replying to e-mail digests. Or 
just turn off digest mode – I find (using Thunderbird’s filtering and 
displaying by thread) that this is much more convenient to read also.


On 23.09.2015 17:17, Michael Dykes wrote:

When I type the code:

make Haendel/Oratorio/Messiah

in my Documents/Messiah folder


Did you clone/copy the entire repository? IIUC, you took only the 
Messiah folder and copied it to ~/Documents on your machine, right? This 
will (a) not work because there are \includes in there pointing outside 
the directory; and (b) you’d need to change the path you pass to make.

So you _might_ try just running
make
inside the Messiah directory,
(or ‘make ~/Documents/Messiah’ from anywhere)
but it’s unlikely to work.

HTH, Simon

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


Re: lilypond-user Digest, Vol 154, Issue 123

2015-09-23 Thread Michael Dykes

When I type the code:

make Haendel/Oratorio/Messiah

in my Documents/Messiah folder

I get the error message:

fatal error: failed files: "Haendel/Oratorio/Messiah/main.ly"
Makefile:148: recipe for target 'Haendel/Oratorio/Messiah' failed
make: *** [Haendel/Oratorio/Messiah] Error 1


On 09/22/2015 02:40 PM, lilypond-user-requ...@gnu.org wrote:

make Haendel/Oratorio/Messiah



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


Re: Compiling Nenuvar Editions

2015-09-23 Thread Simon Albrecht

Hello,

I begin with another general policy: always reply on-list, unless 
information is really private. It may help others too.


On 23.09.2015 17:59, Michael Dykes wrote:
Ok, I just downloaded his entire zip directory. So, from within what 
folder should I type the


make Haendel/Oratorio/Messiah

command???


From the top directory of the repository, or simpler: the directory 
which contains the Haendel/ folder.


Yours, Simon

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


Re: Compiling Nenuvar Editions

2015-09-23 Thread Michael Dykes
I have now downloaded his entire zip file and am using the code 
suggested by Simon (I think) which is:


thedoctor818@TARDIS:~/Documents/nenuvar-master/Haendel$ m

and keep getting the error message:

make: *** No rule to make target 'Haendel/Oratorio/Messiah'.  Stop.

I am trying this in the directory: Documents/Haendel

I also tried this in Documents/Haendel/Oratorio/Messiah but to no avail.


Thanks for all the help with this as I am not sure what to do here.

On 09/23/2015 12:01 PM, lilypond-user-requ...@gnu.org wrote:

Send lilypond-user mailing list submissions to
lilypond-user@gnu.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.gnu.org/mailman/listinfo/lilypond-user
or, via email, send a message with subject or body 'help' to
lilypond-user-requ...@gnu.org

You can reach the person managing the list at
lilypond-user-ow...@gnu.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of lilypond-user digest..."


Today's Topics:

1. Re:?new text-spanner? development (David Kastrup)
2. Re:?new text-spanner? development (David Nalesnik)
3. Re:lilypond-user Digest, Vol 154, Issue 123 (Michael Dykes)
4. Labeling harmony using Roman numerals from a blind user
   (Daniel Contreras)
5. Compiling Nenuvar Editions (was: Re: lilypond-user Digest,
   Vol 154, Issue 123) (Simon Albrecht)
6. Scheme function to output \bookpart {} ? (Simon Albrecht)


--

Message: 1
Date: Wed, 23 Sep 2015 13:54:39 +0200
From: David Kastrup 
To: Simon Albrecht 
Cc: David Nalesnik ,lilypond-user

Subject: Re: ?new text-spanner? development
Message-ID: <87a8sd9wqo@fencepost.gnu.org>
Content-Type: text/plain; charset=utf-8

Simon Albrecht  writes:


Hello,

as the other thread was becoming a monster, I start up a new one.
I?ve now got a version of text-span-spread.ly, as I call it, and it
compiles now. However, a new problem appeared, which I assume has to
do with variable scope and seems to be over my head: The first call to
the \startTextSpan music function sets the texts for _all_ the
subsequent calls. Even more suspiciously, the tweak to font-shape in
line 725 (ugh?) is also applied to all these instances.
I?m sorry to call for help so soon again, but I just don?t have enough
experience and background to troubleshoot this with any degree of
efficiency. Any hints are welcome! :-)

Well, I don't know who is responsible for this particular idiom
encountered frequently in here, but the following open-coded loop is
both opaque and inefficient (namely O(n^2) as _appending_ to a list is
an O(n) operation):

extractLyricEventInfo =
#(define-scheme-function (lst) (ly:music?)
"Given a music expression @var{lst}, return a list of pairs.  The
@code{car} of each pair is the text of any @code{LyricEvent}, and the
@code{cdr} is a boolean representing presence or absence of a hyphen
associated with that @code{LyricEvent}."
;; TODO: include duration info, skips?
(let ((grist (extract-named-music lst '(LyricEvent
  (let mill ((grist grist) (flour '()))
(if (null? grist)
flour
(let* ((text (ly:music-property (car grist) 'text))
   (hyphen (extract-named-music (car grist) 'HyphenEvent))
   (hyphen? (not (null? hyphen
  (mill (cdr grist)
(append flour (list (cons text hyphen?)

Open-coded, you are much better off writing:

(let ((grist (extract-named-music lst '(LyricEvent
  (let mill ((grist grist) (flour '()))
(if (null? grist)
(reverse! flour)
(let* ((text (ly:music-property (car grist) 'text))
   (hyphen (extract-named-music (car grist) 'HyphenEvent))
   (hyphen? (not (null? hyphen
  (mill (cdr grist)
(cons (cons text hyphen?) flour))

Since cons is O(1) and the final reverse! O(n) is only done once, you
arrive at O(n) for all.  But why open-code in the first place?

   (map (lambda (elt)
  (let* ((text (ly:music-property elt 'text))
 (hyphen (extract-named-music elt 'HyphenEvent))
 (hyphen? (pair? hyphen)))
 (cons text hyphen)))
(extract-named-music lst 'LyricEvent)))

For something that is one-on-one, this is far more transparent.  And
even for something that is one-to-some (namely resulting in possibly 0,
1, or more elements), (append-map (lambda (elt) ...) ...) tends to be
much clearer.





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


Scheme function to output \bookpart {} ?

2015-09-23 Thread Simon Albrecht

Hello,

is it possible to have a Scheme function output a bookpart? In the 
attached example and my real-world setup, I get ‘error: bad expression 
type’.


TIA, Simon
\version "2.19.27"

test =
#(define-scheme-function (mus) (ly:music?)
   #{
 \bookpart {
   \score { $mus }
 }
   #})

\test { c' }___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


double time signature with single-digit

2015-09-23 Thread Andreas Stenberg

Hi!

I need a way to modify the double time signature snippet in LSR to 
produce something where the numerical part looks like the single-digit 
time signature style: something lice

C 3 with both mensural sign and number centered around the central noteline.

Yours

Andreas Stenberg

ps. Would do this on my own but my "scheme" is rather rusty and rather 
short on time.



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


Re: double time signature with single-digit

2015-09-23 Thread tisimst
Andreas,

On 9/23/2015 10:28 AM, Andreas Stenberg [via Lilypond] wrote:
> Hi!
>
> I need a way to modify the double time signature snippet in LSR to
> produce something where the numerical part looks like the single-digit
> time signature style: something lice
> C 3 with both mensural sign and number centered around the central 
> noteline.

How about this (based on LSR #725):

%
%% see http://lsr.di.unimi.it/LSR/Item?id=725
%% see also http://lilypond.org/doc/v2.18/Documentation/snippets/rhythms


#(define ((double-time-signature glyph num) grob)
(grob-interpret-markup grob
   #{
 \markup {
   \line {
 %\fontsize #0
 \musicglyph #glyph
 \lower #1 \number #num
   }
 }
   #}))

\relative c' {
   \override Score.TimeSignature.stencil =
   #(double-time-signature  "timesig.mensural44" "3")
   \time 3/4
   c8 b c d e f g4 g g g4 a8 g f e d2. \bar "|."
}
%



Adjust the \fontsize value to taste (0 means default size, BTW).

Best,
Abraham


dhgjjjab.png (6K) 





--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/double-time-signature-with-single-digit-tp181597p181601.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: Compiling Nenuvar Editions

2015-09-23 Thread Michael Gerdau
Since this seems to be more complicated than anticipated,

> I have now downloaded his entire zip file and am using the code
> suggested by Simon (I think) which is:
> 
> thedoctor818@TARDIS:~/Documents/nenuvar-master/Haendel$ m
> 
> and keep getting the error message:
> 
> make: *** No rule to make target 'Haendel/Oratorio/Messiah'.  Stop.
> 
> I am trying this in the directory: Documents/Haendel
> 
> I also tried this in Documents/Haendel/Oratorio/Messiah but to no avail.

here a full rundown of what I did.

1. I'm on Linux with make installed. Not sure about other OS'es. You
 also need a commandline (bash in my case)
2. I've downloaded the whole zip from https://github.com/nsceaux/nenuvar
 As of yesterday it was almost 8MB in size.
3. I've extracted this zip. That created a directory nenuvar-master in
 the current directory. I cd'd into it (cd nenuvar-master)
 [it is completely irrelevant where in your filesystem this located
 as everything below nenuvar-master is self contained -- in other words
 nenuvar-master is freely relocateable]
4. Inside .../nenuvar-master I issued
 make Haendel/Oratorio/Messiah
 and that created said score (with some warnings)

All references to files are relative to .../nenuvar-master

I'm pretty sure compiling the score requires LP 2.19.x to compile
out-of-the-box. I'm using 2.19.27. I haven't tested 2.18.2 but would not
be surprised if that fails.

As I already wrote in another mail, you could get a complete list of
valid make targets when you issue (inside ../nenuvar-master)
grep ":" Makefile | grep -v .PHONY | sed -e "s/:.*//"

When you do not get a rather lengthy list (in my case 396 lines) with
targets then you are either not in the correct directory or have
downloaded the wrong file. Or something completely different ;)

Last not least the score requires the scorlatti font.
Either get it from http://fonts.openlilylib.org/
or remove the \paper block in common/common.ily lines 18-22


HTH,
Michael

PS: Please trim your mails in that you copy only the stuff into your
mail, that is somewhat relevant to your issue. There is no need to
include msg regarding textspanner when you ask about Compiling
Nenuvar Editions.
-- 
 Michael Gerdau   email: m...@qata.de
 GPG-keys available on request or at public keyserver

signature.asc
Description: This is a digitally signed message part.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: double time signature with single-digit

2015-09-23 Thread Simon Albrecht

On 23.09.2015 18:28, Andreas Stenberg wrote:

Hi!

I need a way to modify the double time signature snippet in LSR


Which one?
It’s hard to help without a starting point…

Yours, Simon

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


Guitar right hand p-i-m-a

2015-09-23 Thread Sávio Ramos
Hi,

I want to use the comand

\rightHandFinger #

in two ways:

1) the normal way p-i-m-a
2) onother way (caps lock) P-I-M-A

With this, I can make diference between "tirando stroke" than "apoyando stroke"

Thanks
-- 
Sávio M Ramos
Arquiteto, Rio, RJ
Só uso Linux desde 2000
www.debian.org

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


Re: Scheme function to output \bookpart {} ?

2015-09-23 Thread David Kastrup
Simon Albrecht  writes:

> On 23.09.2015 23:43, David Kastrup wrote:
>> Thomas Morley  writes:
>>
>>> 2015-09-23 17:50 GMT+02:00 Simon Albrecht :
 Hello,

 is it possible to have a Scheme function output a bookpart? In the attached
 example and my real-world setup, I get ‘error: bad expression type’.

 TIA, Simon
>>> Hi Simon,
>>>
>>> this may give you a starting point:
>>>
>>> \version "2.19.27"
>>>
>>> test =
>>> #(define-scheme-function (mus) (ly:music?)
>>>(ly:book-process
>>>  (ly:make-book-part (list (ly:make-score mus)))
>>>  $defaultpaper
>>>  $defaultlayout
>>>  (ly:parser-output-name)))
>>>
>>> m = { c'4 }
>>>
>>> \test \m
>> Turns out I have some half-finished branch "bookactive" in my
>> repository.  I just don't remember any more what the problem was.
>
> Meaning? That you think about simplifying the interface/making
> something like my first example work? Which would of course be very
> honourable :-)

No, just that I did at one point of time work on that.

-- 
David Kastrup

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


Re: Scheme function to output \bookpart {} ?

2015-09-23 Thread Simon Albrecht

On 23.09.2015 22:45, Thomas Morley wrote:

2015-09-23 17:50 GMT+02:00 Simon Albrecht :

Hello,

is it possible to have a Scheme function output a bookpart? In the attached
example and my real-world setup, I get ‘error: bad expression type’.

TIA, Simon

Hi Simon,

this may give you a starting point:

\version "2.19.27"

test =
#(define-scheme-function (mus) (ly:music?)
   (ly:book-process
 (ly:make-book-part (list (ly:make-score mus)))
 $defaultpaper
 $defaultlayout
 (ly:parser-output-name)))

m = { c'4 }

\test \m


Shoot, I did find a flaw: I need a \bookpart {}, not a \book, but it 
needs to contain a \paper block. How can I do that?


TIA, Simon

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


Re: Guitar right hand p-i-m-a

2015-09-23 Thread David Kastrup
Sávio Ramos  writes:

> Hi,
>
> I want to use the comand
>
> \rightHandFinger #
>
> in two ways:
>
> 1) the normal way p-i-m-a
> 2) onother way (caps lock) P-I-M-A
>
> With this, I can make diference between "tirando stroke" than "apoyando 
> stroke"

If you have a rather recent version, you can write the following:

\version "2.19.25"

tir = \rightHandFinger \etc
apo = \tweak digit-names ##("P" "I" "M" "A" "X") \rightHandFinger \etc

{ c'\tir2 f' \apo4 }

If it's less recent, it's a few lines more.

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


Re: Scheme function to output \bookpart {} ?

2015-09-23 Thread Simon Albrecht

On 23.09.2015 23:43, David Kastrup wrote:

Thomas Morley  writes:


2015-09-23 17:50 GMT+02:00 Simon Albrecht :

Hello,

is it possible to have a Scheme function output a bookpart? In the attached
example and my real-world setup, I get ‘error: bad expression type’.

TIA, Simon

Hi Simon,

this may give you a starting point:

\version "2.19.27"

test =
#(define-scheme-function (mus) (ly:music?)
   (ly:book-process
 (ly:make-book-part (list (ly:make-score mus)))
 $defaultpaper
 $defaultlayout
 (ly:parser-output-name)))

m = { c'4 }

\test \m

Turns out I have some half-finished branch "bookactive" in my
repository.  I just don't remember any more what the problem was.


Meaning? That you think about simplifying the interface/making something 
like my first example work? Which would of course be very honourable :-)


Yours, Simon

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


Re: [OT] gmail: not able to paste code

2015-09-23 Thread Thomas Morley
2015-09-12 14:17 GMT+02:00 David Kastrup :
> Michael Gerdau  writes:
>
>>> Meanwhile I reinstalled jEdit and changed java:
>>>
>>> $ java -version
>>> java version "1.6.0_36"
>>> OpenJDK Runtime Environment (IcedTea6 1.13.8) (6b36-1.13.8-0ubuntu1~14.04)
>>> OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
>>>
>>> No success, at least neither Ctrl+c Ctrl+v nor via mouse-menu
>>>
>>> > Did you press C-c for copy and C-v for paste (that's via the clip board
>>> > I think, possibly requiring some sort of clipboard manager in your
>>> > desktop environment)?  The other way is marking with mouse-drag-1 and
>>> > pasting with middle-mouse: that one goes via the X selection mechanism.
>>>
>>> via middle-mouse it worked finally (I forgot to test this method)
>>>
>>> Though, I have not the slightest idea what changed and why
>>
>> Wild guess:
>> Did you (accidentially) change (or override globally) some keybindings ?
>>
>> On KDE that occasionally happened to me. I have no experience with
>> Gnome though.
>>
>> That fact that it works via middle-mouse implies that basically the
>> communication infrastructure is working
>
> Uh no?
>
>> and that somehow CTRL-C and CTRL-V just not trigger the required
>> processes.
>
> C-c, C-v, and mouse menu work via the clipboard.  mouse-mark and paste
> via middle click work via the X selection.  Totally different
> infrastructure.
>
> --
> David Kastrup

For the record.

I did a fresh install of Ubuntu 15.04 and now all works again. :)

Thanks for all your hints,
  Harm

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


Re: Scheme function to output \bookpart {} ?

2015-09-23 Thread Simon Albrecht

On 23.09.2015 22:45, Thomas Morley wrote:

2015-09-23 17:50 GMT+02:00 Simon Albrecht :

Hello,

is it possible to have a Scheme function output a bookpart? In the attached
example and my real-world setup, I get ‘error: bad expression type’.

TIA, Simon

Hi Simon,

this may give you a starting point:

\version "2.19.27"

test =
#(define-scheme-function (mus) (ly:music?)
   (ly:book-process
 (ly:make-book-part (list (ly:make-score mus)))
 $defaultpaper
 $defaultlayout
 (ly:parser-output-name)))


Brilliant! Thank you so much :-)
After figuring out that the $defaultpaper variable contains an empty 
output def and thus may be easily replaced, this fit perfectly.


Yours, Simon

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


Re: Scheme function to output \bookpart {} ?

2015-09-23 Thread David Kastrup
Thomas Morley  writes:

> 2015-09-23 17:50 GMT+02:00 Simon Albrecht :
>> Hello,
>>
>> is it possible to have a Scheme function output a bookpart? In the attached
>> example and my real-world setup, I get ‘error: bad expression type’.
>>
>> TIA, Simon
>
> Hi Simon,
>
> this may give you a starting point:
>
> \version "2.19.27"
>
> test =
> #(define-scheme-function (mus) (ly:music?)
>   (ly:book-process
> (ly:make-book-part (list (ly:make-score mus)))
> $defaultpaper
> $defaultlayout
> (ly:parser-output-name)))
>
> m = { c'4 }
>
> \test \m

Turns out I have some half-finished branch "bookactive" in my
repository.  I just don't remember any more what the problem was.

-- 
David Kastrup

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


Re: Scheme function to output \bookpart {} ?

2015-09-23 Thread Thomas Morley
2015-09-23 17:50 GMT+02:00 Simon Albrecht :
> Hello,
>
> is it possible to have a Scheme function output a bookpart? In the attached
> example and my real-world setup, I get ‘error: bad expression type’.
>
> TIA, Simon

Hi Simon,

this may give you a starting point:

\version "2.19.27"

test =
#(define-scheme-function (mus) (ly:music?)
  (ly:book-process
(ly:make-book-part (list (ly:make-score mus)))
$defaultpaper
$defaultlayout
(ly:parser-output-name)))

m = { c'4 }

\test \m


HTH,
  Harm

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


Re: Double timesignature with single-digit

2015-09-23 Thread Andreas Stenberg


On 9/23/2015 10:28 AM, Andreas Stenberg [via Lilypond] wrote:

>Hi!
>
>I need a way to modify the double time signature snippet in LSR to
>produce something where the numerical part looks like the single-digit
>time signature style: something lice
>C 3 with both mensural sign and number centered around the central
>noteline.

How about this (based on LSR #725):

%
%% seehttp://lsr.di.unimi.it/LSR/Item?id=725
%% see alsohttp://lilypond.org/doc/v2.18/Documentation/snippets/rhythms


#(define ((double-time-signature glyph num) grob)
 (grob-interpret-markup grob
#{
  \markup {
\line {
  %\fontsize #0
  \musicglyph #glyph
  \lower #1 \number #num
}
  }
#}))

\relative c' {
\override Score.TimeSignature.stencil =
#(double-time-signature  "timesig.mensural44" "3")
\time 3/4
c8 b c d e f g4 g g g4 a8 g f e d2. \bar "|."
}
%



Adjust the \fontsize value to taste (0 means default size, BTW).

Best,
Abraham



Thanks Abraham.

This will work.  Also when i mod it to a triple timesignature C 3 ) . 
(The ")" standing in for a inverted  "C")


#(define ((triple-time-signature glyph num glyph_b) grob)
(grob-interpret-markup grob
   #{
 \markup {
   \line {
 \fontsize #4
 \musicglyph #glyph
 \lower #1 \number #num
 \fontsize #4
 \musicglyph #glyph_b
   }
 }
   #}))

\relative c' {
   \override Score.TimeSignature.stencil =
   #(triple-time-signature  "timesig.mensural64" "3" 
"timesig.mensural68alt")

   \time 3/4
   c8 b c d e f g4 g g g4 a8 g f e d2. \bar "|."
}

Andreas

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


Re: double time signature with single-digit

2015-09-23 Thread Andreas Stenberg

Simon Albrecht skrev 23-09-2015 21:29:

On 23.09.2015 18:28, Andreas Stenberg wrote:

Hi!

I need a way to modify the double time signature snippet in LSR


Which one?
It’s hard to help without a starting point…

Yours, Simon

Hups!
Sorry did forget to include this.


#(define ((double-time-signature glyph a b) grob)
   (grob-interpret-markup grob
  (markup #:override '(baseline-skip . 2.5) #:number
  (#:line ((markup (#:fontsize 4 #:musicglyph glyph))
   (#:fontsize -1 #:column (a b)))

\relative c' {
  \override Score.TimeSignature.stencil =
  #(double-time-signature  "timesig.mensural64" "3" "2")
  \time 3/4
  c8 b c d e f g4 g g g4 a8 g f e d2. \bar "|."
}


Andreas

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


Problems with text alignment

2015-09-23 Thread Mark Veltzer
Hello all,

I have a problem and a solution to it which does is not very stable.

My problem is that I want music sheets to be followed by their text. Since
these are
songs I arrange the text in several columns to save space. The text is RTL
(hebrew in this case).

What is the problem? I want the columns to be aligned to the right on the
screen.
I can do it but the only way I found to do it is by inserting bogus not
deterministic
number of empty columns and using 'fill-line'.

My question is this: Is there a better solution?

Attached are the input and output files.

The input file contains a more detailed description of the problem.


Cheers,
   Mark
%{

This example shows the problem of aligning text to the right in lilypond.
Without the following two empty 'right-column' entires this example
would show up with one column aligned to the right of the screen
and the other to the left (internally alight to the right)
with lots of space in between.

I am not aware of any other means to get at the result that you get
from this example which does not involved the two 'right-column' entires.

This is an unstable solution since the number of 'right-column' entries
involved is a function of the page width.

Is there a way in lilypond for a more straight forward solution to this
problem?

%}

\version "2.18.2"

\markup {
	\small {
		\fill-line {
			\right-column {
\null
			}
			\right-column {
\null
			}
			\right-column {

\box "A"
"נח - היונה כבר שבה עם עלה של זית"
"נח - תן לנו לצאת ולחזור לבית"
"כי כבר נמאסנו זה על זה"
"האריה על הממותה, הגמל על השיבוטה"
"וגם ההיפופוטם."
"פתח לרגע את הצוהר"
"ונעוף לתכלת הלבנה"
"כך עם היונה."
			}
			\null
			\right-column {

\box "A"
"נח - כמה זמן נמשיך לשוט על פני המים?"
"נח - כל החלונות סגורים כמעט חודשיים."
"וכבר אין לנו אויר"
"לאריה ולממותה לגמל ולשיבוטה"
"וגם להיפופוטם."
"פתח לרגע את הצוהר"
"ואל תוך התכלת הלבנה"
"שלח את היונה."
\null

\box "A"
"נח - מה אתה דואג, הן כבר חדל הגשם"
"נח - פתח את החלון, אולי הופיעה קשת"
"ויראו אותה כולם"
"האריה והממותה, הגמל והשיבוטה"
"וגם ההיפופוטם."
"פתח לרגע את הצוהר"
"ואל תוך התכלת הלבנה"
"שלח את היונה."
			}
		}
	}
}


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


Re: Compiling Nenuvar Editions

2015-09-23 Thread Michael Dykes
Please forgive my ignorance but I have updated to Lily 2.19.27-1 and 
downloaded the Scorlatti file. However, not sure for lack of a better 
way of wording it "where to install it"/where to put the font files and 
which folder(s) I need to out where. Again forgive my ignorance here.


-MD

Message: 4 Date: Wed, 23 Sep 2015 19:50:58 +0200 From: Michael Gerdau 
 To: lilypond-user@gnu.org Cc: Michael Dykes 
 Subject: Re: Compiling Nenuvar Editions 
Message-ID: <1946334.bza5fid5Jh@hamiller> Content-Type: text/plain; 
charset="us-ascii" Since this seems to be more complicated than 
anticipated,

I have now downloaded his entire zip file and am using the code
suggested by Simon (I think) which is:

thedoctor818@TARDIS:~/Documents/nenuvar-master/Haendel$ m

and keep getting the error message:

make: *** No rule to make target 'Haendel/Oratorio/Messiah'.  Stop.

I am trying this in the directory: Documents/Haendel

I also tried this in Documents/Haendel/Oratorio/Messiah but to no avail.

here a full rundown of what I did.

1. I'm on Linux with make installed. Not sure about other OS'es. You
  also need a commandline (bash in my case)
2. I've downloaded the whole zip from https://github.com/nsceaux/nenuvar
  As of yesterday it was almost 8MB in size.
3. I've extracted this zip. That created a directory nenuvar-master in
  the current directory. I cd'd into it (cd nenuvar-master)
  [it is completely irrelevant where in your filesystem this located
  as everything below nenuvar-master is self contained -- in other words
  nenuvar-master is freely relocateable]
4. Inside .../nenuvar-master I issued
  make Haendel/Oratorio/Messiah
  and that created said score (with some warnings)

All references to files are relative to .../nenuvar-master

I'm pretty sure compiling the score requires LP 2.19.x to compile
out-of-the-box. I'm using 2.19.27. I haven't tested 2.18.2 but would not
be surprised if that fails.

As I already wrote in another mail, you could get a complete list of
valid make targets when you issue (inside ../nenuvar-master)
grep ":" Makefile | grep -v .PHONY | sed -e "s/:.*//"

When you do not get a rather lengthy list (in my case 396 lines) with
targets then you are either not in the correct directory or have
downloaded the wrong file. Or something completely different ;)

Last not least the score requires the scorlatti font.
Either get it from http://fonts.openlilylib.org/
or remove the \paper block in common/common.ily lines 18-22


HTH,
Michael

PS: Please trim your mails in that you copy only the stuff into your
mail, that is somewhat relevant to your issue. There is no need to
include msg regarding textspanner when you ask about Compiling
Nenuvar Editions.



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


Re: Compiling Nenuvar Editions

2015-09-23 Thread tisimst
Did you read the documentation at fonts.openlilylib.org? There's a section
that tells you precisely where to put them (and make sure you install all
the scorlatti-XX files, not just one of them.

- Abraham

On Wednesday, September 23, 2015, thedoctor818 [via Lilypond] <
ml-node+s1069038n181615...@n5.nabble.com> wrote:

> Please forgive my ignorance but I have updated to Lily 2.19.27-1 and
> downloaded the Scorlatti file. However, not sure for lack of a better
> way of wording it "where to install it"/where to put the font files and
> which folder(s) I need to out where. Again forgive my ignorance here.
>
> -MD
>
> Message: 4 Date: Wed, 23 Sep 2015 19:50:58 +0200 From: Michael Gerdau
> <[hidden email] >
> To: [hidden email] 
> Cc: Michael Dykes
> <[hidden email] >
> Subject: Re: Compiling Nenuvar Editions
> Message-ID: <1946334.bza5fid5Jh@hamiller> Content-Type: text/plain;
> charset="us-ascii" Since this seems to be more complicated than
> anticipated,
>
> >> I have now downloaded his entire zip file and am using the code
> >> suggested by Simon (I think) which is:
> >>
> >> thedoctor818@TARDIS:~/Documents/nenuvar-master/Haendel$ m
> >>
> >> and keep getting the error message:
> >>
> >> make: *** No rule to make target 'Haendel/Oratorio/Messiah'.  Stop.
> >>
> >> I am trying this in the directory: Documents/Haendel
> >>
> >> I also tried this in Documents/Haendel/Oratorio/Messiah but to no
> avail.
> > here a full rundown of what I did.
> >
> > 1. I'm on Linux with make installed. Not sure about other OS'es. You
> >   also need a commandline (bash in my case)
> > 2. I've downloaded the whole zip from https://github.com/nsceaux/nenuvar
> >   As of yesterday it was almost 8MB in size.
> > 3. I've extracted this zip. That created a directory nenuvar-master in
> >   the current directory. I cd'd into it (cd nenuvar-master)
> >   [it is completely irrelevant where in your filesystem this located
> >   as everything below nenuvar-master is self contained -- in other words
> >   nenuvar-master is freely relocateable]
> > 4. Inside .../nenuvar-master I issued
> >   make Haendel/Oratorio/Messiah
> >   and that created said score (with some warnings)
> >
> > All references to files are relative to .../nenuvar-master
> >
> > I'm pretty sure compiling the score requires LP 2.19.x to compile
> > out-of-the-box. I'm using 2.19.27. I haven't tested 2.18.2 but would not
> > be surprised if that fails.
> >
> > As I already wrote in another mail, you could get a complete list of
> > valid make targets when you issue (inside ../nenuvar-master)
> > grep ":" Makefile | grep -v .PHONY | sed -e "s/:.*//"
> >
> > When you do not get a rather lengthy list (in my case 396 lines) with
> > targets then you are either not in the correct directory or have
> > downloaded the wrong file. Or something completely different ;)
> >
> > Last not least the score requires the scorlatti font.
> > Either get it from http://fonts.openlilylib.org/
> > or remove the \paper block in common/common.ily lines 18-22
> >
> >
> > HTH,
> > Michael
> >
> > PS: Please trim your mails in that you copy only the stuff into your
> > mail, that is somewhat relevant to your issue. There is no need to
> > include msg regarding textspanner when you ask about Compiling
> > Nenuvar Editions.
>
>
> ___
> lilypond-user mailing list
> [hidden email] 
> 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/Re-lilypond-user-Digest-Vol-154-Issue-123-tp181585p181615.html
> To start a new topic under User, email ml-node+s1069038n...@n5.nabble.com
> 
> To unsubscribe from Lilypond, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Re-lilypond-user-Digest-Vol-154-Issue-123-tp181585p181616.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: Guitar right hand p-i-m-a

2015-09-23 Thread Nick Payne

On 24/09/2015 09:28, Sávio Ramos wrote:

I did this:

\version "2.18.2"

tir = \rightHandFinger #1
apo = \tweak digit-names ##("P" "I" "M" "A" "X") \rightHandFinger #1

{ c'\tir f'\apo }


And produces only "P" or "p" (image attached).

How can I change #2, #3, etc...

Pass the finger number as a parameter:

\version "2.18.2"

tir = #(define-event-function (fingnum)
(number?)
#{
  \rightHandFinger $fingnum
#})

apo = #(define-event-function (fingnum)
(number?)
#{
  \tweak digit-names ##("P" "I" "M" "A" "X")
  \rightHandFinger $fingnum
#})


{ c'\tir 1 f'\apo 2 }


But I've never seen upper case letters used to indicate stroke 
fingering, and there must be several hundred commercially engraved 
guitar scores in my collection. For lower case stroke fingering, the 
following is much simpler to enter and easier to read (you can't use 
lower case p or a, as p is a dynamic indication and a is a note name, so 
I use upper case for the shortcuts):


P=\rightHandFinger #1
I=\rightHandFinger #2
M=\rightHandFinger #3
A=\rightHandFinger #4

{ c'\P f'\I }


Nick Payne


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


Re: Problems with text alignment

2015-09-23 Thread David Wright
Quoting Mark Veltzer (mark.velt...@gmail.com):
> I have a problem and a solution to it which does is not very stable.
> 
> My problem is that I want music sheets to be followed by their text. Since 
> these are
> songs I arrange the text in several columns to save space. The text is RTL
> (hebrew in this case).
> 
> What is the problem? I want the columns to be aligned to the right on the 
> screen.
> I can do it but the only way I found to do it is by inserting bogus not 
> deterministic
> number of empty columns and using 'fill-line'.
> 
> My question is this: Is there a better solution?

Is the attached more what you want? It's tricky to tell as I'm not
familiar with editing RTL in emacs. (I changed the 3 As to XYZ to
distinguish the paragraphs.)

Cheers,
David.
\version "2.18.2"
\markup {
  \small {
\fill-line {
  "" % this gets pushed to the left by fill-line
  \right-align { % this gets pushed to the right by fill-line
	\concat {
	  \line {
	\right-column {
	  \box "X"
	  "נח - היונה כבר שבה עם עלה של זית"
	  "נח - תן לנו לצאת ולחזור לבית"
	  "כי כבר נמאסנו זה על זה"
	  "האריה על הממותה, הגמל על השיבוטה"
	  "וגם ההיפופוטם."
	  "פתח לרגע את הצוהר"
	  "ונעוף לתכלת הלבנה"
	  "כך עם היונה."
	}
	  }
	  "   " % this separates the columns
	  \line {
	\right-column {
	  \box "Y"
	  "נח - כמה זמן נמשיך לשוט על פני המים?"
	  "נח - כל החלונות סגורים כמעט חודשיים."
	  "וכבר אין לנו אויר"
	  "לאריה ולממותה לגמל ולשיבוטה"
	  "וגם להיפופוטם."
	  "פתח לרגע את הצוהר"
	  "ואל תוך התכלת הלבנה"
	  "שלח את היונה."
	  \null
	  \box "Z"
	  "נח - מה אתה דואג, הן כבר חדל הגשם"
	  "נח - פתח את החלון, אולי הופיעה קשת"
	  "ויראו אותה כולם"
	  "האריה והממותה, הגמל והשיבוטה"
	  "וגם ההיפופוטם."
	  "פתח לרגע את הצוהר"
	  "ואל תוך התכלת הלבנה"
	  "שלח את היונה."
	}
	  }
	}
  }
}
  }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Guitar right hand p-i-m-a

2015-09-23 Thread David Kastrup
Nick Payne  writes:

> On 24/09/2015 09:28, Sávio Ramos wrote:
>> I did this:
>>
>> \version "2.18.2"
>>
>> tir = \rightHandFinger #1
>> apo = \tweak digit-names ##("P" "I" "M" "A" "X") \rightHandFinger #1
>>
>> { c'\tir f'\apo }
>>
>>
>> And produces only "P" or "p" (image attached).
>>
>> How can I change #2, #3, etc...
> Pass the finger number as a parameter:
>
> \version "2.18.2"
>
> tir = #(define-event-function (fingnum)
tir = #(define-event-function (parser location fingnum)
> (number?)
> #{
>   \rightHandFinger $fingnum
> #})
>
> apo = #(define-event-function (fingnum)
apo = #(define-event-function (parser location fingnum)
> (number?)
> #{
>   \tweak digit-names ##("P" "I" "M" "A" "X")
>   \rightHandFinger $fingnum
> #})
>
>
> { c'\tir 1 f'\apo 2 }

Some changes are addictive.  parser/location went away only in 2.19.22.

-- 
David Kastrup

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