[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:24:11 -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 it to work. Do you think it would be best to make a
\fret-diagram-verbose in addition to the current \fret-diagram, or
should I just make the syntax change to \fret-diagram?
> 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.
I assume that size should also be part of the properties, rather
than an argument to the markup.
>
> 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 just define symbols (define
BELOW 2) as is done for axes in calls to ly:stencil-translate-axis or is
it better to just use something like (if eq? finger-code
fc-label-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. And that's a reason why a
list as an argument is much better than a string, because I don't have
to parse, right?
> * for alists, we generally use symbols, not strings as keys.
So intead of (acons "thickness" thickness), I should use (acons
'thickness thickness)?
>
> * Unlike LISP, Scheme does not have nil pre-defined. Simply use '()
Oops -- I'll fix it.
>
> * It would be nice if the width of a diagram were computed, from the
> length of the stringTunings property.
Which I assume is available from props via something like (assoc (car
props) stringTunings)?
>
> * linethicknesses are generally expressed relative to the
> linethickness \paper variable. The default usually is 1.0
>
>
> I should be grateful if you could address these issues.
I'll be happy to work on them as I can. I'm traveling over the next
three weeks, which could be either good or bad in terms of having time
to work on them.
I appreciate your review of my code, and I look forward to being able to
increase my contribution. Thanks for being willing to answer questions.
Carl
- RE: Fret Diagram markup, (continued)
- RE: Fret Diagram markup, Heikki Johannes Junes, 2004/05/17
- RE: Fret Diagram markup, Carl D. Sorensen, 2004/05/17
- 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 <=
- RE: Fret Diagram markup, Carl D. Sorensen, 2004/05/26
- 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