bradford powell <bradford.powell <at> gmail.com> writes:

> 
> My first thought was to write an engraver (since that is what guitar
> tablature seems to do). 

Writing an engraver is not as difficult as it seems, as long as you have good
models to follow.  But it *is* an involved process, and isn't the easiest way
for a new developer to get started.


> After looking into the source a bit, and
> deciding to try to avoid needing to recompile,

Recompiling is virtually impossible on windows, but it's doable on Linux and
OS/X.  If you really want to do some developing (and you're not on Windows),
it's probably worth learning to compile LilyPond.

> I have tried two other
> approaches. The first is based on adding markup to notes similar to
> the commented-out 'add-staccato' function in 'ly/gregorian.ly'. The
> second approach (which I think I prefer) is to create lyrics using
> similar markup.

I prefer the markup to notes, rather than the lyrics approach.  But this
tablature is new to me; I learned to play harmonica with arrows 
indicating blow or draw and numbers indicating holes.

If you want to get the lyrics-based approach integrated into LilyPond, you'll
probably want a HarmonicaTab context and harmonica_tab_engraver.
You can copy this functionality from the FretBoards context and 
Fretboard_engraver.  These are pretty simple, and could form a template
for your work if you're interested.

> 
> I would appreciate any comments. One area in particular that I have
> questions about is cleaning up the case statement that converts pitch
> to markup-- specifically in that I am weirdly interspersing lilypond
> syntax (with the '(markup #:flat #:flat #:circle "2")'-type
> statements). I would prefer to have a function like for blow and for
> draw that can incorporate parameters for the hole and the number of
> bends. I've tried:
> 
> #(define draw hole bends) (markup (make-list-markup (append (list
> #:simple) (make-list bends #:flat) (list hole)))))
> 

If you can write the code that will return the list of arguments that you
would like to have passed to the markup function, then you can do
something like this:

(append '(markup) (function-that-returns-argument-list))

to get the scheme function you want.

HTH,

Carl



_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to