lilypond-user
[Top][All Lists]
Advanced

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

sample function: How to use custom NoteHead stencils in a Drum context


From: Tao Cumplido
Subject: sample function: How to use custom NoteHead stencils in a Drum context
Date: Mon, 23 Feb 2009 09:52:06 +0100

Hi all,

I wrote a small function which makes it possible to use custom stencils for 
NoteHeads in a costum drumstyle-table.
This issue has come up a few times in the past:
http://www.mail-archive.com/address@hidden/msg44108.html
http://www.mail-archive.com/address@hidden/msg45133.html

Actually my function is more of a dirty workaround than actually creating new 
notehead styles such as 'cross or 'xcircle because to achieve that it would be 
necessary to change the LP source (at least that's what I think, maybe one of 
the more skilled Scheme gurus out there can prove me wrong).

Well, since this function is intended to be used for custom content I'll need 
to explain a few things how to customise the function for usage.

The first step is to create a custom drum-table.
Actually this is not really necessary but I suppose that custom stencils 
usually go hand in hand with custom drum-tables.
So, when you define your custom table the 'style field of the notes you want to 
be displayed with your custom stencil can be set to () which is just an 'empty' 
style. Something like this:
(bassdrum () #f 3)

The second step is to actually make a stencil.
I'm not gonna explain how to do that here since this topic has been covered 
quite often already.

The third step is to customise the custom-notehead function from my sample.ly 
file.
Inside the function there is a part which looks like this:

(case dt
  ((bassdrum) (set! mus (make-drum-note dt dur parallelogram)))
  ((hihat) (set! mus (make-drum-note dt dur parallelogram))))

This part has to be tweaked for custom usage.
Below is like a general instruction:

(case dt
  (([drumnote name]) (set! mus (make-drum-note dt dur [your stencil])))
  (...))

So, this is like telling those lines from your custom drum-table to be used 
with your stencil(s).
The parts with the brackets are the ones that have to be replaced by your own 
to work as you want them to.

Well, I hope this was more or less clear and that this function might be to 
some use for someone.
If there's more questions just ask.

Regards,

Tao
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: 
http://www.gmx.net/de/go/multimessenger01

Attachment: sample.ly
Description: Text Data

Attachment: sample.png
Description: PNG image


reply via email to

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