2013/10/12 David Kastrup <d...@gnu.org>: > "Phil Holmes" <em...@philholmes.net> writes: > >> At college, one of my ensembles is a mixed-music group performing >> modern music. I normally get away with singing or "playing" a >> triangle and bits of other untuned percussion. Imagine my surprised >> when I was given a xylophone piece to play. Fortunately, it's only >> one note at a time, and most of them are the same note, repeated for >> four bars, so I generally have the time to work out where the next key >> is when I'm playing the current one. However, I thought it might be >> interesting and vaguely useful to have some piano key diagrams which >> show which key is to be played, rather like the fingering diagrams. >> The attached image illustrates the kind of thing: playing D#. >> >> I know I could use box, rounded-box or filled-box, or moveto/lineto >> commands to draw the boxes, so I clearly could create the diagrams >> individually for each note. However, I thought it would be better to >> create a function to do this. I'd presume the location of each box >> would be in some sort of array/list, and that the function would use >> the 'pitch of the note to determine which to fill. However, I've read >> our documentation on scheme and am stuck on how to start, either >> creating the array/list and iterating over it to draw boxes, or >> grabbing the pitch value of a note. >> >> Could anyone start me off on this and help when I get stuck again? > > Starting off would be on > <URL:http://code.google.com/p/lilypond/issues/detail?id=3563#c4>. Check > its output. This is basically what you need, except that you need to > replace the C-Griff function which uses filled and non-filled circles in > a three-row arrangement with a more tedious rectangular arrangement. > > The c-griff function here only does the formatting and would need to be > completely replaced. In contrast, the stuff in define-scheme-function > could be kept unchanged. > > -- > David Kastrup > > > _______________________________________________ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user
Or maybe http://lsr.dsi.unimi.it/LSR/Item?id=791 might give some inspiration. Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user