lilypond-user
[Top][All Lists]
Advanced

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

Re: Metronome mark stem length


From: Thomas Morley
Subject: Re: Metronome mark stem length
Date: Mon, 17 Apr 2017 14:44:35 +0200

2017-04-17 14:21 GMT+02:00 Andrew Bernard <address@hidden>:
> Hi Simon,
>
> It's the signum function sgn of course,

Ofcourse.

> implemented in racket as sgn, but
> not in guile or the SRFI's with guile AFAIK.

Don't know racket, but it's not in guile, afaik.

> You could also say in Scheme:
>
> (define (sgn n)
>   (cond ((negative? n) -1)
>         ((positive? n)  1)
>         (else 0)))
>
> A dozen ways to implement, of course, Would be worth having this function
> somewhere in the lily libraries.

It _is_ in lily-library.scm.

>From there I copied it.
The purpose was to make issue 5122 work, before the patch is released.
Thus all needed definitions/procedures have to be present _in_ the
ly-file (ofcourse \include from an .ily-file is possible as well).
Leading to numerous lines of code.

The patch itself changes only 4 lines of code-changes and adds three
lines of comments...
https://codereview.appspot.com/324780043/diff/20001/scm/define-markup-commands.scm


One could argue whether 'sign' should be public, though ...


Cheers,
  Harm



reply via email to

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