[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Fret Diagram markup
From: |
Carl D. Sorensen |
Subject: |
RE: Fret Diagram markup |
Date: |
Wed, 26 May 2004 10:01:59 -0600 |
> -----Original Message-----
> From: Han-Wen Nienhuys [mailto:address@hidden
> Sent: Tuesday, May 25, 2004 2:20 PM
>
<SNIP>
> This was also an opportunity for me to take a closer look at
> your code. I still have some remarks:
>
> * We want to separate formatting machinery from syntax.
> Your fret-diagram command accepts a string containing items
> separated by semicolons. It would be better style to put the
> items in a Scheme list, eg.
>
> \fret-diagram-verbose #0.75 #'(6-x 5-x 4-o 1-2)
>
> or even better,
>
> \fret-diagram-verbose #0.75
> #'((cross 6) (cross 5) (open 4) (barre 1 2))
>
I'm delighted to make this change. Thanks for the input on how you'd
like to do it.
> A separate frontend could translate the current string syntax
> to a Scheme list.
>
> * The diagram items include settings for linethickness, height,
> width, etc.
>
> It would be better style to put these settings into properties, so
> you could do
>
> \translator { \StaffContext
> \override FretDiagram #'thickness = #0.2
> }
>
> and change all fret diagrams in one fell swoop.
>
> The properties delivered to the markup command through the props
> argument (which is a list of alists)
>
So do I assume that props is provided by the context, and that I can
just get the value out of props with appropriate (assoc * ) calls? Can
you give me some suggestions as to where I'd go to find good examples of
working with props?
> * for multi-choice alternatives, such as
>
> f:number -- set fingering label type (0 = none, 1 = in circle
> on string, 2 = below string) Default 0
>
> we use symbols instead of numbers. They are more descriptive.
Of course this is the best way. Should I define a symbol to a numeric
value, like in translate-stencil (X = 0, Y = 1), or is it better to just
have the code say (if eq? markingcode below)?
>
> * For the same reason, I frown on single character command
> names. Write
>
>
> thickness, barre, radius
>
> instead of
>
> t, c, d
>
No problem. I can easily see the advantage
> * for alists, we generally use symbols, not strings as keys.
So instead of having an alist entry be ("thickness" 0.5) it would be
(thickness 0.5)?
>
> * Unlike LISP, Scheme does not have nil pre-defined. Simply use '()
>
Ooops -- I'll fix it.
> * It would be nice if the width of a diagram were computed, from the
> length of the stringTunings property.
And I assume I get stringTunings I get that from an alist in the props?
>
> * linethicknesses are generally expressed relative to the
> linethickness \paper variable. The default usually is 1.0
Is that also in the props? If not, how do I get hold of it?
>
>
> I should be grateful if you could address these issues.
I'll be happy to do it. I'm sure I'll need some more guidance as I get
into it, but I'll let you know.
Carl
- RE: Fret Diagram markup, (continued)
- RE: Fret Diagram markup, Carl D. Sorensen, 2004/05/18
- RE: Fret Diagram markup, Carl D. Sorensen, 2004/05/18
- RE: Fret Diagram markup, Heikki Johannes Junes, 2004/05/19
- RE: Fret Diagram markup, Carl D. Sorensen, 2004/05/20
- RE: Fret Diagram markup, Carl D. Sorensen, 2004/05/26
- RE: Fret Diagram markup,
Carl D. Sorensen <=
- RE: Fret Diagram markup, Han-Wen Nienhuys, 2004/05/30
- RE: Fret Diagram markup, Han-Wen Nienhuys, 2004/05/30
- RE: Fret Diagram markup, Heikki Johannes Junes, 2004/05/31
- RE: Fret Diagram markup, Carl D. Sorensen, 2004/05/31
- RE: Fret Diagram markup, Carl D. Sorensen, 2004/05/31