lilypond-user
[Top][All Lists]
Advanced

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

Re: custom metronome-markup procedure causes weird goops-error


From: Neil Puttock
Subject: Re: custom metronome-markup procedure causes weird goops-error
Date: Fri, 25 Apr 2008 16:01:06 +0100

On 25/04/2008, Valentin Villenave <address@hidden> wrote:
> 2008/4/25 Neil Puttock <address@hidden>:
>
>
>  >  That's good, but there are two problems with it; one quite serious if
>  >  you value having MIDI output.
>
>
> I don't, so I don't care :)
>
>
>  >  First, you haven't set tempoWholesPerMinute properly, unfortunately
>  >  (it's the same problem I was scratching my head about in the original
>  >  thread):  the combination of the note value and beats per minute needs
>  >  to be converted to a moment.
>
>
>
> Yes. We need a string->moment function, as well as a better string->duration.

Indeed, but in this case what's needed is a (string beat)->moment function.

>  >  Second, unlike the helper function parse-simple-duration,
>  >  string->duration doesn't account for durations longer than a semibreve
>  >  since they can't be directly converted to a number.
>
>
> Ideal answer: oh yes, that is definitely a limitation.
>  Pragmatic answer : hmm, do we really need \breve in metronome marks?

I agree that it's not really a big issue, but on that rare occasion
when somebody wants to use \breve or \longa, they'll get a nasty
surprise and a failed file.

This could be solved easily *if* parse-simple-duration can be made
public , so it can be accessed from a .ly file. Then it's just a
matter of changing string->duration to the following:

#(define (string->duration duration)
 (let ((parsed (parse-simple-duration duration)))
 (ly:make-duration (car parsed) (cadr parsed)))
 )

Then again, there may be a good reason why it's not (define-public ...) already.

>  >  So, in conclusion, close but no cigar. ;)
>
>
> Hey, now it's your turn! The main issue I've been working on was: how
>  to pass the text string as an argument to the metronomeMarkFormatter.
>  Currently, it's a bit dirty (and heavy) but at least it produces a
>  decent graphical output. I don't (yet) understand ly:make-duration and
>  ly:make-moment well enough to improve the MIDI result.

Well, I have been trying to work it out, but I think your scheme
knowledge is much greater than mine at the moment (and I'm a bit
preoccupied with \sacredHarpHeads; can you suggest any improvements to
my code?)

If the MIDI problem can be solved, I think this would prove a better
snippet than the one I added, since it works under 2.10.

Regards,
Neil




reply via email to

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