lilypond-user
[Top][All Lists]
Advanced

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

Re: duration using variable


From: Graham King
Subject: Re: duration using variable
Date: Wed, 27 Apr 2016 13:12:15 +0100

On Wed, 2016-04-27 at 13:02 +0200, David Kastrup wrote:
Graham King <address@hidden> writes:

> perhaps try:
> \scaleDurations 2/1 { \cC }

Doesn't change the visuals.

Sorry.  More haste, less speed.  I meant \shiftDurations.  It might require other things to be adjusted too: \time is given as an example here.  This code was developed some years ago, so there might be better ways of doing it now.

\version "2.19.40"

music = { c'4 4 4 4 }

{ \time 4/4 \music }

#(define RF 1) % 1 to double note values, 2 for unchanged, 4 for halved, etc.

{ \shiftDurations #(rationalize
                    (inexact->exact (- (/ (log RF) (log 2)) 1)) 1/10) #0
  { \time #(cons 4 (* RF 2)) \music }
}

reply via email to

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