[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Scaled durations in scheme
From: |
Fr. Samuel Springuel |
Subject: |
Scaled durations in scheme |
Date: |
Sat, 25 Apr 2020 16:00:13 -0400 |
Within a scheme music function, how can I tie the value of the third argument
of ly:make-duration to the value of the first argument so that the note takes
up the space of a 1/4 note? I’m trying to set things up so that I only have to
change one thing to change the appearance of the note without changing the
spacing. For instance, the MWE below uses half-notes. If I wanted to change
to whole notes, I currently have to change both the first and third argument.
I’d like to set things up so that only one thing has to be changed for easier
maintenance. The way I figure I need to define a scheme variable and use that
in some sort of transformation, but converting from an integer for the first
argument to the fraction expected for the third (or vice versa) has me baffled.
\version "2.19.84"
recite-note = #(define-music-function (note) (ly:music?)
(withMusicProperty 'duration (ly:make-duration 1 0 1/2) note))
\new Staff {
\new Voice { g' \recite-note g' g' }
}
✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036
PAX ☧ ΧΡΙΣΤΟΣ
- Scaled durations in scheme,
Fr. Samuel Springuel <=