lilypond-user
[Top][All Lists]
Advanced

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

Re: Duration comparison and swinging MIDI output


From: Christopher R. Maden
Subject: Re: Duration comparison and swinging MIDI output
Date: Tue, 10 May 2011 18:00:40 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10

On 05/06/2011 03:57 PM, David Kastrup wrote:
> I am not sure what information is stored inside of durations, but it is
> possible that equal? will do the trick (it does a recursive compare).

That did the trick, thanks!

(Gilles, thanks for your suggestion, too; I’d considered that, but
really wanted to compare the notes, not possibly equal-in-length but
differently constructed durations.)

On 05/06/2011 05:36 PM, Gilles THIBAULT wrote:
> #(display (equal? (ly:make-duration 1 2 0 0)(ly:make-duration 2 4 0 0)))

First, I should note that 1 2 0 0 is not a half note, but a
double-dotted half note, and 2 4 0 0 is a quadruply-dotted quarter note.
 Durations are confusing. (-:

> return #f

But anyway, that is exactly what I want!  I would not want a half note
to match two quarter notes; I want to know whether they are both half
notes, or both two quarter notes.

On 05/07/2011 07:06 PM, Janek Warchoł wrote:
> Nice, thanks for sharing!
> Have you considered adding it to LSR?

I did consider it... but would love some help making it a bit more
general first.  Anyone have any tips?

~Chris
-- 
Chris Maden, text nerd  <URL: http://crism.maden.org/ >
Does this mean we can have our civil liberties back now?
GnuPG Fingerprint: C6E4 E2A9 C9F8 71AC 9724 CAA3 19F8 6677 0077 C319



reply via email to

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