----- Original Message -----
From: "David Kastrup" <d...@gnu.org>
To: <lilypond-user@gnu.org>
Sent: Friday, November 18, 2011 9:14 PM
Subject: Re: Scheme for rhythmic transposition
James <pkx1...@gmail.com> writes:
hello,
On 18 November 2011 19:38, Adam Good <adamg...@adamgood.com> wrote:
Hi All,
A few years ago I believe a Lilypond user offered some Scheme code to
give transposed rhythms, for example to transpose every rhythmic value
to print half of its entered duration. It was awesome and nifty and
would be very useful to me at this moment :)
I've searched high and low in the archives and online! Embarrassed to
say I can't find it. Nor am I slick enough to code something like this
on my own.
If anyone has any leads please let me know.
http://lsr.dsi.unimi.it/LSR/Item?id=305
Can we retire this snippet? It unnecessarily calls ly:music-deep-copy
and it would be much simpler to use the readily available function
\shiftDurations for this.
--
David Kastrup
\shiftDurations seems to be remaining poorly documented. I'd be happy to
update the LSR with that function rather than the way it is now, but it
seems to me that durations can only be made shorter, not longer? If I use:
\shiftDurations 1 0 { \music }
all is OK. However, with
\shiftDurations -1 0 { \music }
I get:
ShiftDur.ly:11:20: error: wrong type for argument 1. Expecting integer,
found #<Prob: Music C++: Music((digit . 1) (origin . #<location
ShiftDur.ly:11:21>))((display-methods #<procedure #f (event parser)>) (name
. FingeringEvent) (types general-music fingering-event event)) >
\shiftDurations
-1 0 { \music }
Is this the correct usage, and does this mean that \shiftDurations does only
shorted music?
--
Phil Holmes
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user