lilypond-user
[Top][All Lists]
Advanced

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

Re: Fingering multiple voices above the stave


From: Carl D. Sorensen
Subject: Re: Fingering multiple voices above the stave
Date: Sat, 11 Apr 2009 17:47:32 -0600



On 4/11/09 9:27 AM, "Gerard Neil" <address@hidden> wrote:



> 
> So I've got two questions:
> 1. Can someone help me write a macro/function to make this simpler? It
> would be nice to be able to write something like a^\multiFinger { 2 3
> }, for example. I'm sure this is possible, but I've spent a few hours
> on it and I'm not really getting far.

I thought this would be easy, but it took me a while longer than I expected.
This file includes two slightly different ways of doing it:

#(define-markup-command (cf layout props fingerings) (pair?)
  (let ((markup-list (map number->string fingerings)))
   (interpret-markup layout
                     (cons (list '(baseline-skip . 1.5)) props)
                     (markup
                       #:finger
                       (make-column-markup markup-list)))))
myCF =
#(define-music-function (parser location fingerings) (pair?)
   (let ((markup-list (map number->string fingerings)))
   (make-music 'TextScriptEvent     'text
    (markup       #:override '(baseline-skip . 1.5)
      #:finger 
      (make-column-markup markup-list)))))

\include "english.ly"

rhOne = \relative c'' {
  \partial 4 d4 |
  cs-\myCF #'(4 2) 
  b8 cs a4
  a'-\markup \cf #'(5 2)
}


rhTwo = \relative c'' {
  s4 a2 e4 cs' |
}

\new Staff <<
  \key a \major \numericTimeSignature \time 4/4
  \clef treble
  \new Voice { \voiceOne \rhOne }
  \new Voice { \voiceTwo \rhTwo }
>>


> 2. Or, alternatively, has someone got a better solution?

I thought about partcombine, but that didn't work well.


HTH,

Carl





reply via email to

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