lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to insert a number for fingering in embedded LilyPond?


From: Jan-Peter Voigt
Subject: Re: How to insert a number for fingering in embedded LilyPond?
Date: Sat, 12 Apr 2014 15:30:23 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

Hi Thomas,

I assume, you want to use this in some music-function ... (?)
you can insert the displayed scheme-_expression_:


%%%

finger = #(define-event-function (parser location n)(integer?)
(make-music 'FingeringEvent 'direction -1 'digit n))

{ c''4\finger 2 }

#(let ((n 4)) (display-scheme-music #{ \finger $n #}))
%%%


But unfortunately I don't know a shorter way to include it in such an included lilyexpression ...

this would of course be handy, if you want to use parameters in a longer snippet ...


HTH
Jan-Peter


On 12.04.2014 12:48, Thomas Morley wrote:
Hi folks,

regard the following code and terminal output

\version "2.19.3"

#(display-scheme-music #{ _2 #})

(make-music
  'FingeringEvent
  'direction
  -1
  'digit
  2)

This is all as expected.

Though, how to insert a number from a variable or procedure?
The following fails:

#(display-scheme-music (let ((n 2)) #{ _$n #}))

How to do it correctly?


Cheers,
  Harm

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


reply via email to

[Prev in Thread] Current Thread [Next in Thread]