lilypond-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add scheme engraver for StaffTab notation


From: David Kastrup
Subject: Re: [PATCH] Add scheme engraver for StaffTab notation
Date: Tue, 24 Feb 2015 10:08:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Werner LEMBERG <address@hidden> writes:

>> [...] in string-tunings-init.ly there are also other tunings that
>> exceed 80 characters, such as "guitar-seven-string-tuning",
>> "bass-five-string-tuning", and "bass-six-string-tuning".
>
> Indeed.  Mhmm.  I would define an auxiliary, temporary function
>
>   T = #(define-void-function (parser location name chord)
>         (string? ly:music?)
>         "Auxiliary function to set up tunings."
>         (let ((sym (string->symbol (string-append name "-tuning"))))
>          #{ \makeDefaultStringTuning #sym \stringTuning #chord #}))
>
> that simplifies
>
>   \makeDefaultStringTuning #'guitar-tuning \stringTuning <e, a, d g b e'>
>
> to the much more readable
>
>   \T "guitar" <e, a, d g b e'>

You can write

\makeDefaultStringTuning guitar-tuning \stringTuning <e, a, d g b e'>

already.  \T is not "more readable" but merely shorter.  It would be
possible to redefine \makeDefaultStringTuning to _optionally_ allow

\makeDefaultStringTuning guitar-tuning <e, a, d g b e'>

as well.  I don't believe in "increasing readability" by renaming
symbols into stuff that is not the same in definition and usage.

-- 
David Kastrup



reply via email to

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