[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to write a ly:pitch? as element of a pair?
From: |
David Kastrup |
Subject: |
Re: How to write a ly:pitch? as element of a pair? |
Date: |
Wed, 21 Mar 2018 15:43:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Urs Liska <address@hidden> writes:
> Hi all,
>
> I have a with block where I would like to let the user enter a pair as
> a value, and one of the elements of the pair should be a pitch.
>
> Something like:
>
> \with {
> transposition = #'( d' . "D")
> }
>
> But this doesn't work, just like
>
> transposition = #'( #{ d' #} . "D")
>
> What I currently do is have them write
>
> transposition = d'
> transposition-label = D
>
> and cons them together within the function. This works but is inconsistent.
>
> So is there a convenient way to write a pitch within a Scheme expression?
Like usual with quoting.
transposition = #`( ,#{ d' #} . "D")
Or even without quoting:
transposition = #(cons #{ d' #} "D")
But frankly: I'd use separate variables instead.
--
David Kastrup