lilypond-user
[Top][All Lists]
Advanced

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

Re: scheme variable for tempo


From: Neil Puttock
Subject: Re: scheme variable for tempo
Date: Tue, 27 Jul 2010 21:28:27 +0100

On 27 July 2010 18:54, michael webster <address@hidden> wrote:

> Simple enough. But what I am after is a way to have these prefab modulations 
> affect the tempo. Ideally I could set some kind of variable for the tempo and 
> have the metric modulations alter it, so that they would perform as expected 
> in every situation. So for example \quarterEqualsDottedEighth would increase 
> the tempo by 4/3.

This should give you an idea:

\score {
  \relative c' {
    \tempo 4 = 60
    c4 c c c
    c4 c c c
    \context Timing
    \applyContext
    #(lambda (ctx)
       (let ((tempo (ly:context-property ctx 'tempoWholesPerMinute)))
         (ly:context-set-property ctx 'tempoWholesPerMinute
                                          (ly:moment-mul wholes
(ly:make-moment 4 3)))))
    c4 c c c
    c4 c c c
  }
  \midi {}
}

Cheers,
Neil



reply via email to

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