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

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to