lilypond-devel
[Top][All Lists]
Advanced

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

Re: On creating a new all-encompassing drum mode (with example)


From: Carl Sorensen
Subject: Re: On creating a new all-encompassing drum mode (with example)
Date: Wed, 8 Jun 2011 08:20:01 -0600

On 6/8/11 6:36 AM, "Mike J. Bell" <address@hidden> wrote:

> (reposted from lilypond-user at the suggestion of one of the readers, and
> includes my script)
> 
> I'm interested in making a custom drum mode that more accurately reflects the
> rules in Weinberg's Guide To Standardized Drumset Notation.  Some of the
> pieces seem to be straightforward, others not so much.  I made an example file
> that was as close as I could get it, but there are a number of problems with
> my approach.  In particular, one notehead uses custom postscript; two others
> use standard lilypond noteheads that aren't quite right; and there are other
> expressive marks or articulations that aren't 100%.  So not only am I not
> getting exactly the output I want, it's also moderately difficult to enter the
> notes themselves in some cases.
> 
> Has anyone already looked into updating lilypond's drum features to be
> compliant with GSDN?  If not, is there anyone out there that's put extensive
> time/effort into customizing their drum modes that would be willing to share
> their work so I might see best (or better!) practices on how to approach this?

As far as I know, there is no developer who has a primary interest in
developing drum features.  This means the field is wide open -- you could be
that person!


> 
> Specific notes on some of the major problems with my approach:
> 
> 1) I'd like the halfopen articulation to be a 0 with line straight up-and-down
> through it instead of slanted...my guess is this mark is embedded in the font
> and hard to change

It is embedded in the font, but not terribly hard to change.  What we would
probably want to do is to add a new articulation with the line straight
up-and-down, unless we can get agreement that the angled line is wrong.  In
your opinion, is the angled line wrong, or just a different variant?  Can
you cite any references that indicate the line should be vertical?  Are
there any references that indicate the line should be at an angle?  We want
to make sure that LilyPond does the right thing.

> 2) The staccatissimo articulation appears directly over the choked cymbal
> note, instead of slightly behind (to the right) of it

You can set the X-offset property of the Script grob (using either \tweak or
\once \override) to adjust the horizontal position of the articulation.

> 3) The rimshot slash is rendered with custom postscript per notehead

This seems to me to be a reasonable approach, but it would be better to use
a path instead of postscript.  Using a path will give both postscript and
SVG output correctly.  But since it's a simple line, the draw-line function
is probably even easier.  See Notation Reference, A.9.3  (both of these
functions are new in 2.14 compared to 2.12)

> 4) There is no "circled default" notehead, so I used xcircle instead

You may be able to redefine the notehead print funtion to use the
circle-stencil function (see scm/stencil.scm).

> 5) The triangle notehead isn't the proper orientation for percussion (wide
> isosceles with base parallel to staff lines)

Try the do notehead, or the doThin notehead.


> 6) The acciaccatura I use for flams doesn't put the slur line in the direction
> I wish (it's over instead of under)

You may be able to define your own \flam command using
define-grace-function.  You can see how it's done for acciaccatura in
ly/grace-init.ly and ly/music-functions-init.ly.

> 7) The grace I used for ruffs and drags doesn't put the slur line in the
> direction I wish (but I think I can override this)

See my answer to 6.

> 
> These are mostly appearance-related.  Functional- or use-related issues are
> that I'd really like to be able to make new note names that are like macros so
> I don't need to be so specific at invocation.  I kind of want something like
> (pardon the pseudocode):
> 
> (define bell cymr->)
> (define choke cymc-|)
> (define rimshot sn^\markup { \postscript #"gsave 0.25 setlinewidth -0.2 -1.3
> rmoveto 1.7 -1.7 rlineto stroke grestore" })
> (define ghost < \parenthesize sn >)
> (define flam \acciaccatura { sn8 } sn)
> (define drag \grace { sn16[\( sn] } sn4\))
> 
> Except of course that each of those would need to put the note value in the
> correct place and be a valid expression, etc.
> 

You may be able to achieve this by some modification of the shape note code.

Barring that, you should be able to do it as a series of music functions.

ghost = 
#(define-music-function (parser location note)
  (ly:music?)
  #{ < \parenthesize $note > #})


Your music would then read

\ghost sn4  \ghost sn2


and so forth.

See Notation Reference 5.6 for more on music functions.

Thanks for your contributions!  I'm excited to see more of this.

Thanks,

Carl




reply via email to

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