lilypond-user
[Top][All Lists]
Advanced

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

Re: even horizontal spacing


From: Neil Puttock
Subject: Re: even horizontal spacing
Date: Sat, 21 Aug 2010 17:41:08 +0100

On 19 August 2010 20:25, Marek Klein <address@hidden> wrote:

> I would like to get even horizontal spacing for all notes disregarding the
> duration.
> For example for
> d2 c4 e2 f1
> I would like to get the result as with
> d2*1/2 c4 e2*1/2 f1*1/4
>
> How could I get this automaticaly?

Use \musicMap to scale the notes:

#(define (scale-notes music)
   (if (music-is-of-type? music 'rhythmic-event)
       (let* ((len (ly:music-length music))
              ;; set default duration for notes
              (base-mom (ly:make-moment 1 4))
              (scale (ly:moment-div base-mom len)))
         (ly:music-compress music scale)))
   music)

\new Staff \musicMap #scale-notes \relative c' {
  \cadenzaOn
  c\breve c1. c2 c4 c8. c16 c32 c64 c128 r8 r4 r2
}

Cheers,
Neil



reply via email to

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